Hello,

I currently have an event-based C application that uses libuv for polling 
file descriptors, as well as performing async HTTP and WebSocket transfers 
using libcurl and libwebsockets' external polling support.

The application is starting to outgrow the simple "task" abstraction I've 
implemented (a "task" is a thread with its own libuv event loop and a 
message queue) and I'm looking to switch to C++ and fully embrace the Actor 
model. I have been looking at the C++ Actor Framework 
(https://actor-framework.org) and it looks promising.

Does anyone have experience with this framework, or the use of libuv in an 
application using actor-based concurrency? I'd like my actors to be able to 
register uv_handles in a uv_loop_t, but I'm not sure (a) how an actor 
should map to a uv_loop_t (one per actor? one per thread?) and (b) how to 
actually run a uv_loop_t in an application that uses CAF.

I suppose one approach would be to spawn a dedicated actor that just calls 
uv_run(loop, UV_RUN_DEFAULT), and use a message abstraction for registering 
handles and executing callbacks. Any other ideas that don't involve the 
overhead of a separate thread (or threads) for uv event loops? Could I use 
uv_backend_fd() and somehow hook a uv_loop_t into the CAF mechanics?

Thanks,
-matt

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to