Here's anything i am toying with. It is not authoritative nonetheless it seems to work:
Whenever data will come in from websocket, put it in a buffer. Push the callbacks (we'll describe those below), delivering the buffer as debate. Look at the return signal for "success" or "wait for lots more data". Triumph implies information had been delivered to cubism therefore we can pull this callback.
When cubism needs a frame of data, set up a callback which monitors in the event that last part of the buffer is following the last point cubism requested. Usually, watch for more data.
If there's data to pay for the stop associated with the required frame, we are going to satisfy this request. Without an API to request history, we must drop data going into the last.
Then, simply interpolate the buffer onto the cubism action size.
It appears as though cubism needs information from the same stage several times, so it is your decision how to prune your buffer. I do not think it is safe to just drop all data prior to when the requested begin time.