Versions Compared

Key

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

...

  • is capable of receiving events and queries on Internet channels,
  • interacts with other picos, even if they're hosted on another instance of the evaluator somewhere else on the Internet, and
  • can call and be called from Internet-hosted APIs.

The Picos respond to events and queries using two different URL schemes. Events are sent to a pico using the Sky Event API. Queries are made using the Sky Cloud API

The Sky Event API describes the event API pattern for a pico including what components are important and how those components are encoded in an HTTP method (GET or POST). The specific API for a given pico, however, depends on which rules are installed since it is rules that respond to events. Similarly, the Sky Cloud API defines the patterns for queries that a pico understands. Again this is a meta-API since the queries that any given pico responds to depend on the modules installed. Queries are thus implementable with different code than the event processing and, in practice, tend to be much faster.

A pico has multiple URL's that can be used to query its state and send it events. HTTP is used as the transport protocol.

events

Here is a sample URL that sends an event to a pico like the one you created in the Pico Engine Quickstart:

...

  • "http://" identifies HTTP as the protocol
  • "localhost:8080" is the domain name and port of the pico-engine which hosts the pico
  • "sky/event" identifies this as an event for the pico
  • "citdel5gz00012aaoo5ucc613" is one of the pico's event channel identifier identifiers (ECI) (yours will be different)
  • "echo-hello" is an arbitrary string which serves as an event identifier (EID) (useful when looking at logs)
  • "echo" identifies the domain of the event
  • "hello" identifies the type of the event

...