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

Add a @pub kwarg to allow specifying a "startup response message" #258

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

goodboy
Copy link
Owner

@goodboy goodboy commented Nov 1, 2021

This is a fix for an (old and) undocumented feature that enabled async generator based "pub-sub" streaming such that during stream connection startup an initial "message" is sent to each new subscriber much like how the new tractor.Context.started() works for bidirectional streaming setup.

This patch in particular was pulled out of historical work on the infect_asyncio branch.

I'm not even sure this undocumented internal "pub sub" api should even be kept since it is basically just a multiplexed (read non-task oriented) version of what you can already do easily with our task-broadcast receiver apis and a single producer actor.

It's probably worth making a so called dynamic pub-sub example using the newer APIs for comparision, maybe do some brief perf benchmarks and then decide if we should just drop this interface?

@goodboy goodboy added messaging messaging patterns and protocols question Further information is requested labels Dec 27, 2021
@goodboy
Copy link
Owner Author

goodboy commented Dec 27, 2021

I'm thinking we should do a rewrite of this using the new bi-dir streaming + MsgStream.subscribe() apis and completely drop this internal subsystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api messaging messaging patterns and protocols question Further information is requested streaming
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant