Skip to main content

Overview

Unmeshed is a highly-scalable orchestration platform for automation of resilient and durable business processes. In this document, we'll dive into a few of the high level abstractions that make Unmeshed tick, and how information flows through them.

The three most important abstractions in Unmeshed are Processes, Steps and API Mappings. Processes represent workflows that are designed to automate business goals, such as inventory rebalancing, customer onboarding, and so on. Steps are the individual tasks executed as a way to achieve the Process' goal. Finally, API Mappings is the Unmeshed mechanism for exposing Processes as APIs.

Video Overview

An example

Centered
Data Flow in Unmeshed

A clear understanding of how data flows through Unmeshed’s various abstractions is essential for effectively using the platform. What follows is a simple example to help us follow data as it progresses through a Process.

Let's imagine that you want to improve the latency between your iOS app and your backend by combining multiple server calls into one. This is a fairly well known pattern, and one that Unmeshed excels at implementing rapidly and at scale.

For the purpose of this example, let's say that the iOS app needs to send a customer email, and in return get a list of past purchases. For that, you need to access your /userService to get the customerId, and then use that id in order to get the list of orders from the /ordersService.

What are the moving pieces?

For this API Orchestration you would need to configure the following items:

  1. An API Mapping that exposes your Process as an API to your iOS app
  2. A Process that accepts a customerId and returns an orderList
  3. Steps that collect the relevant information from the various endpoints
Centered
Sample Process Definition

Flow

  1. The API call triggers the Process, setting customerEmail as Process Input. This input is then persisted into the Process Context (marked in yellow), now accessible to any Steps within the Process.
  2. The Process executes Steps in order. Every Step has its own Step Context, which governs the Step's behavior using the inputs set in its own context.
  3. The first part of our Process is to fetch the customer id using the customerEmail. For that, we'll use the HTTP Get Step, preconfigured with information such as URI, port, and headers in its Step Context inputs. Importantly, it would also include the customerEmail as a parameter from the Process Context. The response payload would then be stored in the Step Context's output.
  4. The next Step would also be an HTTP GET Step, except it would use the first Step's output to call the /ordersService API. Once it gets the payload, it would also set it as its output.
  5. The last Step needs to integrate the two payloads into one the iOS app can process. For this example, we could use a JavaScript Step. The Step accesses the results from the two other StepContexts, forms the right json payload, and sets its own output as what the iOS client needs to receive.
  6. When all Steps are complete, Unmeshed takes the last Step's output and sets it as the Process Context's output.