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

Multi-response #93

Open
pipermerriam opened this issue May 25, 2019 · 0 comments
Open

Multi-response #93

pipermerriam opened this issue May 25, 2019 · 0 comments

Comments

@pipermerriam
Copy link
Member

What was wrong?

Prior to the PeerBackend system that was recently introduced to trinity there was a single request/response pair that served getting new candidates for peer connections. This proved problematic because we actually wanted/needed multiple sources of new peers.

The backend system works around this by no longer having a generic event for requesting new peers, but rather having each backend source new peers via it's own mechanism.

At the time, lahja operated under a "send everything to everyone" model.

I think there is a valid case to support requests that have many responses.

How can it be fixed?

If we implement #91 then this should be possible. This would either be a new request type, or a flag on the BroadcastConfig which would result in request returning an iterable of responses. Internally, we would tack how many endpoints the request was broadcast to, require them each to ack for which we allow a response event to serve as an ack. The simple ack responses would be discarded, and the actual responses returned.

This also probably suggests that the ack API may need to allow for any response event with a mtaching filter_event_id to serve as an ack rather than restricting it to a single event type.

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