Thread: http server using boost asio

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2014
    Posts
    139

    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?
    Last edited by EverydayDiesel; 01-15-2018 at 10:18 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Boost.Asio: Which method of server coding is more robust?
    By Chris87 in forum C++ Programming
    Replies: 2
    Last Post: 10-29-2017, 03:30 AM
  2. Using boost::asio (2)
    By sean_cantab in forum C++ Programming
    Replies: 0
    Last Post: 09-09-2017, 08:36 PM
  3. Using boost::asio
    By sean_cantab in forum C++ Programming
    Replies: 12
    Last Post: 08-04-2017, 12:26 AM
  4. Boost::asio unithread server-client problem.
    By Bruno Miguel in forum C++ Programming
    Replies: 0
    Last Post: 08-20-2016, 04:55 PM
  5. Boost ASIO
    By PetrolMan in forum C++ Programming
    Replies: 0
    Last Post: 04-10-2009, 03:24 PM

Tags for this Thread