3 ms·
Show HN: New Hacker News posts and comments in realtime
Hi HN, I made a live feed for viewing all of the new items on Hacker News in almost-realtime. It is a single, modern HTML file that doesn't use polling.
It works by establishing a websocket connection to the Hacker News Firebase database, to receive updates every time the HN server updates Firebase, which is about once every 30 seconds. This is very efficient, putting no load on HN's server and using minimal bandwidth.
To make the feed continuous despite the delay, it waits to display each item until exactly 30 seconds before displaying it. I think this is a fair tradeoff, it gives you a sense of how active HN is. For comparision, there are something like 6-7 thousand tweets every second.
Official HN Firebase API: https://github.com/HackerNews/API https://github.com/HackerNews/API
Source code: https://github.com/jerbear2008/hn-live/blob/main/index.html https://github.com/jerbear2008/hn-live/blob/main/index.html
- gus_massa 3y agointeresting idea, but I think it's better to change the logo so it's clear that this is not an official site.