PhpServer will handle gSoap requests and http requests from clients.
PushServer will push notifications to clients and act a file server.
There are many server machines. Every PhpServer will communicate with a specific PushServer when needed. Every PhpServer needs to register itself to a PushServer letting the PushServer to help push notifications to clients.
Here are two architectures:
1) Architecure A
This architure will run each PushServer with a PhpServer on the same machine. Each client will register itself to a PhpServer and the PushServer which is running on the same machine with the PhpServer
|Database| _____|_____ | | | | (|PhpServer| + |PushServer|) //a same server machine \ / |Client|
2) Architecture B
This architure will run each PushServer on a single machine. Each client will register itself to a PhpServer and the PushServer which the PhpServer registers.
|Database| _____|_____ | | (|PhpServer|) （|PushServer|） //two server machines \ / |Client|
Which architecture is better and why?
We are worried about performance, extensibility, and flexbility. Actually the first achitecture is what we currently have and if we choose the second one, we need to modify our software: PhpServer, PushServer and Client. Thus, unless the second network architecture is much better (from load-balancing or network application design perspective), we won't choose the second one.