+ Start a Discussion
IsuruIsuru 

Polling frequency - Java app

We have a java web application that replicates some of the Sforce Objects. The web application polls the Sforce site for changes when it receives a request. Sometimes many requests come to this web application within a short time interval.

Therefore our application's polling frequency can be less than 5 minutes at times. We have however limited this frequency to 1 minute. 

We use Sforce API 6.0. The API documentation recommends that the polling frequency should be more than 5 minutes and if the polling is too frequent Sforce built in controls will prevent the request.

Does Sforce web service prevent above type of requests?  We have not seen any errors thrown by Sforce in above instances. But sometime we notice that a few objects had not replicated correctly. Please advise us on the exact rules involved.

Thanks
SuperfellSuperfell
You need to take into account the timestamp rounding down to minutes, also near realtime replication is tricky, you need to take into account the fact that systemmodstamp has a value of when the row was updated/created, not when the containing transaction commited, so you need to run with overlapping timewindows to allow for the fact a row with a systemmodstamp of 11:37:55 might not be visible to other API calls until 11:38:22.
There's no limit on particular calls, although calling getUpdated with the same time parameters multiple times is a waste for both you and us, but there are general limits, see the section in the docs in request metering.
qmanqman

Simon,

What is a reasonable 'back it up' value to handle any long running units of work?  In other words, subtract 5 mins. or 15 mins. ?

Bill

SuperfellSuperfell
2 minutes ought to be enough, but to be absolutely sure, you'd probably need to allow for upto 10 minutes from the current time.