automate remote applications using an HTTP middleman
Ruby JavaScript




I built Lackie to drive the development an application on a JavaScript platform that was so non-standard that other tools freaked out. The code is as platform-independent as I could make it, so if that's important to you it will be a good fit, but otherwise you will get better performance and support from a functionally equivalent and more robust solution such as


Lackie enables automation of remote applications using an HTTP middleman:

Ruby Client -> Lackie Service <- Remote App

Lackie automates applications running in environments that are difficult to control remotely. Lackie requires minimal support in target environments: scheduling (e.g. window.setInterval) and HTTP client capabilities (e.g. ajax).

Where it's difficult to programmatically launch the remote application, it can be started manually before the automation begins. Lackie effectively “attaches” itself to the running “zombie” application.

Lackie uses an HTTP service as a proxy for application automation commands:

1. application surrenders control to automation
2. the surrendered application polls Lackie for commands
3. the automator sends a command to Lackie
4. the application executes the command and sends the result to Lackie
5. the automator polls Lackie and receives the result (or error)


Lackie is implemented as rack middleware, so:

require 'rack'
require 'lackie'
require 'lackie/rack' do
  use Lackie::Rack::Middleware
  run MyApp

It will intercept all requests where the path starts with /lackie/

Lackie expects remote applications to:

1. poll the middleware for commands expressed as strings
2. execute those commands when they appear
3. send string results back to the middleware


The source code includes an example rack app:

rackup features/support/

Open this URL in your browser of choice:


Now you can execute commands in the remote application:

require 'rubygems'
require 'lackie'"localhost", 9292).exec("1 + 2") # => "3"