-
Notifications
You must be signed in to change notification settings - Fork 110
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
Suggestion: Use the term “channel” for publishers and subscribers #35
Comments
Hm, notice that the term channel is already taken for CSP (see #20), where it has a slightly different meaning. The important differences are:
So they're not exactly broadcast like pub/sub. That "thing" you describe is not one of these entities with single input and output sockets - instead, there can be any number of publishers and subscribers. The Wikipedia article uses the terms topic, (message) broker and (event) bus, which are fitting better imo. |
@bergus A CSP channel is what I call a stream. Although this frees up the name “channel” to mean whatever I chose in the context of this article, and although I like the channel metaphor @tomekwi describes, I see no need to confuse. I think I will use “topic” as the composite of “publisher” and “subscriber”. I also need to expand on what distinguishes streams and topics regarding “completeness” (whether messages must be replayed from the beginning through to the end for each consumer), “order” (whether there is an intrinsic order to the messages), and “integrity” (whether a message is guaranteed to be delivered, and therefore whether the producer must wait for the slowest consumer) in addition to “broadcast” vs “unicast”. Without “integrity”, a publisher can have the interface of a synchronous generator, and the consumer can have either a synchronous observer for a “discrete” topic and a synchronous iterator for a “continuous” topic. And so on if I find some time to talk about time series data and logging scenarios in detail. |
👍 maybe not as figurative – but it’s definitely a good thing to avoid confusion with CSP.
Thanks for all your effort @kriskowal. The GTOR helped me massively. It’s bull’s eye now that RP is gaining in popularity :) |
@tomekwi Please link a resource on RP. Perhaps oddly, not sure what that acronym expands to. |
I just meant Reactive Programming :) |
Ah, of course. Thanks. |
@kriskowal, by the way, I have to take back the claim that “A task has no terms for its i/o sockets.” It just occured to me that
– so it looks like a task has a promise and a resolver as well as a deferred does. You already use these terms for a task anyway, so it seems:
|
Hi @kriskowal,
every entity you define has a single term for the thing and two terms for its input and output sockets. A deferred has a promise and resolver, a stream has a reader and writer, and so on.
I’ve noticed two exceptions to this:
I suggest naming the thing a channel. The real-world analogy is a radio channels. When you publish things to a radio channel, you don’t care who’s listening. The number of listeners can be anything from zero to infinite. When listening to a radio channel you can freely switch it on and off (subscribe and unsubscribe).
The term seems to be used already:
I have no idea for naming the task sockets yet.
The text was updated successfully, but these errors were encountered: