Wednesday, 5 February 2014

What is The Object Network again?

I've been working on this project without really stopping to give an overview of all the elements of the Object Network. You can work it out from the articles and links, but here's everything summarised in one place.

Functional Observer

This is the basic programming and interaction model underlying everything. In a nutshell:

An object’s state is set as a Function of its current state plus the state of other objects it Observes through links. 

So imagine an object representing a light that is shining yellow. It links to another object representing the values of a dimmer. The brightness of the light depends on the value of the dimmer, so as the dimmer value observed by the light reduces, the light calculates a new RGB setting based on whatever colour it's set to, modulated by the dimmer value it can see through the link.

In the style of a spreadsheet, whenever the current light colour on the light, or the current value on the remote dimmer changes, it has work to do to set its current output in the RGB values.

I mentioned Functional Observer here and here.


Functional Observer REST simply allows our objects to reside on different host machines. They talk RESTfully over HTTP in JSON. They have URLs and exchange state using GET and POST.

I mentioned FOREST here and here.


In order to know what state to set itself - what dependencies it has on peer objects and its current state - an object needs to be programmed or "animated". It could be programmed in Java - and that's exactly what I do for some functionality in NetMash.

But we can create a language that is a direct mapping onto the Functional Observer model above. The "Function" part can be pure: you don't need I/O or side-effects when all of that is taken care of in the objects you're rewriting.

Cyrus is a pure Functional Observer language. Being homoiconic, it is based on the JSON of the objects it is animating, but with much noisy syntax removed. Cyrus rules have their own URLs, of course.

I mentioned Cyrus herehere and here.

Object Network Types

These distributed, interacting objects can form a global Object Network or graph. But only if they all look pretty much the same.

So the Object Network defines a number of simple and stable formats within JSON for common needs, such as contacts, events, feeds, articles, media, GUI layouts, users, 3D objects, IoT Things, Cyrus rules, etc.

These types can also be represented in the cleaner Cyrus syntax.

I mentioned Object Network Types here and here.


All of this is implemented in the NetMash Java code. NetMash is an Android app and a Java server. They share the same Object Network core code, including the implementation of the Cyrus language.

This whole blog is full of screenshots of NetMash in action.

No comments:

Post a Comment