Hacker News new | ask | show | jobs
by Chabs 2803 days ago
What is the rationale behind going for from-full-scratch instead of packaging a copy of ASIO with the library? Beating properly-used ASIO performance is going to be a massive uphill battle, especially in multithreaded scenarios.

On that note, benchmarks against a simple ASIO http server are a must if performance is your #1 stated goal.

4 comments

I agree. I should schedule to add ASIO vs oatpp benchmark.

However performance is not the only thing oatpp has. Among with other features oatpp provides ObjectMapping layer. ObjectMapping layer enables you to do cool stuff like: - autodocument endpoints see https://medium.com/oatpp/c-oatpp-web-service-with-swagger-ui...

- easily implement custom protocols (I will write article about this later)

I think you are misunderstanding my question. I am not suggesting that ASIO fills the role your library does. All it is, really, is just fancied-up cross-patform select().

What I'm wondering is: Is there's a specific reason you chose to reinvent that specific wheel?

Oh ok, thank you for clarification.

During the initial investigation boost::asio appeared to work not very good on MacOS. Problems where on the load higher than 10K concurrent connections.

There was multiple requests to compare networking performance of oatpp to ASIO lately. So I want to make full-scale testing before making statements.

+1 to this. If you are faster than ASIO - consider contributing back. If you are slower, and performance is the goal, what's the point of using your framework?
In case any other ignorant amateurs like me are wondering what an audio driver layer has to do with web services: it turns out ASIO is also a C++ library for network programming (https://think-async.com/).
To elaborate, ASIO is arguably the de-facto standard way to do low-level networking in C++, to the point where it forms the basis for the standard library's upcoming networking library.
> What is the rationale behind going for from-full-scratch instead of packaging a copy of ASIO with the library?

Is there a way of building ASIO without Boost?

Yes, there's a standalone version of ASIO.