Wednesday, 18 January 2012

Automated twits from a workstation, using IFTTT

When optimizing parameters of stochastic systems you can have hard time predicting when the process is going to end. It would be nice if the workstation itself warns you when it's done, just like Joshua used to give Lightman a call asking him to keep playing

Hello, Mr. Falken. You are a hard man to reach.
Telephone calls are demodé, anyway. It is much more web 2.0 if the workstation twits you that the jobs are completed and you can check the results out (or something went wrong and you gotta fix the code and so on).

Twitter does offer a RESTful interface for directly twitting stuff around, but handling the authentication takes a lot of work and time (that I don't have, actually). So, I tried something different. Something like this:

Spannometric :) sequence diagram of the system
The key of the process is IFTTT, a nice tool that "[puts] the internet to work for you by creating tasks that fit this simple structure if-this-then-that". In this case, IF "a new message from the workstation is received" THEN "twit the message to @aresio", message that is then forwarded to my Android terminal automatically. IFTTT does a 15' polling, so it's not a real-time thing, but pretty close.

Almost anything was already done, I just glued the pieces together by developing all the stuff on the web server: a simple RESTful interface exposed to the workstation and a plain RSS feed; matter of five minutes, and it works.

Thanks Joshua!