Il giorno 20/gen/2011, alle ore 11.21, [email protected] ha scritto:

> Hello Roberto,
> 
> I have async application, right know I have one issue, what
> can be solved with help of threads. all I want it's just to create
> 20-30 threads what will receive data from the async cores, process
> them and return back to async cores.
> 
> Do you have any ideas what is the best way to do this communication?
> without many opened files - what will happen if I will use traditional
> ways like socket/server.
> 
> also, I tried multiprocessing module with async, it's working pretty
> good and have queue/pipe implementation (not sure how cheap is it yet)
> 
> how save to use multiprocessing instead of threading?
> 



What about having a second uWSGI instance (a 0.9.7 one would be better if you 
plan to use threads) ?

You pass messages from the async (stable) instance to the threaded 
(development) one.

You have tons of functions to manipulate uwsgi packets so it would be easy to 
pass data from one instance to another.


If you (one day, as now the async core of the development branch is totally 
broken) will move to 0.9.7 you can combine both without socket communications
(so faster and more reliable infrastructure).


Another different approach would be using the spooler, but actually it only 
executes one request at time, so your requests could wait for ages.

--
Roberto De Ioris
http://unbit.it

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to