Nonstop Progressive Marxism
Miss any of our Open RFC calls?Watch the recordings here! »

This version has been deprecated

Author message:

Exosphere is deprecated

exosphere-sdk

0.5.2 • Public • Published

Exosphere SDK

Rails for micro-service based cloud-native applications

Circle CI

This is the command-line interface of the Exosphere SDK.

Architecture

This SDK consists of the following components:

  • exo-install command: Sets up a freshly cloned Exosphere application by running the setup scripts for each service.

  • exo-run command: Starts a properly set up (using exo-install) Exosphere application by launching all of its services.

  • feature specs: written in Cucumber

  • ExoComm-dev: development version of the Exosphere communication infrastructure

How to use

  • install this SDK on your machine

    npm i -g exosphere-sdk
    
  • download an Exosphere application, for example SpaceTweet

  • set up the application:

    cd <application folder>
    exo-install
    
  • start the application:

    exo-run
    

Message protocol

The message protocol used in this prototype is optimized for extreme simplicity. This is to encourage experimentation and implementations using many different languages.

  • ExoComm sends messages to your service via an HTTP POST request to

    /run/<message name>
  • the request body is a JSON data structure with the format:

    {
      requestId: <the ID of this message, as a UUID>
      payload: <optional, a string, array, hash, or null>
      responseTo: <optional, the requestId of the message responded to
    }
    
  • your service can send replies or new outgoing messages via an HTTP POST request to

    http://localhost:<exocomm-port>/send/<message-name>
  • the request body is like in incoming requests

Build your own service

Converting an existing service into an Exoservice requires only two steps:

  • listen at the port provided via the environment variable EXORELAY_PORT for incoming requests to

    /run/<message name>
    

    and understand the messages sent to your service this way

  • send out messages and replies via POST requests to EXORELAY_URL

  • if you do this with a lot of services, try to use an (or build your own) service framework like Exoservice-JS

Development

see our developer guidelines

Keywords

none

Install

npm i [email protected]

Version

0.5.2

License

ISC

Last publish

Collaborators

  • avatar
  • avatar
  • avatar