Skip to content
doublewera edited this page Oct 28, 2010 · 1 revision

You can access our "magic system" by http using terminal name and a secret key. It looks like computer's login and password.

If you want to write a python or javascript application, you can use ready python or javascropt kernel which contains all necessary mechanisms of communication with the hub. Just include the source of the kernel and call kernel.sendMessage to send json-objected messages to other applications.

All the descriptions below is for the developers.

First time you login, the hub register you name if not exists and bind it to your secret key. If you know a hub url you can try this:

http://hub_url/connect?tid=%s&key=%s

If no tid passed hub generates a random tid.

Hub will return a json object like:

{ "status" : 0, "repo" : "/repo/", "hubid" : "097tr654erivuyvgftxew", "tid" : "" }

If status is 0 your've connected successfully. Repo is your repository location Hubid is you hub identifier Tid is your secret terminal id.

Create the disconnect function to say the hub about the end of your work: http://your_hub_url/disconnect?tid=YOUR_SECRET_TID

Your mx function should send arrays of messages from your local applications to the other applications by using (get or post request): http://your_hub_url/mx?tid=YOUR_SECRET_TID&messages=MESSAGE_ARRAY

Message array is array of json objects. Each message should contain src and dst. See each application description for more info.

Clone this wiki locally