How to understand Observables, in light of Subscriptions/Promises

Inspired by the beautiful visual language of RxMarbles for combining async sequences,

I couldn’t help but creating a Rosetta Stone video comparing these concepts, in order that those familiar with Promises and Meteor Subscriptions could understand how to work with this really powerful toolset of Observables

Here’s my video:

Also: ‘My Why Observables’ Top 10 List

5 Likes

Nice explanation :slight_smile:

Sometimes I have the urge to include some kind of “observability” in ViewModel. Kind of like signals work (name stolen from Elm), but for user generated events/data. I always scrape the idea because VM already works quite nicely with other observable methods (like Meteor subscriptions), so I haven’t had an “a-ha!” moment. When I dipped my toes in Elm a few years ago, as soon as I saw the way it handled event signals, I said “I want that for VM!”.

1 Like

Yeah, it’s just like Signals- and I agree it’s not a thing that completely replaces everything else. But combined with other tools built on observables I’ve been able to get pretty far… Here’s some multi-stage game logic implemented with ‘Epics’ if you’re interested @manuel https://www.youtube.com/watch?v=LkPqdG9KMMo

Love your input!

Kinda hard to follow with the low resolution but if I understand it correctly epics are a sort of converters of your streams. They take one or more stream of inputs and produce an output stream. The docs say “events in -> events out” but I don’t see why it only have to be events.

If that’s the case, aren’t epics just a concept? That is, you already have the tools to implement “epics” (there isn’t an epic api).