ik writes:
You can create a daemon is several ways, but here are two of them:
1. Create non blocking sockets for the server, and on every new
communication open a new thread that will use that connection.
Thread or fork?
2. Create a non blocking sockets for the server, and on every new
communication open a new process that will handle that connection.
Do you know of any place, or sample code, that I can see how non blocking
sockets work?
I suggest that you open things by need, rather then by demand, because
you never know how much connections you'll need
I may do this during trial to get some numbers, but I am concerned that only
having one instance and forking on demand will cause delays.
need one, and you will have 10, then it's "too much" for what you
need.
I was thinking more along the lines of 2 to 5.
I am working on a postfix mail filter.
We process on our MX machines about 150K per machine (there are two of
them).
That comes out to about 2 connections per second. However the distribution
is not even. Most of the mail comes within 10 hours.
That turns out about 5 emails per second.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal