title: How to join two event streams on a common event property?
body: <p>Consider the following two event streams. Every event has a timestamp/ts and value property. </p>
  
  <p><a href="https://i.stack.imgur.com/MAfka.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MAfka.png" alt="Input stream"></a></p>
  
  <p>I want to combine these two streams where the events have the same timestamps, into a resulting stream with an applied transformation of the value. If one stream is missing one timestamp (such as the yellow <code>ts=3</code> in the example below), that timestamp should be disregarded.</p>
  
  <p><a href="https://i.stack.imgur.com/5odQn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5odQn.png" alt="enter image description here"></a></p>
  
  <p>Would like to solve the problem using a reactive programming library such as <a href="https://github.com/staltz/xstream" rel="noreferrer" title="staltz/xstream">xstream</a> or <a href="https://github.com/Reactive-Extensions/RxJS" rel="noreferrer">rxjs</a>. I'm quite new to the concepts of reactive programming, but if someone has another suggestion I'm all ears. Thanks!</p>