[ogpx] event queues for fun and profit

Infinity Linden <infinity@lindenlab.com> Tue, 02 June 2009 22:22 UTC

Return-Path: <infinity@lindenlab.com>
X-Original-To: ogpx@core3.amsl.com
Delivered-To: ogpx@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C78743A6C50 for <ogpx@core3.amsl.com>; Tue, 2 Jun 2009 15:22:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.391
X-Spam-Level:
X-Spam-Status: No, score=-1.391 tagged_above=-999 required=5 tests=[AWL=0.586, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cRxYEtrE7LXN for <ogpx@core3.amsl.com>; Tue, 2 Jun 2009 15:22:26 -0700 (PDT)
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by core3.amsl.com (Postfix) with ESMTP id CE5003A6AA3 for <ogpx@ietf.org>; Tue, 2 Jun 2009 15:22:25 -0700 (PDT)
Received: by an-out-0708.google.com with SMTP id c3so6286505ana.4 for <ogpx@ietf.org>; Tue, 02 Jun 2009 15:22:24 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.133.2 with SMTP id g2mr399922and.23.1243981344331; Tue, 02 Jun 2009 15:22:24 -0700 (PDT)
Date: Tue, 02 Jun 2009 15:22:24 -0700
Message-ID: <3a880e2c0906021522g1883adh326fa837d6189130@mail.gmail.com>
From: Infinity Linden <infinity@lindenlab.com>
To: "ogpx@ietf.org" <ogpx@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Subject: [ogpx] event queues for fun and profit
X-BeenThere: ogpx@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual Worlds and the Open Grid Protocol <ogpx.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ogpx>, <mailto:ogpx-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ogpx>
List-Post: <mailto:ogpx@ietf.org>
List-Help: <mailto:ogpx-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ogpx>, <mailto:ogpx-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 02 Jun 2009 22:22:26 -0000

so... event queues...

to recap.. you can find info re: event queues in the OGP : Base
document at http://tools.ietf.org/html/draft-lentczner-ogp-base-00 .
an event queue is a service used by an HTTP client to get unsolicited
event notifications from a server. After logging into the agent
domain, one of the caps you should request is the event queue. You
then listen on the event queue for messages, process the server to
client messages and send the response back to the server via the event
queue cap.

and here are some issues open for discussion...

* how many event queues do we need? are we only going to have one
event queue from the client to the agent domain, and then have all
other services forward messages they want to send to the client to the
AD? or do we say... "one event queue per client : host pair"? or do we
further define the concept of a "service" as a collection of related
caps, including an event queue?

* asynchronicity - the event queue as it is defined currently defines
synchronous messages. the benefit here is that synchronicity is
"simple" in terms of state. the drawback is that the client
application MUST respond to the current message BEFORE it can request
the next one in the queue. an asynchronous message queue may require
application layer protocol equivalents of re-transmitting, windowing
and message time outs that would complicate the server -> client
interaction. if we're worried that one synchronous message that took a
long time to process could hold up the entire queue, we might want to
make the implementation of that message have the pattern of... "create
a capability on the client representing the client's response to a
message. i (the server) will poll it and see if it's done."
honestly... all the solutions to this problem have warts.

* message count - should we let multiple server -> client messages
flow in a single request to the event queue cap?

* RHTTP - right now we're looking at the event queue being implemented
as a long poll over HTTP. ultimately, a technology like RHTTP would
reduce server overhead. (
http://tools.ietf.org/html/draft-lentczner-rhttp-00 ) i think the
discussion around this point is... let's not do anything with the
event queue that makes it harder to implement RHTTP later. Or
websockets or bosch or beyaux for that matter.

* capabilities on the client - readers familiar with COMET or AJAX
will remember that simply defining an event queue is just half the
battle; rich clients are likely to have multiple objects that will
receive messages along the queue, so you have to have some way to
demultiplex messages. one way to do this is to model capabilities on
the client as endpoints for messages flowing across the event queue.
an advantage of this approach might be the ability for the server to
pass off a client capability to another server that will complete a
service request. hmm... more on this later... this probably warrants
it's own conversation thread and involves the concept of RHTTP URLs

* externally identifying event queues - so imagine you're a client.
you authenticate yourself to the agent domain and ask for caps for a
couple services. we'll call them "search:group",
"search:group:event_queue", "group:im" and "group:im:event_queue". the
protocol makes no assumptions as to whether the protocol endpoint that
implements the "search:group:event_queue" and "group:im:event_queue"
caps are the same URL or if they're different URLs. it would be
advantageous for the client to be able to, upon seeing that both caps
are implemented on the same URL NOT open a second connection to the
url. so the question is.. representing event_queues as URLs is not a
problem, right?

i'm sure there's more we could add to this, but this is just a bit to
get the conversation started.

-sincerely
-meadhbh / infinity