Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: libuv integration

$
0
0
Hi Wynn,

It's an interesting idea. I see two main issues though:
  • Casablanca is built with true multi-threading in mind. Libuv, since it's from the javascript world, is fundamentally (asynchronous) single-threaded. Within the core, we try very hard to avoid using this assumption (no mutexes, for example), but it's not 100%. Within user code, a single call to .get() or .wait() will result in a deadlock unless you're certain the task has already completed.
  • We make good use of several higher-level ASIO features such as OpenSSL integration. If I'm not mistaken, these aren't present in Libuv since it's more general and less specialized. Some things could be left out at the cost of features, some things might need to be patched over or re-implemented.
I doubt the C++11 vs. C issue will be a problem if these first two can be overcome. The first step would be replacing the PPLX Scheduler with hooks into libuv.

http://microsoft.github.io/cpprestsdk/pplxinterface_8h_source.html

You may also find the MSDN documentation on the PPL very useful:

http://msdn.microsoft.com/en-us/library/dd492418.aspx

After that, I'm unsure. If you're successful, please let us know! A lot of good things could come out of node.js integration :)

roschuma

Viewing all articles
Browse latest Browse all 4845

Trending Articles