Release Notes of Engine v0.11, CLI v1.1 and JS library v4

New Engine gRPC APIs

This release introduces new gRPC APIs to replace the previous ones. These new APIs are resource oriented, follow the CRUD convention and identify each resource with a unique hash.

Each group of APIs (one per resource) implement the same subset of the functions: get, list, update, delete and stream:

  • Get returns one resource specified by its hash
  • List returns an array of resources matching the specified filter
  • Update modifies one resource specified by its hash
  • Delete removes one resource specified by its hash
  • Stream notifies any creation, update or deletion of the resources matching the specified filter

It’s now easier to know exactly what is going inside the Engine and how resources interact with each other.

Update of mesg-js

The update of the Engine’s APIs have consequently broken the internal logic of the mesg-js library. But don’t worry, we’ve kept as much as possible of the public API of the lib for easy updating.

To update, run:

npm install mesg-js@4.1.0

Service side

The functions on the service side haven’t changed. Only a few Typescript type names have been modified. In most cases, you should only update the library without changing the source code.

Application side

The functions on the application side have changed a little bit.

The parameters of listenEvent and listenResult now require a object filter that contains the actual criteria. All serviceHash have been replaced by instanceHash as it’s the new way the Engine is starting services.

mesg.listenEvent({
  filter: {
    instanceHash: 'EVENT_INSTANCE_HASH',
    key: 'EVENT_KEY' // optional
  }
})
.on('data', (event) => {
  console.log('an event received:', event.key, JSON.parse(event.data))
})

The automatic resolution of SID has also been removed from the Engine and should now be done by the application. We added a helper function to do this easily:

const instanceHash = await mesg.resolve('SID_OF_THE_SERVICE')

Updated mesg-cli

The same commands have been kept and the internal logic has been updated to make it work with the latest Engine version.
To update the CLI, run:

npm install mesg-cli@1.1.0

Internal changes in Engine

New Instance database

A new resource has been introduced: Instance.

An Instance is the living version of a Service. It makes it possible to start many Instances from the same Service as long as their environmental variables are different. Services are now only static definitions of events, tasks, configurations and dependencies. The service definition also contains the service’s source code as an IPFS hash.

You can still create, delete, list and get Services. But service subcommands: start, stop, logs, and execute now require an Instance Hash.

Chain of Executions

The execution database has been transformed to prepare for the next big feature: Workflows.
Executions can now reference previous executions, have improved state and better event integrations. These changes are also reflected in the gRPC APIs.

Introduction of SDK package

The architecture of the Engine has been reorganized to implement an SDK package that should allow developers to integrate the Engine in a Go project on a much lower level than with the gRPC APIs. The package is divided into small packages per resource.


The complete changelog of the Engine can be found on Github.

The complete changelog of mesg-js library can be found on Github.

To update to Engine v0.11, follow the installation process on the documentation