[Pyramid] blog post about async apps with pyramid

27 views
Skip to first unread message

Danny Navarro

unread,
Jan 14, 2011, 11:44:16 AM1/14/11
to pylons-...@googlegroups.com
Hi guys,

We had recently some discussions at #repoze about async apps with
pyramid. I have written a blog post about how I sorted out my specific
async problem and further research and experimentation I did.

http://blog.dannynavarro.net/2011/01/14/async-web-apps-with-pyramid/

Let me know any other input on the topic,

--
Danny Navarro  |  http://dannynavarro.net

Niklas Hambüchen

unread,
Jan 17, 2011, 10:38:35 AM1/17/11
to pylons-...@googlegroups.com
On 14/01/11 16:44, Danny Navarro wrote:
> Let me know any other input on the topic,

Server-side events (SSE,
http://blog.abourget.net/2010/6/16/html5-eventsource-in-pylons-read-comet-ajax-polling/)
is a good alternative that should not miss in your post. In contrast to
Websockets, it is unidirectional (when the most important thing is that
the server notifies the browser) and very simple.

I had some trouble to set it up with asynchronous stuff on the server
side, but it is actually straightforward if you know how it is done:

- use gunicorn with the gevent_pywsgi worker class
- use gevent data structures (no monkey patching needed, gevent_pywsgi
does it for you)
- turn debug buffering OFF

I just pushed an example Turbogears project to Github:
https://github.com/nh2/eventstreamexamples

signature.asc

Danny Navarro

unread,
Jan 18, 2011, 4:10:35 AM1/18/11
to pylons-...@googlegroups.com
Hi Niklas,

With all the buzz about WebSockets I missed SSE. It looks much
simpler than websockets for for sending events from the server. Do you
know if they supported in Firefox?

Thanks for sharing.

2011/1/17 Niklas Hambüchen <n...@deditus.de>:

--
Danny Navarro  |  http://dannynavarro.net

Reply all
Reply to author
Forward
0 new messages