Mark Baker, in his comment to my "Is this ReST?" post, suggests "take" isn't often needed...
My machine's offline today, but I responded last night; yah, the unsafe GET isn't such a hot idea. And to add/respond to what Bill said, I'm finding that one often doesn't need TAKE semantics at all; just support indexing, e.g. /queue/?start=1&end=10, safe retrieval via GET, queueing of the documents for as long as you want/need to, flushing the old stuff after that point, and then returning 410 when asked to return a flushed document. Not totally general, but it's worked for me on a couple of occasions.This could be so in a queue where there is one consumer or where multiple consumers have an agreed-upon policy for avoiding double consumption.
In the general case though, FIFO queues are just one desirable coordination model...
No comments:
Post a Comment