Carriots SDK composition

Carriots SDK is composed of:

SDK engine

Carriots SDK engine is based on Java technology. It’s goal is to execute Groovy scripts in a user context. It provides those main functionalities:

  • Communication protocol implementation between the engine and the listeners
  • Security
    • Execution time
    • Memory consumption
    • Libraries encapsulation
  • Entity visibility delimitation through Carriots Authentication service. Each user will only see own data
  • Build a context for each execution

Communication protocol

Communication between a listener event’s dispatchers and Carriots SDK engine follows a REST API approach. Internally coded in JSON format, the protocol has two main parts:

  • Request composed by the context and the code be executed
  • Response composed by:
    • Code: 200 (OK) or 4004 (error)
    • Message: response message
    • Details: more response details

This structure can be seen in Carriots console response.

  • Sentence example in Terminal

Libraries

Carriots SDK provides support for standard Groovy libraries.
For example:

Refer to http://docs.groovy-lang.org/latest/html/gapi/ for more information about Groovy API

Carriots SDK API is completed with its own set of libraries divided in two main parts:

  • Carriots core entities management: com.carriots.sdk
  • Carriots utility classes: com.carriots.sdk.utils