Adding a service

Services are service end-points connected by SPARKL. They communicate with each other with the help of operations. You can add a service by dragging and dropping it at the Canvas panel.

Procedure

  1. Open the Editor.
  2. Select the component on the Components panel.
  3. Drag and drop the component at the Canvas panel.
    The new component is displayed on the Canvas panel.
  4. Click the new component on the Canvas panel.
  5. Enter a name for the component on the Settings panel.
  6. Specify an entity that SPARKL can use for provisioning.
  7. Optional: Define the dependencies of the service, if applicable.

Results

A new service is created. This service can now implement operations.

Figure: Adding a service


What to do next

The actual configuration of a service, such as a piece of code, has to be defined as a property for the service.

Service provisioning

Services can be provisioned using SPARKL extensions. See here a list of core and optional extensions.

Table 1. Service provisioning with SPARKL extensions
Attribute value Core or optional Description
sequencer Core extension Services provisioned using the Sequencer extension can process transactions.
expr Core extension The Expressions extension supports the use of Erlang expressions in SPARKL.
subr Core extension The Subroutine extension supports subroutine transactions called by a caller operation.
Note: The subroutine specification is defined on the caller and callee operations on the svc_subr service.
rest Core extension The Rest extension lets users integrate external service implementations written in JavaScript or Python.
phidget Optional extension The Phidget extension allows you to map Phidgets sensors, motors and interfaces to fields.