(Classic) Sorting It All Out: SquareTag, CloudOS, and KRL

Getting started can be a big leap because there are so many things that are different about programming in KRL for SquareTag and other CloudOS-based systems:

  • To begin with KRL is a rule-based language. 
  • KRL primarily follows an event-based programming model. 
  • KRL programs execute with a cloud-based model; there is no way to execute them from the command line.
  • KRL programs are loaded from the cloud using HTTP. 
  • KRL programs execute in a system where identity is pervasive; all events are raised on behalf of a specific entity.
  • KRL programs have built-in, entity-specific persistent storage; there is no need for external databases.

The result of these properties is a programming model that more closely resembles programming cloud-based persistent objects than anything else. We call these persistent computational objects "picos". 

KRL is executed by the Kinetic Rules Engine (KRE), a open-source, cloud-based rule processing system. All of the properties listed above are present in any KRE system. 

While KRE has systems for managing identities and rulesets, it does not contain any user interfaces for those facilities. CloudOS is an open-source set of KRL rulesets that provide vital services on top of KRE. In addition to entity and ruleset management, CloudOS provides services that make it easy for programmers to create and manage large collections of picos, easily send notifications to users, and manage shared data repositories. 

But CloudOS is merely a set of services, not a user interface. We anticipate that there will eventually be many CloudOS-based systems. SquareTag.com is a CloudOS-based system for experimenting with the Internet of Things. SquareTag.com provides a user interface and facilities for connecting things and people together. 

As you read the documentation, you might see "SquareTag application", "CloudOS application" and "KRL ruleset" used interchangeably. Technically, KRL rulesets could run in KRE without SquareTag or even CloudOS services if they don't make use of anything they provide. Similarly, while all SquareTag applications are necessarily CloudOS applications, the reverse need not be true. 

An analogy that might help is the following 

ifKRLis likeC
thenCloudOSis likeLinux Kernel
andSquareTagis likeLinux Distro

The following diagram shows that in more detail

CloudOS services are running on top of KRE. Applications use those services. SquareTag is a special set of services and applications that create a specific experience. 

 

Copyright Picolabs | Licensed under Creative Commons.