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

Subscription and Websocket multiplexing #1764

Open
gbjk opened this issue Dec 26, 2024 · 0 comments
Open

Subscription and Websocket multiplexing #1764

gbjk opened this issue Dec 26, 2024 · 0 comments
Assignees

Comments

@gbjk
Copy link
Collaborator

gbjk commented Dec 26, 2024

Overview

Now that subscription configuration is nearly universal, we can start to address abstracting the solution, and learning from the issues with multiplexing subscriptions.

Required features:

  • Support connections per asset class
  • Support runtime subscriptions, including FlushChannels
  • Enabling pairs after subscription must work
  • Support N+ connections due to subscription cap or rate-limiting

Design

  • Remove Subscriptions and GenerateSubs from belonging to connections
    The most pressing reason for that is that in a world where we might establish N+ connections due to connection rate limiting,
    We can't possible generate the right subscriptions and (in the darkness) bind them at the connection level.
    I believe Subscriptions must be an exchange level entity, which are then allocated to websockets in a one-to-one relationship.
  • Router middleware to map connections and subscriptions
  • Just-in-time connections after the first connection
  • Separate Subscription configuration from runtime subscriptions
    • So that "All pairs" continues to work with FlushChannels
    • So we can always re-derive the store from the fanned out subscriptions
  • Unify the does/doesn't nature of multi-connection websockets. Everything should just be the same

References

@gbjk gbjk self-assigned this Dec 26, 2024
@gbjk gbjk moved this to In progress in GoCryptoTrader Kanban Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

1 participant