Long polling GET and POST?

306 views
Skip to first unread message

Stodge

unread,
Aug 15, 2011, 9:32:17 AM8/15/11
to Tornado Web Server
I'm toying with the idea of using HTTP requests instead of a messaging
middleware (like RabbitMQ) to bridge a Java server application and
Tornado instances. Tornado will be used to serve long polling requests
from client browsers.

I'm wondering if I could define Tornado two handlers; one GET to
handle long polling from external users and one POST, to handle
internal "messages".

The idea is to submit a POST from the internal server to Tornado, at
which point Tornado will send a partial long-polling response to the
browser.

Does this make sense? Thanks

Ben Darnell

unread,
Aug 15, 2011, 12:25:05 PM8/15/11
to python-...@googlegroups.com
Yes, that should be fine.  However, if your main application is in Java you may want to use something like Jetty's continuation feature instead of introducing python/tornado just for long polling.

-Ben

Stodge

unread,
Aug 15, 2011, 12:37:45 PM8/15/11
to Tornado Web Server
Thanks - the Java server isn't a web server and I don't know if Jetty
can be embedded because of its design.

On Aug 15, 12:25 pm, Ben Darnell <b...@bendarnell.com> wrote:
> Yes, that should be fine.  However, if your main application is in Java you
> may want to use something like Jetty's continuation feature instead of
> introducing python/tornado just for long polling.http://wiki.eclipse.org/Jetty/Feature/Continuations
Reply all
Reply to author
Forward
0 new messages