Closed larsbo closed 9 years ago
Ok, I found the answer on this page: https://github.com/keen/keen-js/blob/master/docs/dataviz.md
You can use the alternative instantiation method based on the Keen.Dataviz
object and trigger the query request repeatedly with setInterval
.
Is there a chance for a push solution in future? :smile:
@larsbo glad you found what you were looking for! How would you imagine this push solution working? Open to suggestions!
I thought of websockets: http://www.html5rocks.com/en/tutorials/websockets/basics/ It has great performance and you can easily achieve real time while saving useless and costly requests.
Another technique would be webRTC: www.html5rocks.com/en/tutorials/webrtc/basics/ I never used this before but it should be even better than WebSockets.
@larsbo ahh, I hear ya – and yes, that would definitely rock :) In the meantime, perhaps that could make a really nice self-hosted middleware app that batch-and-caches queries and pushes results down through socket.io or something similar. What do you think about that?
yeah, that's a nice idea :+1: I will consider this for my future work!
BTW: I think the server infrastructure could benefit from a WebSocket/WebRTC implementation, too :-)
@larsbo I agree, I'll share w/ my team!
I wonder if there is a build-in functionality to automatically refresh a visualization. There is a very tiny section about this topic but it doesn't look up to date or reasonably finished because the used objects
count
andrequest
were not mentioned anywhere else: https://github.com/keen/keen-js/blob/master/docs/visualization.md#automatic-updates