How does Twisted Web Multiprocess work ?
Sagar Dixit <[email protected]> Tue, 9 Jun 2015 19:01:01 -0700
| Newsgroups | gmane.comp.python.twisted.web |
|---|---|
| Message-ID | <CACZ+WpxQJNwWo1Dfw8zY9ir=H=SUwGyTiNJv7XUYnc10OELx0w@mail.gmail.com> |
Hi, I am exploring Twisted Web for my RESTful application. My application is stateless and involves storing and retrieving objects based on Object-ID. This application will run on beefy (multicore, lots of memory) machine. However, not all APIs that the application issues to underlying storage are async and hence I cannot fully utilize Deferreds Which means, there will some blocking calls and hence my primary interest is to use Twisted Web in multiprocessing mode I came across http://stackoverflow.com/questions/10077745/twistedweb-on-multicore-multiprocessor However, I am not sure if it is the "correct" way of doing things. Hence I had some questions around it: 1. Is there an interface (similar to defertoThread) which allows me to execute a blocking call in a separate process ? 2. Does reactor synchronize access of all processes to the shared listen socket ? 3. Is there a sample code I can refer to where the application is spawning subprocesses to handle HTTP requests ? Thanks in advance! _______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web