A story-first newsletter for frontend devs who want to stand out, earn more, and engineer their ideal career
Streaming over the web at the speed of light
Published about 1 month agoย โขย 2 min read
Technology has advanced faster than I could ever imagine
Years ago, the things we're doing now would be UNTHINKABLE. We're going even further beyond what anybody could think of doing. Isn't it beautiful? ๐ฅน
Wait, you think I'm talking about AI? The Chinese did what? Deepseek who? Pffff, no no no my dear developer, I'm talking about the advances in networking!! ๐
I'm currently on vacation, about 400 kilometers away from home
I left my Playstation 4 sleeping before I left. Every few days, just for fun, I can decide I want to play on vacation using "remote play".
I boot up the PlayStation app on my laptop, hook up my controller through a USB cable, and press "connect". After 2 minutes, a streaming connection is set up between my computer and my console, which I remind you, are 400 km away from each other.
I get the video output from my PlayStation streamed to my computer. I can then send inputs from my controller to my console, with a minimal delay of less than a tenth of a second.
I cannot BEGIN to communicate to you how magical this is
I need you guys to understand that for streaming to be the thing it is today, worldwide and available everywhere with little to no lag...
Information nowadays is transported at the speed of light, thanks to the use of fiber cables
Here is an optic fiber cable and the type probably used to get internet to your home. Also, a big reason why I'm able to play God of War on Vacation
The basic idea behind fiber cables is that light is used as the method to transport signals over long distances. There are different types of cables depending on the occasion (single-mode fiber for extremely long distances, multi-mode for others), and they each have their use case. Then, a very complex and pretty boring explanation of the use of a large network of many protocols and standards, alongside devices like repeaters, amplifiers, modulators, etc., is used to get the information where it needs to be.
All you have to know is this stuff is absolutely bonkers and a beautiful mess that somehow works for all our benefit
And if you're a front-end developer who's never dipped their toe into the world of networking, this email serves as a small nudge to start if you're curious. While obviously, it's pretty far from the usual work we do, knowing at least a little will help you the day you have to implement something that uses streaming of some kind.
Because guess what, streaming is a thing you can do with Javascript!
That's how the browser versions of services like Microsoft Teams or Discord can let you talk, share your camera, and show your screen all in real-time. While admittedly, I've never had the pleasure to work with streaming in the browser, I did do a little digging and found that if I ever did have to, I'd probably have to use the WebRTC API. And uhh, probably watch a few tutorials to get the general gist of how it works ๐
But I'm not going to do that because I'm on vacation and I spent the last hour telling you about fiber cables. So if you don't mind, I think I'm going to head back to the beach ๐
But if you're curious to learn about it and want to dive right in, I'd say have a blast! And let me know if you build anything cool with it.