Let's say I have two independent streams of different events: EventA and EventB. Which is the best way to get all the occurrences of EventB that happened between the last 3 occurrences of EventA?

For example:

from: $b1:EventB, $a1:EventA, $b2:EventB, $b3:EventB, $a2:EventA, $b4:EventB, $b5:EventB, $a3:EventA, $b6:EventB

I would like to get $b2, $b3, $b4, $b5

Best Regards,


 

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com