Need Advice on Multithreaded Socket Server

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I want to prepare some training for some new employees regarding the
topic of multithreaded socket services implemented in PHP. I've been
able to implement this with my own design, but I'd like to hear your
thoughts on what you think are some good design goals, such as
answering a question like, "Would you open a pack of 5 socket
listeners each time you go over a socket threshhold, just to make the
server that much more available?" Or perhaps a question like, "Would
you create a 'knock-knock' port for all initial connections and then
ask the client apps to come in on another dynamic port?" Or perhaps,
"Would you prefer to mix UDP and TCP for fault tolerance?" I'm just
looking for the best advice.

Specifically, I was hoping to demonstrate a fake SMTP server that
would drop the "emails" as text files on the hard drive, or perhaps a
simplistic Telnet server that allows one to at least do 'cd' and 'ls'.

Re: Need Advice on Multithreaded Socket Server

Quoted text here. Click to load it

I can't imagine a SMTP server that uses a knock-knock port.  None
of the clients will know how to use it.

If you're going to implement a fake SMTP server, you need a *REAL*
SPAM filter.  Even if it only listens on  

I also suspect that if you implement a blackhole SMTP server (it
says it accepts all mail, and makes absolutely no attempt to deliver
or log anything or examine mail headers or write anything to disk),
and leave it open to the Internet, it *WILL* be overloaded by
spammers, since it looks like an open relay, even if it never
delivers anything.

Quoted text here. Click to load it

                        Gordon L. Burditt

Site Timeline