Reanimating an old topic about Beast HTTP
On Wed, Sep 28, 2016 at 5:39 PM, David Sankel
I don't think a synchronous interface is necessary.
I disagree. Synchronous interface used with the non-blocking setting, and a reactor style wait operation (http://www.boost.org/doc/libs/1_64_0/doc/html/boost_asio/overview/core/react...) present a strong alternative to the traditional proactor model. Specifically, using the reactor style wait operation means that no memory buffers need to be allocated while a connection is idle / waiting for bytes to become available. A robust reactor style implementation can service tens of thousands of connections using memory proportional to the number of threads rather than the number of connections. The technique is overlooked because of the assumption that the asynchronous interfaces should be preferred, and the synchronous interfaces deprecated. This impressive performance feat is not theoretical, it is already happening in the wild, for example, this library uses the reactor model and gets impressive performance figures: https://github.com/uNetworking/uWebSockets I will be investigating these techniques in Beast, most likely as an example server for resource-constrained devices, you can follow the progress here: https://github.com/vinniefalco/Beast/issues/445