A silly usecase for WebSockets

and how it made it to the frontpage of hackernews

A handsome young man (me).
Jakob Maier
Feb 24, 2022

I made this website on 04-07-2020, inspired by a friend who, for some reason, really wanted a website where you could flic a light on and off.

At first you could do just that, but then someone asked whether other people could see whether the light was turned on or off. I thought that would be cool, so I looked at how to do it. As it turns out, it is quite easy to do this with websockets. The result is a website where you can turn a lamp on or off for everybody else to see.

I posted the website on hackernews, where it actually got to the hot page.

The lamp on hackernews

When I made the website I did not think about adding a strobe warning, because it was not necessary when it was just me and a few friends. But when more than 300 people try to hit a light switch you can imagine the result. Also, hackernews being hackernews, some people automated this and unsurprisingly crashed their browser and the website.

A hackernews comment

But some people did actually enjoy the website, so I'm happy:

More hackernews comments

You can find the website here, or try it out below:

Back to Top

Edit This Page

© 2022 Jakob Maier