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'.