-
Notifications
You must be signed in to change notification settings - Fork 40
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
Subscribable is to observable as _what_ is to enumerable? #131
Comments
The simplest way to look at this might be to consider plain Rx—the Calling Calling So there's a sense in which the So then moving back to the Reaqtive world, with its augmented concept of subscription, the subscription object returned by This might sound surprising because people often talk about the
So when going from pull to push, we go from the consumer fetching items to the source pushing items. But when it comes to deciding to stop early, that's a consumer-driven decision in both worlds. Even in Rx's push-based world, it's still the consumer of events that gets to decide that they want to stop early. This leads to an asymmetry in the design. In the pull world, both the receive next and the terminate operations are initiated by the consumer invoking a method on the So in the pull world, there needs to be a bidirectional association between source and consumer. The source needs to be able to invoke the consumer's The equivalent concept in But what about traversal of the computation graph? Well that's the main reason I said to look at the original Rx version: subscriptions in that world didn't provide such a service, which was exactly consistent with the fact that enumerables don't offer a way to do that either. Reaqtive makes subscriptions slightly more powerful, with this ability to walk the computation graph. But there is no equivalent of this in the pull world. You could imagine some augmented alternative to |
Subscribable.Subscribe returns a subscription which gives us a way to traverse the computation graph of our subscribables. What would be the equivalent for enumerables?
I know I'm supposed to 'flip the arrows' to figure this out, but I'm struggling. @bartdesmet are you around to walk me through this?
(For context, I'd love the flexibility to go push-to-pull in a processing pipeline. I'm trying to understand what this new enumerable interface might look like where I could implement the ability to walk the operator graph, across the push-to-pull boundary, for things like checkpointing.)
The text was updated successfully, but these errors were encountered: