Consider the following two streams of events. Each event has a timestamp / ts and value property.

I want to combine these two streams, where events have the same timestamps, into a resulting stream with a value conversion attached. If one thread does not have one timestamp (for example, yellow ts=3 in the example below), this timestamp should be ignored.

I would like to solve the problem using a reactive programming library such as xstream or rxjs . I am completely new to reactive programming concepts, but if anyone has a different suggestion, I'm all ears. Thanks!
hampusohlsson
source share