node.js - Could you help me about Websocket and Real Live Data Strem for Grid -
i have no experience node.js , websocket.
i checked socket.io , did example chat . it's working .
now wonder how can socket.io chat sample need data stream grid.
for example; have forex data feed , want real live update on html5 web site .
there example ?
socket.io chat , looks powerfully don't know how ot them data table.
i checked jquery plugins not working chat example. not real live data can say.
i want css manipalation on html side , when price down or when price up.
please me if know these things .
thank you.
if need transform data on stream, perhaps use node.js module called scramjet. allow modify data on fly, before pushing them page via socket.io. example if compress data little
const io = require('socket.io').listen(8080); yourforexstream.pipe(new scramjet.datastream) .filter((forexitem) => typeof forexitem.tick !== "undefined") // don't send heartbeats, ticks .map((forexitem) => forexitem.tick) // send tick data .on("data", (tick) => io.emit("tick", tick)); // broadcast socket.io
Comments
Post a Comment