title: Split node.js event stream based on unique id in event body
body: <p>I have a node.js-based location service that produces events as users move about, and I want to use RxJS to process these events and look for arbitrarily complex patterns like a user enters a region and visits 2 points of interest within 1 hour.</p>
  
  <p>To begin with I need to split the stream of events base on unique user ids (from event body), but I am not finding any stock RxJS functions that will do this. </p>
  
  <p>filter() would require that all uuids be known beforehand which is not desirable.
  groupBy() looks like it would need to process the entire sequence prior to returning the grouped observables, which is not possible.</p>
  
  <p>I'm thinking that maybe I need to build a custom observable that maintains a map of uuids to observables, and instantiate new observables as required. Each of these observables would then need to undergo identical processing in search of the pattern match, and ultimately trigger some action when a user's movements match the pattern. One of the obvious challenges here is I have a dynamically growing map of observables being produced as user enter the system and move about.</p>
  
  <p>Any ideas how something like this could be achieved with RxJS?</p>