android - creating a infinitly running event based java program -


i new field , don't have clue whatsoever on how achieve following goal.

i taking example explain this. need java code calls rest api on event. event daily event hit api daily @ noon or whenever administrator registers new event. can write code code should run forever i.e. whenever there event should trigger api hence in understanding must put on server.

now here doubt how go doing this. have read make servlet , request , response object not , since web application hence running in tomcat container on web-server , stick whole code there. not know if right way tackling problem.

edit trying implement server calls google cloud messaging api hence has send push notification registered users , user details in mysql server. administrator of server has right register new event notification needs send suppose wants send 1 time notification happy new year registered user or wants send daily notification @ particular time morning. these events has registered , listened server , on occurance of event server has make jsonobject , call gcm service. , please guide me how deploy on server.

hope clear now

ps: sorry if question seems absurd bear novice , me learn.

although question programmers exchange architecture this:

you dig in java timers , schedule (daily) events call rest api.

for accepting , scheduling new events , deleting old events need interface administrator can use. can correctly said servlet form showing scheduled events , deleting of them or rest api endpoint (so admin should use wget hit it).

you can use database persist events if server restarts or use in memory array variable hold them if not.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -