OSC, Node.js and socket.io

We needed a way for users to communicate with our interactive pieces, and for those pieces to communicate with each other. We decided to use a shared language that all applications could understand, and OSC (Open Sound Control) was a natural fit. This offered a friendly learning curve and broad support across environments such as Processing, ActionScript, Arduino, and openFrameworks.

To manage the communication traffic, we used Node.js, a server-side JavaScript runtime, together with the modules Socket.io and Node-OSC. This combination handled all messaging, allowing us to build applications that received real-time input from smartphone clients and could sync and broadcast across devices. The server shared OSC data with multiple interactive applications as needed.

The key advantage of this setup was that all client interfaces remained web-based, enabling interaction from across the room or across the network. Because the entire communication layer was written in JavaScript, it was both powerful and flexible.

System diagram for QR-driven interaction at CCS, 2011

Late in development we discovered high-level libraries like Express and Now.js, which likely would have saved us time, but the process itself was invaluable. It remains unclear whether Node’s asynchronous nature improved performance or throughput, but it is something worth exploring further.