Cloud Action Overview

A Cloud Action transforms events and routes them between streams or to your own cloud endpoint. Transformations are done via optional JavaScript embedded in the Cloud Action.

Cloud Actions work similarly to the Edge Actions, in that their logic exists as JavaScript functions, but the "trigger" is an event being created in a Cloud Stream, not created due to an Observation. Just as an Edge Action can read data from the resources in the edge context, Cloud Actions can read and write data in the cloud context. In the cloud they have access to read and write data from other streams as well as the ability to publish or consume data from external services using REST requests.

Events can be created in streams from several different sources. One source is an Octave device with an Observation or Edge Action destination set to route data to Cloud Immediately or Store and Forward. In the case of an Observation the Stream will be created automatically as soon as the Observation is created. Events can also be created directly in streams from a Cloud Action, the User Interface, via a REST API call, or from within a periodic Task.

When new events arrive in the cloud from the device, Octave stores them in a stream and adds additional metadata. Note that both the time at the edge, as well as the time received in the cloud are stored. Having both of these times available for each event is important for more sophisticated data orchestration strategies.

Streams contain events and are organized in a hierarchy like a file system. Not only do devices have their own space, but users and companies do as well. This hierarchy plays an important role in controlling access to the data contained in events.

The hierarchy is as follows:

  • <company>: The company is the root namespace under which all Cloud Streams exist.
  • :inbox: Contains all company-wide streams showing every event that has happened on the system. For example /company/:inbox/cloud-actions shows events generated from the respective source of actions.
  • :summary-inbox: Contains redacted versions of all events under the :inbox node, with minimal information.
  • devices: Lists all devices registered on Octave. Each device can then be expanded to show its streams.
  • users: Lists all users registered on Octave. Each user can then be expanded to show its streams.

📘

Note

The ":" prefix, indicates that the Stream was generated by Octave and cannot be modified.