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

subman API #561

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

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 3 times, most recently 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
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch 2 times, most recently from 2ecde85 to 9e15e5a Compare February 24, 2025 16:32
@ksedgwic ksedgwic changed the title WIP: subman API subman API Feb 24, 2025
@ksedgwic ksedgwic marked this pull request as ready for review February 24, 2025 16:51
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch from 9e15e5a to e730b14 Compare February 24, 2025 21:57
@jb55 jb55 linked an issue Feb 25, 2025 that may be closed by this pull request
@ksedgwic ksedgwic force-pushed the 2024-12-submgr-sketch branch from e730b14 to 76bfe3e Compare February 27, 2025 00:52
@ksedgwic
Copy link
Contributor Author

rebased on master

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.

Initial subscription manager.
2 participants