Clik here to view.

photo – camknows
When writing apps for Holiday, there are three paths you’ll be able to take, as we will be defining, implementing and documenting three different APIs. Each has their strengths and weaknesses. You’ll want to pick the one that’s best suited for your application.
IoTAS (REST & JSON)
IoTAS is a full web server, implemented in Python (using Bottle.py and Cherry.py), that provides both the server for the web apps to control Holiday, and a rich API so that the Holiday globes can be individually controlled, animated, and so forth. All access to IoTAS is through HTTP: either standard GET requests, or through PUT and POST requests that access various features of the API.
IoTAS apps can either run locally on the device – using cURL or the Python requests module to manage communication with IoTAS – or they can run on any other device anywhere on the Internet. For this reason, IoTAS is the preferred method to link Holiday to events and processes outside of itself.
Within the next fortnight we’ll upload our existing (bare-bones) implementation of IoTAS to GitHub so you can have a look, pull it, and have a play.
Python (pipelights)
It is possible to write pure Python applications on Holiday. Python provides such a range of capability for such a small investment of time, it provides the easiest pathway to construct applications that run on Holiday. Python is well connected (and we will have the requests and feedparser modules available as standard components) so it is ideal for reading and interacting with remote data sources. If you can think of other interesting Python modules we should include in our standard set, please let us know!
The downside of Python is that it incurs a substantial start up penalty. It takes a few seconds for the interpreter and modules to load. This isn’t a huge issue if your application runs for a long time, but if it is expected to wake up at short intervals, do something quick, then exit, it probably isn’t ideal.
We will be implementing a module loader architecture that allows pure Python Holiday applications to load and run from within the IoTAS framework. This means there is no startup time (IoTAS is always running as a demon process), but as Python runs as a single process, a complex Python application could slow IoTAS’ ability to process REST API calls.
To drive the string of globes, we’ve implemented a compositor daemon – currently known as ‘pipelights’, though this will likely change – which provides a named pipe to which 50 color triplet values can be written, and producing a corresponding change in the colour of the globes on the string. Writing 50 values to a file object is a very efficient operation in Python, and we’ve had no trouble getting flicker-free animations using this technique.
Native (Sing framework)
Finally, for those of you who feel the need for speed, we are providing the ‘Sing’ framework, which is essentially a ‘C’ language implementation of the Processing framework. Fill in the body of the setup() and loop() functions, and Sing does the rest. With a small API of function calls to control the globes, Sing provides a guaranteed 50 Hz loop-call-time so that you have exactly what you need to produce smooth animations.