Corvusoft / restbed

Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.
http://www.corvusoft.co.uk
Other
1.92k stars 379 forks source link

Questions in Reference to the Documentation #415

Open jade2k11598 opened 4 years ago

jade2k11598 commented 4 years ago

1) In the documentation design and elsewhere on dependency, it notes the dependency on ASIO and I take it that this is the Boost ASIO that it's referring to. In the section of Thread allocation, there's the following code snippet:

auto settings = make_shared< Settings >( );
settings->set_worker_limit( std::thread::hardware_concurrency( ) );

Service service;
service.publish( resource );
service.start( settings );

where the set_worker_limit sets the number of threads to be spawn for ASIO to use, to delegate tasks for processing. That settings gets passed to the Service. Now is the ASIO instance actually own by the Service? Is it possible to get access to the ASIO instance if one wants to post other tasks (unrelated to the Service), for processing? I only ask to avoid having to instantiate another instance of ASIO in the same executable.

Also, is there a way to set the priority level of those threads?

2) I was also looking at the HTTP Client example and it noted that this was deprecated and refers to this Restless instead, which looks like a different code base from restbed. What does this mean? Is restbed being deprecated? Or only use restbed for the server side and restless for the client side?

viba1 commented 1 year ago

Same question concerning RESTBED client, tag as "deprecated" in documentation and in code. The message invite to "see restless for an alternative implementation". But at the same time, restless project seems discountinued since 5 years ago (last commit on May 20, 2018).