I have a question. I want to adopt oatpp.io, but I'm using a synchronous database driver mongo-cxx-driver. Can I still benefit from oat++'s coroutine? Also, when using coroutine, will the server be a single-thread process? or it will be a multiple thread process with each thread using coroutines (to fully utilize the cpu)?
If my server wants to visit third party rest APIs in an asynchronized way, what's the best asynchronized library to choose to make use of coroutine?
// Also, when using coroutine, will the server be a single-thread process?
// or it will be a multiple thread process with each thread using coroutines (to fully utilize the cpu)
- Yes, it will be a multiple thread process with each thread using coroutines.
You can configure how many threads should run the AsyncHttpConnectionHandler.
Number of threads is passed to the AsyncHttpConnectionHandler constructor.
Also you may tweak it in compile time via option:
"-D OATPP_ASYNC_HTTP_CONNECTION_HANDLER_THREAD_NUM_DEFAULT=<num of threads>"
You have to play with this parameter in order to achieve best performance.
In most cases on :
- Linux it's value should be (<num of CPUs> - 1).
- On MacOS it's value should be 2.
Perhaps my NVidia tablet is out of date but that link comes up secure connection failed under Firefox Focus. I have not done deep dive to study but not a common issue for me with focus. (Edit: might be intermediate cerificates issue.)