Search code examples
javascripttimeribm-mobilefirstmobilefirst-adapters

MobileFirst: running a timer job on client side - best option


I am developing an app in which I have to keep a timer job running in order to periodically( 2 min) make a call to adapter (backend) to fetch updated records.

What could be the best option present in MobileFirst?

Currently I use JavaScript Timeout function to call adapters periodically but am reluctant.

Remember I do not have need of using JSONStore so I am not sure about implementing that JSON synch feature which periodically synch JSONStore via adapter calls.


Solution

  • Why are you reluctant to use JavaScript to time your adapter requests?

    I see no issue with implementing that approach and am not aware of any other recommended approaches to do so in Worklight/MobileFirst Platform.

    This answer almost sounds like a comment, but given the nature of the question (no code...), there is nothing else to say.