Reactive: group observable sequence by count

Hi there

i have a reactive question that i can’t solve…

let’s assume the following:

  • i have a bang
  • when i press the bang, some system starts, giving me a sequence of observables during the next second or so.
  • i know the number of observables before (when i press the bang)
  • i now want to ‘group’ those observables into one, so each time i press the bang, i get one observable handing me the X values

it’s a bit hard to describe, so please see the attached patch

ReactiveGroup.vl (28.5 KB)

do you mean a sequence of events on one observable instance? or actually a sequence of observable instances that can send many events?

If it is one observable instance, then you can use Buffer to buffer N events into one ReactiveX - Buffer operator

1 Like

Ui, the buffer seems right, I try that!

Only thing is, that I have varying counts… I’ll report

i illustrated the question a bit better:
ReactiveGroup2.vl (80.5 KB)
(a patch says more than thousand words)

A hack:

ReactiveGroup2b.vl (82.4 KB)

1 Like

With Scan [Reactive.Observable] (instead of Scan [Reactive]). It’s possible to do this:


1 Like

Found some more:

ReactiveGroup3b.vl (107.2 KB)

I think this topic really needs some explanations (for example Reactive vs. Reactive.Observable) and help patches. Even better a workshop (at the nodeinstitute): All things Reactive @joreg / @david ?