"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Thursday, May 27, 2004

Reading vs. Taking

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:

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.