evennia/contrib/procpools
2013-04-14 16:36:44 +02:00
..
ampoule Fixes clobbering of 'path' argument. 2012-09-27 16:50:11 -07:00
__init__.py Adding the relevant files for running procpool from contrib. 2012-09-22 20:43:53 +02:00
python_procpool.py Made Attribute value queries also work with database objects by overloading the Attribute manager methods in question. Added procpool support for the new serializer functions and cleaned up some things. 2013-04-14 16:36:44 +02:00
python_procpool_plugin.py Set AMP interface strings to listen to local interfaces only by default. Also added AMP_INTERFACE setting. Resolves Issue 257. 2012-09-28 22:40:12 +02:00
README.txt Some more documentation and cleanup of the procpool contrib. 2012-09-22 21:38:29 +02:00

ProcPools
---------

This contrib defines a process pool subsystem for Evennia.

A process pool handles a range of separately running processes that
can accept information from the main Evennia process. The pool dynamically
grows and shrinks depending on the need (and will queue requests if there
are no free slots available).

The main use of this is to launch long-running, possibly blocking code
in a way that will not freeze up the rest of the server. So you could 
execute time.sleep(10) on the process pool without anyone else on the 
server noticing anything. 

This folder has the following contents: 

ampoule/ - this is a separate library managing the process pool. You 
           should not need to touch this.

Python Procpool
---------------
python_procpool.py - this implements a way to execute arbitrary python
           code on the procpool. Import run_async() from this
           module in order to use this functionality in-code
           (this is a replacement to the in-process run_async
           found in src.utils.utils).
python_procpool_plugin.py - this is a plugin module for the python
           procpool, to start and add it to the server. Adding it 
           is a single line in your settings file - see the header
           of the file for more info. 



Adding other Procpools
----------------------
To add other types of procpools (such as for executing other remote languages
           than Python), you can pretty much mimic the layout of python_procpool.py
           and python_procpool_plugin.py.