Monday, 13 January 2014

The Functional Observer Programming and Distribution Model

I thought I'd pick up on the final two paragraphs in my recent post on Monads, where I described an alternative approach to using them: simply accept objects and their states, and then have pure functional transitions between those states.

This approach is the basis of the programming and distribution model I call "Functional Observer". Functional Observer is the foundation of the Object Network.

In Functional Observer, an object may observe other objects through links. When an observed object's state changes, the observer object may change its own state. That new state is a pure function of the new state of the observed object, the states of other linked objects, and the current state of the observer.

Below is an example in a picture: there's a Ticket object linking to its corresponding Order object. For a given state of the Ticket and the linked and observed Order, the Ticket's next state is a pure function of those two visible states:
State can be either pulled when needed, or pushed when updated.

Functional Observer is the basis of FOREST (Functional Observer REST), the Object Network's distribution model, and of Cyrus, its native programming language.

I'll be elaborating more on this family in future posts.

No comments:

Post a Comment