How to handle Real Time Data from a database perspective?
- by balexandre
I have an idea in mind, but it still confuses me the database area.
Imagine that I want to show real time data, and using one of the latest browser technologies (web sockets - even using older browsers) it is very easy to show to all observables (user browser) what everyone is doing.
Remy Sharp has an example about the simplicity about this.
But I still don't get the database part, how would I feed, let's imagine (using Remy game Tron) that I want to save the path for each connected user in a database and if a client wants to see what is going on with a 5 sec delay, he will see that, not only the 5 sec until that moment but the continuation in time ...
how can I query a DB like that?
SELECT x, y FROM run WHERE time >= DATEADD(second, -5, rundate);
is not the recommended path right?
and pulling this x in x time ... this is not real data feed correct?
If can someone help me understand the Database point of view, I would greatly appreciate.