- An open source server application (this application,
microservice
.) - The open source
inbox
application (which could be used by bothplatform
andmicroservice
) to handle HTTP requests - The open source
dispatcher
application (which could be used by bothplatform
andmicroservice
) to execute jobs usingOpenFn/core
. - A Dockerfile that, given a
job
, anadaptor
, and acredential
, is able to automatically generate a container that runs the microservice for that job.
- Using an existing open-source framework we will create a basic, secure REST API.
- The REST API will be able to receive an authenticated HTTP POST request with a valid JSON body, respond with a 202/Accepted, and pass that body to a handler.
- When called with a JSON body, the handler will prepare an initial “state” which includes the relevant credential and the data provided by the REST API and call OpenFn/core/lib/cli.js with the following arguments: (1) the job to execute, (2) the state, (3) the language-package to utilize, and (4) the desired output path to write the logs.
- Once developed, this microsevice will be containerized using a technology like Docker, such that it could be quickly and easily deployed, alongside many others like it, on virtually any server.
- The containerized microservice could be deployed to servers, ideally cloud-hosted, which provide users with as much out-of-the-box monitoring, logging, administration, and introspective abilities as possible.
- Developers may choose to deploy with jobs, credentials, and triggers built-in to the container, or may choose to pass them in as environment variables.