Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse batch message worker for both relay contexts in a bi-relay context #21

Open
soareschen opened this issue Feb 15, 2023 · 0 comments
Assignees

Comments

@soareschen
Copy link
Collaborator

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.

@soareschen soareschen self-assigned this Feb 15, 2023
@soareschen 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
@soareschen soareschen transferred this issue from informalsystems/hermes Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant