just a crazy question: what about if you wrap the eventsource in a web worker?
Il giorno martedì 9 aprile 2013 22:56:51 UTC+2, Arnon Marcus ha scritto: > > The first yield WILL block the thread, but as you say, only the thread of > that connection. So the inter-thread communication would then be solved via > another "shared" process - Redis - which will act as a message broker, > listening to submissions and submit publications for subscribers. > I guess I can live with that, for now, our user-base is small enough I > think... > Apache is doing the same, right? > > P.S : Here is a nice lecture about concurrency and co-routines in python: > > http://www.youtube.com/watch?v=b7R3-_ViNxk > > > On Tue, Apr 9, 2013 at 4:16 AM, Niphlod <nip...@gmail.com <javascript:>>wrote: > >> ok, all clear! >> One point though: with a threaded webserver web2py can manage as many >> connections as there are free threads: it's not blocking everything at the >> first SSE yielding loop, it doesn't communicate with new connections as >> soon as there are n open connections, with n == max number of threads. >> I can't test it right now, but rocket (that is the "embedded" webserver >> of web2py) unless specified explicitely, opens a new thread at every >> connection (if you don't set the maxthreads option). Of course this can't >> scale up to 1000 connections, but its nonetheless sufficient for testing >> purposes or a small userbase. >> >> >> -- >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/web2py/bpx7ZcL67Co/unsubscribe?hl=en. >> To unsubscribe from this group and all its topics, send an email to >> web2py+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.