Skip to content
electronicwhisper edited this page Jan 27, 2012 · 1 revision

Often creating these hacks is not about creating programs, rather about cleverly sending data between programs--glueing them together.

One can appreciate the importance of glue by an analogy with carpentry. A chair can be made quite easily by making the parts - seat, legs, back etc. - and sticking them together in the right way. But this depends on an ability to make joints and wood glue. Lacking that ability, the only way to make a chair is to carve it in one piece out of a solid block of wood, a much harder task. This example demonstrates both the enormous power of modularisation and the importance of having the right glue.

John Hughes, Why Functional Programming Matters

Glue Protocols

Here's a list of glue protocols, organized by the type of data being sent, and then by whether over the same computer or over the network. I've bolded protocols that are extremely useful.

Small data (numbers, strings, arrays, hashes)

Same Computer

  • OSC - probably the most general/useful protocol for these messages
  • MIDI

Network

  • OSC
  • UDP
  • TCP/IP

Images (including video)

Same Computer

  • Syphon - shares images over the video card, optimized for performance
  • CamTwist - routes images through the webcam interface

Network

  • VNC
  • VLC - not sure how to do this, but it streams

Remote procedure calls

Same Computer

  • Command Line - often programs can be communicated with through the command line interface
  • Applescript
  • "Robot" (e.g. in Processing) - is there something like this for OF? Maybe we should make a Robot OSC?

Network

  • HTTP - often used to talk to web services (i.e. APIs)