Implementation thoughts

Some thoughts on what the implementation should look like

I want a single process to manage the queue, but I want it to be able to fork before performing any interesting work. This should allow it to scale well but not get involved it too much hairy IPC.

Event loop

The main thread (and probably all sub threads) will run around an event loop, listening on sockets and dealing with what it gets.

As messages appear that need processing, those messages will either be queued for an outgoing socket, or a child will be forked to handle each. The queue manager may keep a number of outgoing sockets in an already-authenticated state (if the destination handler allows that) to reduce latency. This would particularly be helpful for destinations that were programs that needed to be started by the queue manager

server configuration

The queue manager acts as an SMTP/LMTP server listening either on a unix domain socket or a TCP socket. For each listening address we need to specify the address, the authentication method, the authorisation method, and the destination.

For Unix domain sockets, SCM_CREDENTIALS


Home
Contact
Up



[æ]