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
In the constructor functions such as new_relay_context_with_batch, a batch message worker is spawned for each relay context created. However this means that messages from two relay context couple in a bi-relay context cannot be batched together by the same batch worker.
The spawning of batch message worker should instead be done in the constructor for a bi-relay context, so that they can be shared between the two relay contexts.
Details
For the case of FullCosmosRelay, the sharing can be done by creating one sender/receiver pair for the batch worker, then set it as the source channel for one relay context, and the destination channel for the other relay context.
A better way to manage the construction and spawning of the batch message worker can be done in informalsystems/hermes#3083, to define a bi-relay builder component that manage the sharing and spawning of the batch message workers.
The text was updated successfully, but these errors were encountered:
soareschen
changed the title
Reuse batch message worker both relay contexts in a bi-relay context
Reuse batch message worker for both relay contexts in a bi-relay context
Feb 15, 2023
Summary
In the constructor functions such as
new_relay_context_with_batch
, a batch message worker is spawned for each relay context created. However this means that messages from two relay context couple in a bi-relay context cannot be batched together by the same batch worker.The spawning of batch message worker should instead be done in the constructor for a bi-relay context, so that they can be shared between the two relay contexts.
Details
For the case of
FullCosmosRelay
, the sharing can be done by creating one sender/receiver pair for the batch worker, then set it as the source channel for one relay context, and the destination channel for the other relay context.A better way to manage the construction and spawning of the batch message worker can be done in informalsystems/hermes#3083, to define a bi-relay builder component that manage the sharing and spawning of the batch message workers.
The text was updated successfully, but these errors were encountered: