5 ms·
Did you consider libuv? If so why asio over libuv. I've never taken time to benchmark them, but I have built web servers on both. Libuv has broader api support
by imoldfella 12y ago
Did you consider libuv? If so why asio over libuv. I've never taken time to benchmark them, but I have built web servers on both. Libuv has broader api support like cross platform file aio. Asio has more convenient c++ bindings, but there are some third party bindings that I haven't tried.
- matt42 12y agolibuv could be one of the futur backends yes. But with microhttpd silicon is able to handle more req/s that most other web frameworks. I am more focused on stabilizing the code base, documentation, and adding support for other databases.
- nly 12y agoAsync filesystem I/O isn't a priority for modern webapps / HTTP API endpoints that primarily just slam a database. That said, I somewhat agree wrt ASIO. I've not quite been able to get ASIO to put out the reqs/sec, and the API is iffy in some areas, even when using C++14. Imho it's tolerable with the coroutine integration, but then debugging becomes a nightmare (forget exceptions because basically every socket operation can and will throw if the client does anything iffy)
- matt42 12y agoI also think that with async/await probably coming with the next c++ standard, we will be able to write much simpler async code in plain C++, without Asio.