Create an EventBus
Closed this issue · 1 comments
avaidyam commented
- Local EventBus supports publish() and un/subscribe().
- EventBus in an Endpoint can also support sync() to cross network boundaries.
- i.e.
from A:node.publish() —> localBus.sync() —> remoteBusses[].sync() —> [Subscribers].nodes.callback()
avaidyam commented
This is actually pointless as Cortex
acts as an "ad-hoc typed event-bus". i.e. Cortex.getNodes().stream().map(...).collect(...)
coupled with Future.all(...)
or FutureLatch
does the job while keeping events typed (that is, the call is made to msg(args)
and not onEvent(String msg, Map<String, Object> args)
.