Spawning

A WSGI server which supports multiple processes, multiple threads, non-blocking HTTP io, and automatic graceful upgrading of code
Download

Spawning Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • Donovan Preston
  • Publisher web site:
  • http://pypi.python.org/pypi/Spawning
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 20 KB

Spawning Tags


Spawning Description

A WSGI server which supports multiple processes, multiple threads, non-blocking HTTP io, and automatic graceful upgrading of code Spawning uses eventlet to do non-blocking IO for http requests and responses. This means the server will scale to a large number of keep-alive connections easily. However, Spawning also delegates requests using other forms of multiprocessing and is configurable to be useful in a wide variety of situations. Spawning supports multiple Python processes as well as a threadpool.Single or Multiple ProcessIf your wsgi applications store state in memory, Spawning can be configured to run only one Python process. In this configuration your application state will be available to all requests but your application will not be able to take full advantage of multiple processors. Using multiple processes will take advantage of all processors and thus should be used for applications which do not share state.Single or Multiple Worker Thread (or Worker Process)If your wsgi applications perform a certain subset of blocking calls which have been monkeypatched by eventlet to cooperate instead (such as operations in the socket module), you can configure each process to run only a single main thread and cooperate using greenlet microthreads instead. This can be useful if your application is very small and needs to scale to a large number of simultaneous requests, such as a COMET server or an application which uses AJAX polling. However, most existing wsgi applications will probably perform blocking operations (for example, calling database adapter libraries which perform blocking socket operations). Therefore, for most wsgi applications a combination of multiple processes and multiple threads will be ideal.Graceful Code ReloadingBy default, Spawning watches all Python files that are imported into sys.modules for changes and performs a graceful reload on change. Old processes are told to stop accepting requests and finish any outstanding requests they are servicing, and shutdown. Meanwhile, the new processes are started and begin accepting requests and servicing them with the new updated code. At no point will your website's users see "connection refused" errors because the server will be continuously listening during reload.


Spawning Related Software