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

WIP: subman API #561

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

Conversation

ksedgwic
Copy link
Contributor

@ksedgwic ksedgwic commented Dec 9, 2024

No description provided.

@ksedgwic
Copy link
Contributor Author

I bet we could make the SubEndpoint a scoped object which automatically unsubscribes when it is dropped ...

@ksedgwic
Copy link
Contributor Author

I'm missing the outer flow on outbox ... is this right?:

  1. user clicks to view thread
  2. we one-time fetch k:10002 for author and determine authors relays
  3. we subscribe to the thread with SubConstraint::OutboxRelays(author_relays)
  4. SubMgr evaluates relays, possibly changes current set
  5. user disposes of thread view, we remove subscription (and reevaluate relays)

OutboxRelays means "make sure we have at least one of these in our active set"

@ksedgwic
Copy link
Contributor Author

It might be useful to have a SubConstraint::Local which only queries local and doesn't alter remote subscriptions

@jb55
Copy link
Contributor

jb55 commented Dec 10, 2024

liking the sounds of this so far!

@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch from 6edfa9c to a2f9e6c Compare December 10, 2024 23:19
@ksedgwic
Copy link
Contributor Author

  • I force pushed the first commit, cleaning up the compiler comments etc
  • the second commit makes the SubReceiver (was SubEndpoint) scoped and unsubscribes when it goes out scope.

Is the second commit a good thing? I used an Arc<Mutex> to calm rust re: the SubMgr reference issues ...

@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch 3 times, most recently from e469fe3 to c5969bf Compare December 18, 2024 01:04
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch from c5969bf to e92e6ca Compare December 18, 2024 19:23
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch from e92e6ca to 084bd54 Compare December 19, 2024 00:45
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch 3 times, most recently from ea0425e to c769a6e Compare February 12, 2025 18:55
@ksedgwic
Copy link
Contributor Author

Renamed to subman

@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch 4 times, most recently from d503afa to cd41b1c Compare February 17, 2025 17:15
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch 2 times, most recently from d686f7a to b9ca1ef Compare February 21, 2025 01:43
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch from b9ca1ef to bd9060c Compare February 22, 2025 00:44
@ksedgwic ksedgwic changed the title WIP: rough subscription manager API proposal WIP: subman API Feb 22, 2025
Next: close relays when no subscriptions need them
- local relays are very doable, but not sure if we want them
- forced relays want to be implemented in the pool/subman and need
  more definition
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch from bd9060c to 2ecde85 Compare February 23, 2025 23:42
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

Successfully merging this pull request may close these issues.

2 participants