Boost C++ Architectural Design Pattern for Audio Streaming Multi-clients Server
Boost C++ Architectural Design Pattern for an Audio-focused Streaming RTMP Multi-clients Server
Hi all,
This is a high level question, and it's all about the architectural design pattern.
I did google a lot, but unfortunately, there is no design documents available for their implementation, and usually the implementation is very complicated, and hard to figure out what the pattern is.
Basically, my server (a reasonable commercial server) should: Requirements:
* Be able to handle 500+ clients/connection at the same time (I guess one-thread-per-connection might kill the server? context switch);
* Can handle 100+ clients/connection with audio communication simultaneously;
* One connection getting stuck/crashed should not affect the other connections;
My thoughts about the design:
* One thread per connection;
* One process per connection;
* Asynchronous connection acceptor;
* Blocking connection acceptor;
* Asynchronous incoming data receiver;
* Blocking incoming data receiver;
* Thread pool with specific number of threads for handling the connection acceptor;
* Thread pool with specific number of threads for handling the incoming data;
What combination of the above thoughts will do a great job for the requirement list I mentioned before?
Thanks. Any ideas are welcomed!
Peter