```mermaid flowchart TD A[Gateway + ConnectionPool] -->|Emissary Channel UUID| B(Emissary) B --> C[ConnectionPool + GatewayClient to GW] C --> T[Batch Coordinator] T -->|Notary One Channel UUID| D[Notary 1 + GatewayClient] T -->|Notary Two Channel UUID| E[Notary 2 + GatewayClient] T -->|Notary Three Channel UUID| F[Notary 3 + GatewayClient] ``` | | | | | | Column 1 | Column 2 | Column 3 | | --- | --- | --- | --- | --- | -------- | -------- | -------- | | | | | | | | | | | | | | | | Text | Text | Text | We don't want to farm out reservation We _want_ to farm out authorization # Action Items * Add support for generic value in `monetae_gateway::session::ConnectionPool` so we can suport `Cursor<Item = SenderStream>>` for `<V>` * implement a trait for a cursor object to use `get_sender()`, use [`RoundRobinCursor`](https://github.com/knox-networks/core/blob/f4c133e1a6b76a0951ba389239664fd306d4f995/emissary/src/connections/round_robin.rs#L14-L34) as an example * implement packet proxying from Emissary `GatewayClient` to Emissary `ConnectionPool` * `impl<D> proto::svc::gateway::MonetaeGateway for EmissaryService<D>` 1. Emissary uses `proxy::connection::establish_connection` withing `GatewayClient` to establinsh _inbound stream_ for 2. Add notary field to CPF 4. Emissary creates `ConnectionPool` to hold one or more Notary `SenderStream`s 5. Within `context.rs` Emissary gets inbound GW packets and: - Reading the CPF notary - sending the the CPF to the correct `SenderStream` after using the appropriate `ConnectionPool` `<V as Cursor>::next()` - if the notary on CPF does not exist, simply ignore it - Notary outbound packets are sent to Emissary `GatewayClient` - packet should be intercepted and the sender field should be modified to use Emissary PK rather than Notary - Add passthrough for BatchCoordinator (discuss) Goals: * Allow multiple notaries with the same or different PK to connect to the same emissary * Future proof for batching What is being left out: * CPF batching * reservation coordinator