You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the MessageBroker with Pub/Sub architecture. All messages coming in from the comms layer will be published under the TariMessageType topic. A Subscriber will be available for all services. This can be used to create a subscription to any number of message types they're interested in.
The text was updated successfully, but these errors were encountered:
This PR contains the building blocks for async p2p services.
It consists of the following modules:
* builder: contains the MakeServicePair trait which should
be implemented by a service builder and the
StackBuilder struct which is responsible for building the
service and making service handles available to all the other services.
Handles are any object which is able to control a service in some way.
Most commonly the handle will be a transport::Requester<MyServiceRequest>.
* handles: struct for collecting named handles for services.
The StackBuilder uses this to make all handles available to services.
* transport: This allows messages to be reliably send/received to/from
services. A Requester/Responder pair is created using the transport::channel
function which takes an impl of tower_service::Service as it's first parameter.
A Requester implements tower_service::Service and is used to send requests
which return a Future which resolves to a response. The Requester uses a
oneshot channel allow responses to be sent back. A Responder receives a
(request, oneshot::Sender) tuple, calls the given tower service with that
request and sends the result on the oneshot::Sender. The Responder handles many
requests simultaneously.
Notes:
This PR adds the rust feature #![feature(existential_type)] to reduce the need
to box futures in many cases - more info here: rust-lang/rfcs#2071
TODO:
Hook up pub/sub messages from the comms layer. (Ref #644)
Replace the MessageBroker with Pub/Sub architecture. All messages coming in from the comms layer will be published under the TariMessageType topic. A Subscriber will be available for all services. This can be used to create a subscription to any number of message types they're interested in.
The text was updated successfully, but these errors were encountered: