https://github.com/danilopeixoto/lambda
A distributed Function-as-a-Service (FaaS) service.
https://github.com/danilopeixoto/lambda
distributed-systems faas function-as-a-service web-service
Last synced: 2 days ago
JSON representation
A distributed Function-as-a-Service (FaaS) service.
- Host: GitHub
- URL: https://github.com/danilopeixoto/lambda
- Owner: danilopeixoto
- License: bsd-3-clause
- Created: 2021-04-17T21:59:13.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-03T06:20:54.000Z (about 5 years ago)
- Last Synced: 2025-05-25T15:48:58.005Z (about 1 year ago)
- Topics: distributed-systems, faas, function-as-a-service, web-service
- Language: Java
- Homepage:
- Size: 185 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lambda
A distributed Function-as-a-Service (FaaS) service.
## Prerequisites
* [Docker Engine (>=19.03.10)](https://docs.docker.com/engine)
* [Docker Compose (>=1.27.0)](https://docs.docker.com/compose)
## Installation
Build and run service:
```
docker-compose up -d
```
## Usage
Create a lambda:
```
POST http://localhost:8000/api/v1/lambda
```
Request body:
```json
{
"name": "sum",
"description": "Sum numbers.",
"runtime": "java",
"source": ""
}
```
Source code sample:
```java
import java.util.List;
public class SumLambda {
public static Number compute(List 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:
```json
{
"lambda_name": "sum",
"arguments": "[[0, 1, 2, 3, 4, 5]]"
}
```
Query executions:
```
GET http://localhost:8000/api/v1/execution?lambdaName=sum
```
## Documentation
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.
## Roadmap
New features:
* Partial updates
* Synchronous executions
* Package dependencies
* One-shot container runtimes
* Python runtime
## Copyright and license
Copyright (c) 2021, Danilo Peixoto. All rights reserved.
Project developed under a [BSD-3-Clause license](LICENSE.md).