I am developing real-time interactive visualization, using meteor and react on the front-end. The visualization which is fairly complicate to initiate, but relatively easy to update with atomic changes. Thus, I need to fetch the data once, transform the data, compute layout and then observe (atomic) changes on the data and update the visualization.
My problem is: How shall I handle the case, when changes occurred on the data in the time, between the the time the data was fetched, transformed and the visualization was initialized and the time we start to observe for changes ?
|---(subscription-ready)---(fetch)---(transform-data)---(compute-layout)----------------------------->
|---(subscription-ready)---------------------------------------------------------------(observe-changes)--->
|---------(change1)---------(change2)---------------------------------------------------------------------------->
I was thinking about starting the change-observation first, saving an timestamp right before I start to observe the data, fetching the data, transforming and computing the layout afterward and queuing all the changes till the moment the visualization is ready.