Hey romeo,
I did some work with sockets and created various servers and daemons to listen fro events here on our work backend. At the time, the sockets implementation had some issues. I'm not sure what the status of sockets in PHP are now. You can check the news group. I know there was a problem with reading from a socket. I was seeing it where would be read from the socket multiple times. I was forced to shelve the project until they get it sussed out.
I was working on a load balancer to balance traffic to a pool of read only databases. I also wrote a daemon to listen for signals from our cluster managers in the event of a failure of the primary database. It would basically tell one of the slaves to become the master.
Anyways, much of the work I was doing was based on phpServe or phpServ by Daniel Lorch. There is another PHP server project out there that is even more feature rich than phpServe but at this time I can't remember the name of it.
I'm planning on going back and spending more time with these projects as soon as some of the other stuff around here gets finished.
Another thing you might want to do is take a look at some of the examples in the manual. Toy with them a bit.
One thing that I tought about for a long time is the various approaches to how servers work. For example, Apache forks a child process to handle a request. However, our transaction server written by my boss in VB spins a new connection thread for each new connection. The server itself then polls each thread to see if it has a transaction to process. At this time, I've worked only with forking child processes, but would like to try the other way as well.
Anyways, let me know how it goes, or shoot an email if you want.
Here is the link to phpServ...
http://daniel.lorch.cc/projects/phpserv/
Cheers,
BDKR