Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Latest commit

 

History

History
71 lines (45 loc) · 2.5 KB

README.md

File metadata and controls

71 lines (45 loc) · 2.5 KB

Logo Logo

Executor Service

The Topos Executor Service executes cross-subnet messages on receiving subnets.

example workflow example workflow

Prerequisites

Redis

The Executor Service implements a queue pattern that leverages redis. To start the Executor Service, you will need to run a redis server in the background:

docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest

Environment

The Executor Service requires a local environment to be set up.

Create an .env at the root of the project, with the content of .env.example, and fill the revelant env var values.

Authentication (Auth0)

The Executor Service leverages Auth0 for machine-to-machine authentication and authorization. We use Auth0's machine-to-machine service as we are not authenticating/authorizing users but applications (e.g., dApp frontends) that will use the Executor Service as a call delegation for their users' cross-subnet messages.

users => dApp frontend ==call==> sending subnet
                       \=call==> executor service ==call==> receiving subnet

Any application calling the Executor Service must be registered on Auth0 as a new Application. Once authorized to use the Executor Service API, the relevant Auth0 client id and secret can be set within the execution environment of the calling application.

Regarding the Executor Service's execution environment (see environment), AUTH0_AUDIENCE and AUTH0_ISSUER_URL should be set with values provided in our documentation.

Getting Started

Install NodeJS by following the guidelines from the official NodeJS website.

Install Dependencies

To installation npm dependencies, run the following command:

npm i

Run the Executor Service

To start an instance of the Executor Service, run the following command:

npm start

License

This project is released under the terms of the MIT license.