Steve Bjorg | 13 Jun 16:38

Re: Message queues

On Jun 13, 2007, at 7:23 AM, Paul Winkler wrote:

> On Tue, Jun 12, 2007 at 09:52:34PM -0700, Mike Dierken wrote:
> > Why would RPC take fewer round trips?
>
> I meant something like:
>
> service = SomeFlavorOfRPCServer('http://example.org/endpoint')
> message = service.popMessage()
>
> But now I realize this lacks the "message reconciliation" feature from
> Bill's proposal - the server doesn't know if the client successfully
> handled the message. So we need to add something like:
>
> service.acknowlegeReceipt(message.id)
>
> So now we've got two hits. Bill's proposal has three; so far I still
> haven't seen a RESTful way to spell "retrieve a resource from a
> collection, but I don't care what the resource's actual URL is, I just
> want the oldest one in the collection". (Or newest if it's a stack
> rather than a queue.)
How about using different media types?

To add an item:
POST /queue
Content-Type: application/xml (or whatever a queue item is)
-->
201 Created
Location: http://server.com/queue/itemXYZ

To request to pop an item:
POST /queue
Content-Type: application/w-www-form-urlencoded
AckTTL=60 (where AckTTL is the time to acknowledge the queue item or
it becomes available again)
-->
200 Ok
http://server.com/queue/itemABC

To delete a popped item:
DELETE /queue/itemABC
...

- Steve

--------------
Steve G. Bjorg
http://www.mindtouch.com
http://www.opengarden.org

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

Gmane