Description
mirai
and crew
are new packages for distributed distributed computing similar to future
. They can both leverage their parallel computing capabilities to create custom promise objects, as described at https://shikokuchuo.net/mirai/articles/promises.html for mirai
and at https://wlandau.github.io/crew/articles/promises.html for crew
(also c.f. wlandau/crew#147, wlandau/crew#149). The promises seem to work, but they do rely on polling with later::later()
, which may not be as efficient or as kind to the CPU as a truly event-driven approach.
It would be great if promises
could provide a general solution for triggering callbacks asynchronously, or if the documentation could describe how to implement a successful event-driven pattern. I am not sure if anything like this currently exists, but there may be possibilities using the nanonext
package. nanonext
is a low-level R client for the NNG messaging library, which in turn provides network protocols, asynchronous I/O, and perhaps most importantly for this issue, synchronization primitives such as condition variables which can be configured to respond to local network events.
This thread is part of a follow-up on recent conversations with @shikokuchuo and @jcheng5.