Re: server-to-client event push - Re: relationship query and cache refreshing in 3tier cayenne

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed May 14 2008 - 17:43:21 EDT

  • Next message: Andrus Adamchik (JIRA): "[jira] Commented: (CAY-1056) Detection of the project file changes on disk."

    I just took a glance at the early draft of JSR-315 (and looks like
    Jetty 7 early releases already have this API built in).

    I *hope* we can emulate a persistent connection with that, using a
    protocol similar to this:

    1. Client sends a "give me events" request in the beginning of the
    session (separate from data requests), and reads everything that comes
    back.
    2. Server suspends the request thread, and keeps it suspended until
    the client quits.
    3. When an event arrives on the server, it is written to response and
    response.flushBuffer() is called (I guess we'll need to resume the
    request to do that and then suspend it again ... I hope multi-suspend
    is supported ? Or can we flush without resuming?)

    Of course all that is pluggable via an EventBridge implementation, so
    given the time and motivation we can download Jetty 7 and start
    playing with it right away.

    Andrus

    On May 14, 2008, at 4:42 PM, Tore Halset wrote:
    > Hello.
    >
    > On 14. mai. 2008, at 00.46, Andrus Adamchik wrote:
    >
    >> (2) Setup server-to-client event push. I did that in the past with
    >> a always-on XMPP connection in parallel with the main HTTPS data
    >> channel (I know it worked for object updates... it needs to be
    >> extended to cache groups invalidation). For a long time I wanted to
    >> investigate Jetty Continuations (and more generally, queuing events
    >> on the server for each live client, and letting client frequently
    >> poll for events). This would allow to reuse the main ROP
    >> connection, but this needs to be developed yet.
    >
    > It looks like the thing Jetty are doing with Continuations will be
    > standardized in Servlet 3.0
    >
    > http://blogs.webtide.com:80/gregw/2008/04/28/1209355449829.html
    >
    > Regards,
    > - Tore.
    >



    This archive was generated by hypermail 2.0.0 : Wed May 14 2008 - 17:43:57 EDT