Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
eduwercamacaro committed Aug 6, 2024
2 parents 8518dd1 + 33133d1 commit ee380d0
Show file tree
Hide file tree
Showing 48 changed files with 802 additions and 1,089 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ The LittleHorse repository contains the following components:
- [`sdk-python`](sdk-python)
- Library for creating `WfSpec`'s in Python.
- Library for executing `TaskRun`'s in Python.
- [`sdk-dotnet`](sdk-dotnet)
- Library for creating `TaskRun`'s in .NET.
- [`dashboard`](dashboard)
- Web UI for LH.
- [`canary`](canary)
Expand Down
25 changes: 23 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.

### Local Development
They are hosted on `www.littlehorse.dev`.

## Best Practices

### Hyperlinks

First, it's recommended to use _relative_ links (eg. `../08-api.md`) rather than url paths (eg. `/api`). This is because of Docusaurus versioning.

Second, the way the auto-generatd protobuf docs is that the `#` hyperlink is the name of the `rpc`, `message`, or `enum`. Note that VSCode auto-suggests `#rpc-foo-foo` for `rpc foo`, whereas what is correct is `#foo`.

You can see this by looking at the `08-api.md`.

Lastly, when using `npm start` (local devleopment), none of the hyperlinks will work with the `#` tags. To test that:

```
npm run build
npm run serve
```

The `npm run build` command will indeed fail if you have broken markdown links.

## Local Development

```
npm install
Expand Down
3 changes: 1 addition & 2 deletions docs/blog/2023-09-08-0.5.0-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This release introduces a new status for LittleHorse, called `EXCEPTION`. The `E
* `ERROR` means an unexpected _technical_ failure occurred. For example, a `TaskRun` timed out because a third-party API was down.
* `EXCEPTION` means that a failure occurred at the _business process level_. For example, you might use an `EXCEPTION` when a customer has insufficient funds in her account to complete an order.

Just like in programming, you can throw and catch `EXCEPTION`s (and you can also catch `ERROR`s). For a blog post that goes in-depth into how LittleHorse makes it easy to handle failures in your workflows, check out our [Failure Handling Docs](/docs/concepts/exception-handling).
Just like in programming, you can throw and catch `EXCEPTION`s (and you can also catch `ERROR`s). For a blog post that goes in-depth into how LittleHorse makes it easy to handle failures in your workflows, check out our [Failure Handling Docs](/docs/concepts/workflows#failure-handling).

### LH Server Monitoring

Expand All @@ -75,7 +75,6 @@ LittleHorse Platform is now available for limited early access, and has been ins

To get started with LittleHorse Platform, please [contact us](https://docs.google.com/forms/d/e/1FAIpQLScXVvTYy4LQnYoFoRKRQ7ppuxe0KgncsDukvm96qKN0pU5TnQ/viewform?usp=sf_link).


### Persistent Variables

In LittleHorse `0.2.0` and later, you can search for `Variable`s by their value. For example, if you have a Workflow Specification that defines a variable `email_address`, you can find all Workflow Run's where `email_address == '[email protected]` by using the `SearchVariable` rpc call.
Expand Down
59 changes: 42 additions & 17 deletions docs/docs/01-overview.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
---
sidebar_label: Overview
---

# LittleHorse Overview

The LittleHorse Server is a high-performance platform for building workflow-driven applications for a variety of use-cases, including:
The LittleHorse Orchestrator is a high-performance platform for building workflow-driven applications for a variety of use-cases, including:

- Business Process Management
- Logistics Automation
- Financial Transactions
- SAGA Transactions
- Event-Driven Microservices
- **Microservice Orchestration**: The LittleHorse Orchestrator allows teams to enjoy the benefits of microservices (such as independent deployment and elasticity) while mitigating some of the challenges such as observability, error handling, and schema evolution.
- **Business Process Management**: LittleHorse is perfect for orchestrating long-running business workflows. The `WfSpec` pattern makes it much easier for your code to exactly reflect business requirements; reducing friction between Product and Eng teams.
- **Generative AI Workflows**: LLM's are fantastic, but they are prone to hallucination and sometimes don't have all the answers. When that happens, LittleHorse [User Tasks](./04-concepts/05-user-tasks.md) allow you to seamlessly put a human-in-the-loop to correct the situation.
- **Compliance**: User Tasks are also perfect for regulation-driven processes in which people from different departments within an organization must "sign off" on certain transactions.
- **Legacy App Modernization**: LittleHorse workflows can easily span across both modern microservices and legacy monoliths, allowing you to easily connect both worlds into one business process.
- **SAGA Transactions**: LittleHorse's advanced Exception Handling capabilities simplify the process of rolling back transactions across multiple systems in case of a problem (for example, canceling a shipment if payment fails).
- And more.

Building applications on LittleHorse enables engineering teams to save on infrastructure costs, reduce time to market, and deliver more robust software with less downtime.

The code for the LittleHorse Server and all clients is available at [our github](https://github.com/littlehorse-enterprises/littlehorse), but if you want to get started we recommend you check out our [Quickstart](./05-developer-guide/00-install.md). All code is free for production use under the Server-Side Public License.
The code for the LittleHorse Orchestrator and all clients is available at [our github](https://github.com/littlehorse-enterprises/littlehorse), but if you want to get started we recommend you check out our [Quickstart](./05-developer-guide/00-install.md). All code is free for production use under the Server-Side Public License.

## How it Works

An application built on LittleHorse has the following three components:

- `WfSpec` Workflow Definition
- LittleHorse Server
- A [Workflow Specification](./04-concepts/01-workflows.md), also known as a `WfSpec`
- A LittleHorse Cluster
- Task Workers

The `WfSpec`, short for Workflow Specification, is a metadata object that tells the LittleHorse Server which Tasks to schedule and when they should be scheduled. The Task Workers connect to the LittleHorse Server and execute Tasks as they are scheduled.
The `WfSpec`, short for Workflow Specification, is a metadata object that tells the LittleHorse Orchestrator which Tasks to schedule and when they should be scheduled. The Task Workers connect to the LittleHorse Orchestrator and execute Tasks as they are scheduled.

You as the user of LittleHorse define your own `WfSpec`s, and write your own Task Workers which connect to the LH Server.
You as the user of LittleHorse define your own `WfSpec`s, and write your own Task Workers which connect to the LH Orchestrator.

A depiction of where LittleHorse sits in the tech stack can be seen below:

Expand Down Expand Up @@ -68,9 +73,9 @@ At LittleHorse, we spent almost two years developing a cutting-edge system from

### Connect to Anything

LittleHorse has clients in Java, Go, and Python, with a .NET release coming in `0.6.0`. This allows you to easily integrate existing systems into a LittleHorse Workflow with minimal code change (in Java, for example, all you need to do to turn a Method into a LittleHorse Task Worker is add the `@LHTaskMethod` annotation).
LittleHorse has clients in Java, Go, and Python. This allows you to easily integrate existing systems into a LittleHorse Workflow with minimal code change (in Java, for example, all you need to do to turn a Method into a LittleHorse Task Worker is add the `@LHTaskMethod` annotation).

Additionally, LittleHorse supports integration with external systems through the [External Event](./04-concepts/04-external-events.md) feature, which allows LittleHorse Workflows to respond to events originating outside of the LittleHorse ecosystem.
Additionally, LittleHorse supports integration with external systems through the [External Events](./04-concepts/04-external-events.md) feature, which allows LittleHorse Workflows to respond to events originating outside of the LittleHorse ecosystem.

### Support Mission-Critical Workflows

Expand All @@ -80,13 +85,13 @@ Due to the synchronous nature of LittleHorse replication, we support an RPO of z

### Highly Secure

LittleHorse natively implements OAuth, TLS, and mTLS for authentication and encryption. Release `0.7.0` will include fine-grained ACL's to further lock down the system. Additionally, LittleHorse can be deployed into your own infrastructure (on-prem, private, or public cloud) so that no data leaves your four walls.
LittleHorse natively implements OAuth, TLS, and mTLS for authentication and encryption. LittleHorse also supports fine-grained ACL's to further lock down the system. Additionally, LittleHorse can be deployed into your own infrastructure (on-prem, private, or public cloud) so that no data leaves your four walls.

### High Performance

The LittleHorse Scheduler can scale horizontally to dozens or hundreds of servers. With only a handful of LH Server `Pod`s utlizing a total of just 48 cores on AWS EKS, we were able to schedule over 15,000 tasks per second. We are confident that LittleHorse can scale to meet the demands of any customer's use case.

Additionally, LittleHorse is high-performance system that introduces minimal delay. The latency between a Task being completed and the next Task being scheduled can be as low as 12-20ms; for comparison, a leading competitor's delays can 100-300ms.
Additionally, LittleHorse is high-performance system that introduces minimal delay. The latency between a Task being completed and the next Task being scheduled can be as low as 12-20ms; for comparison, a leading competitor's delays can reach 100-300ms.

### User Tasks

Expand All @@ -98,7 +103,9 @@ LittleHorse has rich and native support for assigning work to humans as well as

## What LittleHorse is NOT

As the creator of LittleHorse, we believe that LittleHorse can help almost any IT organization. However, LittleHorse is able to excel at workflow-driven applications because we consciously decided _not_ to solve certain problems, listed below.
As the creators of LittleHorse, we believe that LittleHorse can help almost any IT organization. However, the reason why LittleHorse is so useful is because we very explicitly chose to focus on the specific problem of _high-performance process orchestration._

As a result, there are several problems that we don't attempt to solve, and some systems that we are not. They are listed below:

### Fully-Featured Database

Expand All @@ -118,9 +125,27 @@ In the past, we described LittleHorse as a "microservice orchestration engine" b

Rather than being a competitor or replacement for the aforementioned runtime systems, LittleHorse is unopinionated about where your code runs. LittleHorse (and especially LittleHorse Cloud) is compatible with any deployment system; all you need to do is provide the LittleHorse Server URL to your software system and it is LittleHorse-enabled, no matter where it runs.

### Microservice-Specific Solution

You do not need microservices in order to benefit from LittleHorse.

It is true that LittleHorse solves many problems that microservice developers face (such as orchestrating transactions across multiple systems, error handling, and observability); however, you can use LittleHorse workflows with a monolithic architecture (in fact, we use this exact strategy in our LittleHorse Cloud back-office implementation).

In monolithic applications, LittleHorse can help several difficult problems such as:
* Long-running workflows that span days or weeks and require human input.
* Atomic updates to external systems and API's.
* Observability and auditing of transactions.
* Ensuring that code and business requirements are well-connected.

The way to integrate LittleHorse with a monolithic app server (for example, Spring Boot) is:

1. The app server upserts the `WfSpec` upon startup via `rpc PutWfSpec`.
2. Web endpoints (eg. REST, GRPC) on the app server result in calls to LittleHorse to run a `WfRun`.
3. The app server process also runs Task Workers to implement the tasks in the workflow.

### API Management System

LittleHorse is not an API Management System like Apigee or Kong.
API gateways like Kong and MuleSoft act as intermediaries that manage, monitor, and secure interactions between client applications and backend services. In contrast, LittleHorse orchestrates complex business processes and automates sequences of tasks across different systems. While API gateways focus request routing, traffic control, and governance, LittleHorse emphasizes process execution, task coordination, and long-running workflows.

### ETL System

Expand Down
20 changes: 10 additions & 10 deletions docs/docs/02-architecture-and-guarantees.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ The Clients create and manage metadata objects, such as `TaskDef`s and `WfSpec`s

The Task Workers and Clients are owned and deployed by you, the user of LittleHorse. The LittleHorse Server does not initiate any outbound connections to your Task Workers or Clients. Additionally, your Task Workers and Clients can run anywhere so long as they have network access to the LH Server.

The LittleHorse Server can be deployed in one of three ways: LittleHorse OSS, LittleHorse Platform, and LittleHorse Cloud.
The LittleHorse Server can be deployed in one of three ways: LittleHorse OSS, LittleHorse for Kubernetes, and LittleHorse Cloud.

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="lh-oss" label="LH OSS" default>

In LittleHorse Community, you run the LH Server free of charge in your own environment. You can get the code from our [GitHub Repo](https://github.com/littlehorse-enterprises/littlehorse), and our repo has quickstart tutorials for running LittleHorse using our public docker image.
As the LH Server is source-available under the SSPL 1.0 license, you can run LittleHorse free of charge in production on your own infrastructure. You can get the code from our [GitHub Repo](https://github.com/littlehorse-enterprises/littlehorse), and our repo has quickstart tutorials for running LittleHorse using our public docker image.

LittleHorse OSS is licensed under the [Server Side Public License](https://www.mongodb.com/licensing/server-side-public-license). Mongo has a fantastic [SSPL FAQ](https://www.mongodb.com/licensing/server-side-public-license/faq). The TLDR of the license is that you can use LittleHorse OSS for free in production without restriction unless you are offering LittleHorse-as-a-Service to external organizations.

For information on how to run LittleHorse OSS in production, check out our [Operations Documentation](./06-operations/06-operations.md).

![LH OSS logo](/img/logo.jpg)

:::note
:::info
If you are building a software application delivered over the internet (SaaS), you may do so without restriction even if your SaaS app is _powered by_ LittleHorse.

A SaaS application qualifies as "powered by LittleHorse" so long as the end product used by customers has a meaningfully differentiated API from the core LH Server Public GRPC API. For example, you can sell an e-commerce application that runs on LittleHorse OSS without restriction.
Expand All @@ -50,16 +50,16 @@ However, if a company explicitly exposes the entire LH Server Public GRPC API as
:::

</TabItem>
<TabItem value="lh-platform" label="LH Platform">
<TabItem value="lh-for-kubernetes" label="LH for Kubernetes">

LittleHorse Platform is an enterprise-ready managed installation of LittleHorse in your Kubernetes cluster. It is delivered through a subscription to a Kubernetes Operator, which takes LittleHorse from a stick-shift car (LH OSS) and turns it into a Tesla.
LittleHorse for Kubernetes (LHK) is an enterprise-ready managed installation of LittleHorse in your Kubernetes cluster. It is delivered through a subscription to a Kubernetes Operator, which takes LittleHorse from a stick-shift car (LH OSS) and turns it into a Tesla.

LH Platform is suitable for large enterprises who have strict data privacy and security requirements, and who are uncomfortable with allowing data to leave their four walls. LH Platform is highly configurable, yet it is also simple and comes with sensible defaults, 24/7 support, and hands-off upgrades.
LHK is suitable for large enterprises who have strict data privacy and security requirements, and who are uncomfortable with allowing data to leave their four walls. LH Platform is highly configurable, yet it is also simple and comes with sensible defaults, 24/7 support, and hands-off upgrades.

![LH Platform Overview](lh-platform.png)
![LH for Kubernetes Overview](lh-for-kubernetes.png)

:::note
To inquire about LittleHorse Platform, fill out the [waitlist form](https://docs.google.com/forms/d/e/1FAIpQLScXVvTYy4LQnYoFoRKRQ7ppuxe0KgncsDukvm96qKN0pU5TnQ/viewform?usp=sf_link) or contact `[email protected]`.
To inquire about LittleHorse for Kubernetes, fill out the [waitlist form](https://docs.google.com/forms/d/e/1FAIpQLScXVvTYy4LQnYoFoRKRQ7ppuxe0KgncsDukvm96qKN0pU5TnQ/viewform?usp=sf_link) or contact `[email protected]`.
:::

</TabItem>
Expand Down Expand Up @@ -87,9 +87,9 @@ The LittleHorse Server supports various security mechanisms:
* Federated identity for authentication (either mTLS or OAuth).
* mTLS to secure inter-server communication.

LittleHorse Platform supports integration with Istio, Cert Manager, and Keycloak. Additionally, since LH Platform runs entirely in your own network, your firewall rules can add an additional layer of security.
LittleHorse for Kubernetes has integrations with the Gateway API, Cert Manager, and Keycloak. Additionally, since LH Platform runs entirely in your own network, your firewall rules can add an additional layer of security.

LittleHorse Cloud will use TLS and OAuth for client authentication, and SSO for access to the LH Dashboard.
LittleHorse Cloud uses TLS and OAuth for client authentication, and SSO for access to the LH Dashboard.

## Architecture Internals

Expand Down
Loading

0 comments on commit ee380d0

Please sign in to comment.