A distributed Function-as-a-Service (FaaS) service.
Build and run service:
docker-compose up -d
Create a lambda:
POST http://localhost:8000/api/v1/lambda
Request body:
{
"name": "sum",
"description": "Sum numbers.",
"runtime": "java",
"source": "<sample>"
}
Source code sample:
import java.util.List;
public class SumLambda {
public static Number compute(List<Number> numbers) {
System.out.println("Running sum lambda...");
return numbers
.stream()
.reduce(0, (a, b) -> a.doubleValue() + b.doubleValue());
}
}
Execute lambda:
POST http://localhost:8000/api/v1/execution
Request body:
{
"lambda_name": "sum",
"arguments": "[[0, 1, 2, 3, 4, 5]]"
}
Query executions:
GET http://localhost:8000/api/v1/execution?lambdaName=sum
Check the API reference for models and routes:
http://localhost:8000/api/v1/docs
The hostname and port of the server are defined by the .env
file in the project root directory.
New features:
- Partial updates
- Synchronous executions
- Package dependencies
- One-shot container runtimes
- Python runtime
Copyright (c) 2021, Danilo Peixoto. All rights reserved.
Project developed under a BSD-3-Clause license.