Ask HN: How to learn how to develop real time applications?

5 points by creatorcoder ↗ HN
I am a C++ programmer and I want to learn how to develop real-time programs. It looks like it's a "lost art" these days.I think we all use such programs every day to one degree or another. For example, if you work with a network, then you probably use wireshark. If you work with audio, then you probably use something from this field. What do I mean by real-time apps? These are applications where we have a part that creates data (or a data stream, with high frequency) and a part that processes it (or gui part, if we somehow process it). I would like to focus specifically on network applications. I'll say right away that I've already read Richard Stevens book[1], but it doesn't seem to be enough to develop applications of this level.

[1] Richard Stevens - Unix Network Programming

7 comments

[ 1.4 ms ] story [ 23.7 ms ] thread
pick something you actually use.. wireshark, a simple packet sniffer, anything and just reverse engineer how it handles the producer/consumer split. that gap between capturing data and displaying it without dropping frames is where all the interesting problems live.
Multiplayer games are a type of application that requires real-time networking. Try reading "Multiplayer Game Programming: Architecting Networked Games" by Josh Glazer and Sanjay Madhav. Another type of programming with essential real-time is microcontrollers. You can dig into this way.
Build your own network audio microphone and speaker. Don't cheat by adding a giant buffer. Cause problems on the wifi and figure out how to compensate for those problems.
Here is how I do it in JavaScript: https://github.com/prettydiff/aphorio

What you need is:

* low overhead full-duplex transmission, which for the web is WebSockets

* service data, which is network messaging in a predefined format for an application to complete a task

* event-oriented architecture, which is that the application automatically executes a thread in response to interactions or observed changes

(comment deleted)