[fpc-pascal] Standby socket servers?
Alan Krause
alank at shermanloan.com
Sat Jun 2 18:38:17 CEST 2007
Francisco Reyes wrote:
>
> Do you know of any place, or sample code, that I can see how non
> blocking sockets work?
Francisco,
The "bible" on this type of programming is Richard Steven's _Unix
Network Programming_. I have both the old version of the book, as well
as Volume 1 of the new and revised version.
Unfortunately, all of the code provided is written in C. However, it is
a *very* thorough book and a looks at the many different ways of
developing daemon applications, including pre-fork (favored on most Unix
varieties) and pre-thread (favored on Windows platforms) varieties.
I *highly* recommend these books to anyone who want to do daemon
programming on the Unix/Linux platform.
> 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.
> ...
> 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.
I think the pre-fork method would be perfect for what you are describing
as well.
Alan Krause
More information about the fpc-pascal
mailing list