On Mon, Aug 4, 2014 at 12:50 PM, Petru Ciobanu <[email protected]>
wrote:

> I'm wondering if it's possible to implement "server sent events"
> <http://dev.w3.org/html5/eventsource/> in turbogears.
> I done some tests already, using an example found on github
> <https://github.com/nh2/eventstreamexamples> but encountered an
> unexpected behavior. It seems that when client is connected to the server
> using SSEs, server will not accept other connections from client, all other
> connections will have pending status until previously opened stream will be
> closed.
>

How are you serving them? If you are testing with "gearbox#wsgiref" (the
default server in development.ini) keep in mind that it is single threaded,
so it won't accept more than 1 open conneciton.
gearbox#wsgiref is only meant as a convenient tool for development, not for
production.

Usually when in need of a persistent connection it is better to rely on
async servers like "gearbox#gevent", if you cannot go with an async
solution (EX: heavily cpu bound web app) you will need to consider
deploying under something that is able to spawn a lot of threads to cope
with the high number of open connections.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to