http server using boost asio
Hello,
I want to write a console application that
1. has a http server (listener) that can receive data
2. take that data and push it to several nodes
3. every 10 minutes call an external api and push that data out to the nodes
My main concern is having one set of variables that can be shared by processes 1 2 and 3 above while keeping the threads from blocking.
Boost asio has 4 examples, and I am wondering which one would be the best for my needs.
These are the examples they provide
C++03 Examples - 1.66.0
1. simple single-threaded server implementation of HTTP 1.0. It demonstrates how to perform a clean shutdown by cancelling all outstanding asynchronous operations.
2. An HTTP server using an io_context-per-CPU design.
3. An HTTP server using a single io_context and a thread pool calling io_context::run().
4. A single-threaded HTTP server implemented using stackless coroutines.
Which one of the above 4 would be best suited for what I am tying to do?