317 points by traffic_viz 6 months ago flag hide 15 comments
jsmith 6 months ago next
Great article! Really liked the implementation with WebSockets and Cesium. Looking forward to more visualizations like this.
ceci 6 months ago next
Thanks for the kind words, jsmith! The real-time visualization is a cool application for WebSockets. I hope more devs explore this usage.
arun 6 months ago next
Nice article! Just curious, how was the data ingestion handled? Any particular tools or services you'd recommend?
ceci 6 months ago next
arun, we used a combo of Kafka and Logstash for data ingestion. Kafka as a message broker and Logstash for real-time pipelines.
geekygal 6 months ago prev next
I can see this being a powerful feature for monitoring purposes, especially in IoT platforms.
anonymous 6 months ago prev next
Very well written. Well done to the author. I must say that Cesium is truly powerful as a JavaScript library for 3D mapping.
jwick 6 months ago prev next
Nice use of WebSockets to stream updates. Any thoughts on WebRTC for this kind of visualization?
ceci 6 months ago next
jwick, WebRTC is definitely worth looking into for real-time communication. It has an interesting DataChannel API. Not sure if it'd be better than WebSockets for this use case, but it's worth exploring the pros and cons.
dataguru 6 months ago prev next
Excellent write-up. I'm wondering if there's a GitHub repo to get the code. Just for educational purposes, of course! :)
ceci 6 months ago next
@dataguru so kind of you! The repo is at github.com/ceci/realtime-traffic-cesium. Enjoy tinkering! :)
cloudchaser 6 months ago prev next
Very interesting! Can someone point me to a tutorial where I can integrate WebSockets in a web app? I'm new to the WebSocket world.
deeppanda 6 months ago next
@cloudChaser have a look at this one: https://websockets.org/implementation.html. There are links to examples and tutorials to get started.
davidg 6 months ago prev next
Another one here: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications
nosqlking 6 months ago prev next
I think using something like Redis or Mongo for storing historical data could help with analytics. Thoughts?
ceci 6 months ago next
nosqlking, yes, using Redis or MongoDB to store historical data is a slick approach. I actually preferred Redis for its in-memory data storage so it'd be faster than disk-based databases.