benoitc/gunicorn — pull request #638 by benoitc (2013-11-07 05:51:19+00:00)
Title: Feature/ipc

use a unix socket instead of a temportay file to signal activity
This change replace the use of a temportary file by a socket pair to
notify the master that the worker is still alive.

before we were doing the following:
- create a tmp file / worker
- write to it
- check the last update bey using os.stat

now:

- open a socket pair
- write to it
- on socket read we update the worker state

Possible improvement:

- instead of using SOCK_STREAM we could use SOCK_DGRAM to speed the
exchanges since we don't need the reliability
- instead of using a select, depending on the platform we could use
EPOLL, KQUEUE to speed the event handling in the arbiter.