https://github.com/open-runtimes/open-runtimes
Open runtime environments for serverless cloud computing ⚡️
https://github.com/open-runtimes/open-runtimes
cloudnative devops docker faas functions hacktoberfest kubernetes lambda runtimes serverless
Last synced: 4 months ago
JSON representation
Open runtime environments for serverless cloud computing ⚡️
- Host: GitHub
- URL: https://github.com/open-runtimes/open-runtimes
- Owner: open-runtimes
- License: mit
- Created: 2022-01-29T19:57:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-02-11T18:36:06.000Z (4 months ago)
- Last Synced: 2026-02-11T20:56:04.383Z (4 months ago)
- Topics: cloudnative, devops, docker, faas, functions, hacktoberfest, kubernetes, lambda, runtimes, serverless
- Language: PHP
- Homepage:
- Size: 34.6 MB
- Stars: 273
- Watchers: 10
- Forks: 68
- Open Issues: 57
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-java - Open Runtimes
README
# Open Runtimes ⚡️

---
[](https://discord.gg/mkZcevnxuf)
[](https://travis-ci.com/github/open-runtimes/open-runtimes)
[](https://twitter.com/appwrite)
Runtime environments for serverless cloud computing for multiple coding languages, aiming to create a consistent and predictable open standard for writing cloud functions in containerized systems.
- [Open Runtimes ⚡️](#open-runtimes-️)
- [Features](#features)
- [Roadmap](#roadmap)
- [Images](#images)
- [Architecture](#architecture)
- [Load Balancer](#load-balancer)
- [Executor](#executor)
- [Adapter](#adapter)
- [Runtime](#runtime)
- [Function](#function)
- [Build](#build)
- [Structure](#structure)
- [Testing](#testing)
- [Contributing](#contributing)
- [Security](#security)
- [Follow Us](#follow-us)
- [License](#license)
## Features
* **Flexibility** (WIP) - Designed to work with multiple orchestrators using different adapters. For now only Docker and Swarm are supported, Kubernetes support is planned.
* **Performance** - Cold starts in less than ~100ms & executions in less than 1ms.
* **Wide Support** - Supports 11 (and counting) different programming languages and 18 (and counting) different runtimes. Adding new ones is straight forward.
* **Open Source** - Released under the MIT license, free to use and extend.
* **Ecosystem** - Fast growing ecosystem of ready-to-use functions for easy reuse on different platforms.
## Roadmap
* Kubernetes Adapter - Native cloud support and easy deployment
* Official CLI - Easy deployments
* Catalog - Browse the open-runtimes functions ecosystem
* Autoscaling - Automated scaling features based on hosts and runtime metrics
## Images
| Name | Docker Hub | README | Pulls |
| ------- |--------------------------------------------------------------------------------|----------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| C++ | [openruntimes/cpp](https://hub.docker.com/r/openruntimes/cpp) | [README](/runtimes/cpp/README.md) | [](https://hub.docker.com/r/openruntimes/cpp) |
| Dart | [openruntimes/dart](https://hub.docker.com/r/openruntimes/dart) | [README](/runtimes/dart/README.md) | [](https://hub.docker.com/r/openruntimes/dart) |
| Deno | [openruntimes/deno](https://hub.docker.com/r/openruntimes/deno) | [README](/runtimes/deno/README.md) | [](https://hub.docker.com/r/openruntimes/deno) |
| .NET | [openruntimes/dotnet](https://hub.docker.com/r/openruntimes/dotnet) | [README](/runtimes/dotnet/README.md) | [](https://hub.docker.com/r/openruntimes/dotnet) |
| Java | [openruntimes/java](https://hub.docker.com/r/openruntimes/java) | [README](/runtimes/java/README.md) | [](https://hub.docker.com/r/openruntimes/java) |
| Kotlin | [openruntimes/kotlin](https://hub.docker.com/r/openruntimes/kotlin) | [README](/runtimes/kotlin/README.md) | [](https://hub.docker.com/r/openruntimes/kotlin) |
| Go | [openruntimes/go](https://hub.docker.com/r/openruntimes/go) | [README](/runtimes/go/README.md) | [](https://hub.docker.com/r/openruntimes/go) |
| Node.js | [openruntimes/node](https://hub.docker.com/r/openruntimes/node) | [README](/runtimes/node/README.md) | [](https://hub.docker.com/r/openruntimes/node) |
| PHP | [openruntimes/php](https://hub.docker.com/r/openruntimes/php) | [README](/runtimes/php/README.md) | [](https://hub.docker.com/r/openruntimes/php) |
| Python | [openruntimes/python](https://hub.docker.com/r/openruntimes/python) | [README](/runtimes/python/README.md) | [](https://hub.docker.com/r/openruntimes/python) |
| Python ML | [openruntimes/python-ml:v5-3.11](https://hub.docker.com/r/openruntimes/python-ml) | [README](/runtimes/python/versions/ml-3.11/README.md) | [](https://hub.docker.com/r/openruntimes/python-ml) |
| Python ML | [openruntimes/python-ml:v5-3.12](https://hub.docker.com/r/openruntimes/python-ml) | [README](/runtimes/python/versions/ml-3.12/README.md) | [](https://hub.docker.com/r/openruntimes/python-ml) |
| Python ML | [openruntimes/python-ml:v5-3.13](https://hub.docker.com/r/openruntimes/python-ml) | [README](/runtimes/python/versions/ml-3.13/README.md) | [](https://hub.docker.com/r/openruntimes/python-ml) |
| Ruby | [openruntimes/ruby](https://hub.docker.com/r/openruntimes/ruby) | [README](/runtimes/ruby/README.md) | [](https://hub.docker.com/r/openruntimes/ruby) |
| Swift | [openruntimes/swift](https://hub.docker.com/r/openruntimes/swift) | [README](/runtimes/swift/README.md) | [](https://hub.docker.com/r/openruntimes/swift) |
| Bun | [openruntimes/bun](https://hub.docker.com/r/openruntimes/bun) | [README](/runtimes/bun/README.md) | [](https://hub.docker.com/r/openruntimes/bun) |
## Architecture

### Load Balancer
The Load Balancer get requests for endpoints and responsible for balancing and scaling the requests between multiple hosts where runtime executors are available. This is the layer where you want to implement auto-scaling and keep track of which host has which runtimes available to allow wise spending of computing resources.
### Executor
The Executor is responsible for starting runtimes (AKA cold starts), and directing requests, environment variables, and user inputs to each runtime. In addition, the Executor will also be responsible for managing timeouts, max runtime allowed in parallel, and cleanup of inactive runtimes in the chosen interval.
### Adapter
The Adapter is a software layer component that interacts with the container orchestration engine to manage the compute runtimes.
### Runtime
The Runtime is a containerized isolated environment to run user-provided code. The runtime is spinning an HTTP TCP server on startup from one of the supported languages and handles requests on demand. Multiple runtimes of the same function can potentially run on the same or multiple hosts.
### Function
The Functions is a user provider packaged of code that is mounted to each Runtime and is executed inside the isolated environment. The package code should already be compiled and provided with all required dependencies.
### Build
The Build is composed from a queue and set of workers, the build process receives the raw codebase from the filesystem or a VCS and compiles or packages it with all dependencies. The build help with providing the dev's Function as a ready-to-execute codebase for the Runtime.
## Structure
All runtimes share a common basic structure, but each additionally adds runtime-specific files to properly support it's package manager.
```
.
├── src
│ ├── (runtime-specific, like index.js)
├── example
│ ├── (runtime-specific, like server.js)
├── helpers
│ ├── after-build.sh
│ ├── before-build.sh
│ ├── before-start.sh
│ ├── build.sh
│ └── start.sh
├── docker-compose.yml
├── Dockerfile
├── README.md
└── (runtime-specific, like package.json)
```
| Name | Description |
|-------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------- |
| src/ | Contains source code of HTTP server of the runtime server |
| example/ | Contains a sample function to demonstrate the usage of the runtime server |
| helpers/ | Contains bash scripts that helps with simple build and start process. Can be ignored for more complex solution. |
| docker-compose.yml | Configuration to easily run the example code with `docker-compose up` |
| Dockerfile | Instructions to build a runtime, install it's dependencies and setup the runtime server. These images are usually based on official alpine or ubuntu. |
| README.md | Runtime specific documentation |
Structure of `helpers/` directory follows:
| Name | Description |
|-------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------- |
| before-build.sh | Mirroring of function code from mount directory to build directiry. Do changes inside build directory if needed. |
| after-build.sh | Append .open-runtimes file, gzip file, and store into mount directory. Do post-build changes to build output if needed. |
| build.sh | Shortcut combining `before-build.sh`, your custom build command (like `npm install`), and `after-build.sh`. |
| before-start.sh | Extracting of function build from mount directory into server's directory. Do changes to server directory if needed. |
| start.sh | Shortcut combining `before-start.sh` and your custom start command (like `npm start`) |
Every request sent to any of the runtimes must have the `x-open-runtimes-secret` header. The value of this header has to match the value of environment variable `OPEN_RUNTIMES_SECRET` set on the runtime. All example scripts use `secret-key` as the key and we strongly recommend changing this key before production use.
## Contributing
All code contributions - including those of people having commit access - must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.
We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the [contribution guide](CONTRIBUTING.md).
## Security
For security issues, kindly email us at [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue on GitHub.
## Follow Us
Join our growing community around the world! See our official [Blog](https://medium.com/appwrite-io). Follow us on [Twitter](https://twitter.com/appwrite), [Facebook Page](https://www.facebook.com/appwrite.io), [Facebook Group](https://www.facebook.com/groups/appwrite.developers/) , [Dev Community](https://dev.to/appwrite) or join our live [Discord server](https://discord.gg/mkZcevnxuf) for more help, ideas, and discussions.
## License
This repository is available under the [MIT License](./LICENSE).