Comments (3)
second Observable emitting items concurrently with the first one
Unless the observables are cold.
main marble diagram of Concat Operator is not fully correct and creates a bit of confusion (at least for my coworker, I was watching diagrams from RxJava javadocs), but probably it's limitation of Js library for marble diagrams.
The confusion arises if you are thinking of hot observables only. By default, RxMarbles displays cold observables. Rx is also cold by default.
That said, I understand that the RxJava diagram is more intuitive. To match that, I would need to build a custom renderer for concat (and maybe a couple of other related ones). It's doable, but I want to get other things solved first, such as a rendering for flatMap and other operators returning Observables-of-Observables.
For now, how about pointing out that these diagrams illustrate cold observables?
from rxmarbles.
There's an ambiguity, I think, about how time is represented in marble
diagrams. If time proceeds from left to right and is the same for all
observers (cue spooky floating E=mc² from the Twilight Zone intro), then
the second (cold) Observable shouldn't begin emitting items until it is
subscribed too, which won't happen until the first Observable
completes, which means its emissions should appear to the right of the
first Observable's onComplete notification.
If instead you interpret the left-to-right time as being relative to each
Observable but not the same between Observables, there's no problem with
the diagram as shown. But that approach seems to lead to misunderstandings.
I'd expect if I look over the diagrams I made for RxJava and for the
reactivex.io site, I'd find that I was inconsistent in which of the above
approaches I used. My original concat() diagram was like your rxmarbles
version, but I later changed it after I got complaints about this very
issue.
On Mon, Jul 20, 2015 at 12:24 PM, André Staltz [email protected]
wrote:
second Observable emitting items concurrently with the first one
Not if the observables are cold.
main marble diagram of Concat Operator is not fully correct and creates a
bit of confusion (at least for my coworker, I was watching diagrams from
RxJava javadocs), but probably it's limitation of Js library for marble
diagrams.The confusion arises if you are thinking of hot observables only. By
default, RxMarbles displays cold observables. Rx is also cold by default.That said, I understand that the RxJava diagram is more intuitive. To
match that, I would need to build a custom renderer for concat (and maybe a
couple of other related ones). It's doable, but I want to get other things
solved first, such as a rendering for flatMap and other operators returning
Observables-of-Observables.For now, how about pointing out that these diagrams illustrate cold
observables?—
Reply to this email directly or view it on GitHub
#22 (comment).
David M. Gross
PLP Consulting
from rxmarbles.
+1 to indicating cold/hot Observables. A toggle on subsequent Observables to switch them between cold and hot would be neat.
from rxmarbles.
Related Issues (20)
- Add another observable row
- Customize streams and export text
- pausableBuffered bug HOT 1
- Problems building web site on a Windows machine
- What are the semantics of colors, numerical values and shapes? HOT 2
- Touch support
- pausableBuffered block everything
- Rights for screenshots HOT 2
- Rewrite to RxJS 5 HOT 3
- Can't run latest code
- Clarify the sample operator example
- delay operator behavior is misleading
- Reimplement custom element example
- Why do you have yarn.lock but you suggest to use npm in the README.md?
- https: certificate problem HOT 5
- Browser stops responding when you move marble from second stream to it's beginning #infiniteLoop #bufferWhen
- Allow user to introduce empty or error event in the observable
- RxJava marble diagrams? HOT 1
- Observable.interval(ms) is confusing HOT 1
- RxJS 6 support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxmarbles.