I am curious how I solve the concurrency problem for a RESTful API. More specifically, I have a set of objects that require manual verification and updating, for example. a series of rows that need a manually updated column; however, if I open the API for several clients, all of them will grab these elements from top to bottom, so many users will populate a column of the same row at the same time. I would prefer not to have collisions, and a simple, from the point of view of state, way is to simply drop the items into the service queue and push them when people ask for them.
What is a stateless version? Hashed by IP address or randomly grab strings based on identifier?
:: update ::
"Hrm, why should it just be stateless from a customer perspective?
This certainly makes a lot of sense. I just read an article (ibm.com/developerworks/webservices/library/ws-restful) about RESTful APIs and, faced with a bit of paging, I was worried that my well-to-do queue looked like a page increase, but they they are actually quite different, since the βnext pageβ is relative on the client side, whereas βpopβ always has no status for the client: it does not matter what came up before.
Thanks for cleaning my head! "-Me
source share