-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Based on extensive discussion, we've come up with a new design for the data engine which is closely tied to the new design for the message bus (#1712). This is an overview of the current design where the message bus is responsible for two different kinds of communications.
- Message passing between components
- Data request/response between actors and data engines


Design v2
In the new design we want to move the data req/response flow out of the message bus -
- message bus does send, pub/sub
- data engine does data req/response
The new design
The main advantages of this architecture are -
- The internal state of the actor is not shared across threads in a closure thus removing the need for the locks
- It removes a layer of indirection between actors and data engines
We want to embrace the actor model. The actor has only one job and to process data responses. The data engine takes responses, maps them to the appropriate actor task and As it processes a data response, it can choose to communicate with other components via the message bus or send new data requests to the data engine. Internally the actor wraps state that it can share with other handlers, these handlers can be registered with the message bus and can be called by other components.

From the actors perspective this simplifies the control flow in the new design -
- data engine "drives" the actor
- actors send new data requests to the data engine - indirectly "driving" it