Our front-end developers have requested that the RESTful Java web services to support delta queries. The use case for this is to handle periodic ajax refresh of the screen to bring in new data (deltas). I can see a few advantages of this:Makes front-end logic simple (i.e. no complicated deduping logic)Reduce network traffic (i.e. response size is smaller)However, there are some concern as well:supporting delta will require the service to be stateful, whichimpact scalabilityheavy use of caching (results cached per user per query, to determinethe delta)heavy processing on the serverMy questions are:Are there additional advantages of the delta queries?What's a good implementation to for delta queries that wouldeliminate some of the disadvantages (you can assume we are wellingto drastically refactor our code)
RESTful web service and delta updates - advantages and disadvantages
web development;web services
supporting delta will require the service to be stateful, which impact scalabilityNot necessarily.  The front-end can provide state information back.  After all, a list of results that's sent in pages is a kind of delta query.  A request merely has to include a maximum key or timestamp.  Something like ?max=last_seen_key. Everything after this is part of the delta refresh.heavy use of caching (results cached per user per query, to determine the delta)Not necessarily.  See above.  The client can send state information back to determine what was already seen.heavy processing on the serverCompletely false. Are there additional advantages of the delta queries?No.