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

[server] How to support multiple interfaces at once? #67

Open
jamesmunns opened this issue Dec 17, 2024 · 0 comments
Open

[server] How to support multiple interfaces at once? #67

jamesmunns opened this issue Dec 17, 2024 · 0 comments
Labels
open to sponsorship This issue is something James wants, and would be willing to prioritize as sponsored/contract work

Comments

@jamesmunns
Copy link
Owner

There is some interest for having servers being able to serve multiple interfaces, e.g. offering services on both a USB and SPI port at the same time. Right now, the server is built around listening to a single interface with the Wire(Tx/Rx/Spawn) traits. I've had a few private requests for this, and at least one in public.

We may want to offer the ability to find some way to expand this. Challenges I can think of offhand:

  • How does the "plumbing" work for the server? e.g. how do we get the right WireTx for the given WireRx?
    • Right now the dispatch code only handles one of each.
    • How can we avoid "single interface" servers paying any overhead?
  • Should all interfaces offer the same services?
    • Will users only want some services on some interfaces?
    • If all interfaces don't have the same services, how does this affect key collision avoidance?
  • Should handlers be able to "know" which interface they are being called from? e.g. do they need to be passed some context?
  • How do we handle "fairness" when it comes to servicing messages?
    • Do we always "round robin" the interfaces? like ABABABABAB?
    • Will users want to be able to have "priority" for interfaces? e.g. "always serve A if there is a pending message, then only serve B if A is idle"?
    • Some other way?
  • How are topics_out publishes handled?
    • Are they sent to all interfaces?
    • Do we have separate Senders for each interface and the app has to know which to use?
  • How do we behave when one interface is up, and the other is down?
    • e.g. SPI is always connected, but USB may not always be.
    • Does this change anything?
@jamesmunns jamesmunns added the open to sponsorship This issue is something James wants, and would be willing to prioritize as sponsored/contract work label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open to sponsorship This issue is something James wants, and would be willing to prioritize as sponsored/contract work
Projects
None yet
Development

No branches or pull requests

1 participant