Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Persistent Compute Objects, or picos, are tools for modeling the Internet of Things. A pico represents an entity—something that has a unique identity and a long-lived existence. Picos can represent people, places, things, organizations, and even ideas.

...

Collections of picos are used to create models of interacting entities in the Internet of Things. Picos communicate by sending events to or making requests of each other in anActoran actor-like manner. These communications are point-to-point and every pico can have a unique address, shared by no one else, to any other pico to which it communicates. Collections of picos were used in architecting the Fuse connected-car system with significant advantage.

...

The various pieces of the pico ecosystem and their relationship is shown in the following diagram (click for enlarged diagram).

pico system relationships 

For people who've read this blog, many Many of the titles in these boxes will may be familiar, but I suspect that the exact nature of how they relate to each other has been a mystery in many cases. Here are some brief descriptions of the primary components and some explanation of the relationships.

...

The event-query API is a name I gave the style of interaction that picos support. Picos don't implement RESTful APIs. They aren't meant to. As I explain in Pico APIs: Events and Queries, picos are primarily event-driven but also support a query API for getting values from the pico. Each pico has an internal event-bus. So while picos interact with each other and the world in a point-to-point Actor modelactor model, internally, they distribute events with a publish and subscribe mechanism. More

...

Picos use the event-query API to communicate with each other. So do applications using a programming style called the pico application architecture (formerly the personal cloud application architecture). The PAA is a variant on an architecture that is being promoted as unhosted web apps and remotestorage. PAA goes beyond those models by offering a richer API that includes not just storage, but other services that developers might need. In fact the set of services is infinitely variable in each pico.

...

Wrangler

In the same way that operating systems provide more complex, more flexible services for developers than the bare metal of the machine, Wrangler provides pico programmers with important services that make picos easier to use and manage. For example, Wrangler provides services for creating new picos and creating communication channels between picos. (Wrangler was formerly known as CloudOS.)

Rulesets

The basic module for programming picos is a ruleset. A ruleset is a collection of rules that respond to events. But a ruleset is more than that. Functions in the ruleset make up the queries that are available in the event query API. Thus, the specific event-query API that a given pico presents to the world correlates exactly to the rulesets that are installed in the pico.

The following diagram shows the rules and functions in a pico presenting an event-query API to an application.

event-query model 

CloudOS Wrangler provides functionality to installing rulesets in a pico and they can change overtime just as the programs installed on a computer change over time. As the installed rulesets change, so does the pico's API.

KRL

KRL is the language in which rulesets are programmed. Picos run KRL using the event evaulation evaluation cycle. Rules in KRL are "event-condition-action" rules because they tie together an event expression, a condition, and an action. Event expressions are how rules subscribe to specific events on the pico's event bus. KRL supports complex, declarative event expressions. KRL also supports persistent variables, which is how developers access the pico's state. KRL developers do not need a database to store attributes for the pico because of persistent variables.

KRE

...

Pico Engine

The pico engine is a host or container engine for picos. A given instance of KRE the pico engine can host any number of picos. KRE is the The pico engine that makes picos work. KRE Pico Engine is an open source project, hosted on GithubGitHub.

KRL rulesets are usually hosted online. Developers register the URL with KRE a pico engine to create a ruleset ID or RID. The RID is what is installed in the picoA given ruleset can be installed in any number of picos. When the pico runs, it the engine gets the ruleset source, parses it, optimizes it, and executes it.

The diagram below shows an important property of pico hosting. Picos can have communication relationships with each other even though they are hosted on different instances of KRE. The KRE the pico engine. Pico engine instances need have no specific relationship with each other for the picos they host to interact.

hosting and pico space 

This hosted model is important because it provides a key component of ensuring that picos can run everywhere, not only in one organization's infrastructure.

More

Conclusion

Picos present a powerful model for how a decentralized, heterarchical, interoperable Internet of Things can be built. Picos are built run on open-source software and support a unbiased hosting model for deploymentengine that can be deployed on any hardware that supports Node JS. They have been used to build and deploy several production systems, including the Fuse connected-car system. They provide the means for giving people direct, unintermediated control of their personal data and the devices that are generating it.

I invite your questions and participation.

 

 

KRL

...

.

...

While rulesets are the primary organizing feature of KRL, you cannot program KRL without understanding picos. 

Event Binding

Persistent Data Variables

Rulesets

 

CloudOS

Operating systems provide significant benefits to personal computers:

  • They made the microcomputer into a personal computer.
  • They gave programmers incredible leverage through the services they provided.
  • They made it so anyone can use a computer and get something done.

An operating system can provide the same benefits to personal clouds. Because it allows you to act as a peer, a CloudOS orchestrates and coordinates online interactions, enables cooperating networks of products and services, supports intention-driven automation, and transforms the way you interact with the world.

Applications

PCAA

We have been using the model extensively for the last 6 months and have found it to be very effective for building CloudOS applications. I wrote about a largish experiment with this model in the whitepaper Introducing Forever: Personal Cloud Application Architectures. The white paper describes an application, called Forever, that uses picos to represent a social graph for purposes of creating an evergreen address book. The interface is built in an unhosted style using nothing but JavaScript. The picos provide the business logic and persistence layer. We called this the "personal cloud application architecture" or PCAA.

I wrote a simple Todo list application that used picos to store and manage todo list items do illustrate the simple calls that could be used to merely store and retrieve data from a pico's PDS in a simple PCAA. I describe that example in Building an App Using the Personal Cloud Application Architecture.

Developers building applications using the unhosted, PCAA style can sometimes get away without really thinking too much about the underlying model, but sophisticated applications will require a more detailed understanding. Developers programming picos to implement a particular system, of course, will need to be skilled at event-query systems in order to implement an effective and easy-to-use API. We're still developing our knowledge of how they work, how best to document them, and the best ways to promulgate our findings.