YoMo is an open-source Streaming Serverless Framework for building Low-latency Edge Computing applications. Built atop QUIC Transport Protocol and Functional Reactive Programming interface, it makes real-time data processing reliable, secure, and easy.
Official Website: 🦖https://yomo.run
💚 We care about: The Demand For Real-Time Digital User Experiences
It’s no secret that today’s users want instant gratification, every productivity application is more powerful when it's collaborative. But, currently, when we talk about distribution, it represents distribution in data center. API is far away from their users from all over the world.
If an application can be deployed anywhere close to their end users, solve the problem, this is Geo-distributed System Architecture:
| Features | |
|---|---|
| ⚡️ | Low-latency Guaranteed by implementing atop QUIC QUIC |
| 🔐 | Security TLS v1.3 on every data packet by design |
| 📱 | 5G/WiFi-6 Reliable networking in Cellular/Wireless |
| 🌎 | Geo-Distributed Edge Mesh Edge-Mesh Native architecture makes your services close to end users |
| 📸 | Event-First Architecture leverages serverless service to be event driven and elastic |
| 🦖 | Streaming Serverless Write only a few lines of code to build applications and microservices |
| 🚀 | Y3 a faster than real-time codec |
| 📨 | Reactive stream processing based on Rx |
curl -fsSL https://get.yomo.run | shVerify if the CLI was installed successfully
yomo versionIn this demo, we will create a rust project observing a data stream and uppercase every string received, then create send them to next process unit with another data stream:
#[yomo::init]
fn init() -> anyhow::Result<Vec<u32>> {
// return observe datatags
Ok(vec![0x33])
}
#[yomo::handler]
fn handler(input: &[u8]) -> anyhow::Result<(u32, Vec<u8>)> {
println!("wasm rust sfn received {} bytes", input.len());
// parse input from bytes
let input = String::from_utf8(input.to_vec())?;
// your app logic goes here
let output = input.to_uppercase();
// return the datatag and output bytes
Ok((0x34, output.into_bytes()))
}The full project can be found at example/7-wasm/rust.
Let's start the YoMo Zipper service, which is a service that processes data from the YoMo Source and coordinates the YoMo Stream Function to process a specific data stream:
yomo serve -c example/uppercase/workflow.yamlThen, start the WebAssembly Stream Function, get ready to process data:
cd example/7-wasm/sfn/rust
rustup target add wasm32-wasi
cargo build --release --target wasm32-wasi
YOMO_SFN_NAME=upper bin/yomo run example/7-wasm/sfn/rust/target/wasm32-wasi/release/sfn.wasmFinally, let's try send data:
$ go run example/uppercase/source/main.go
time=2023-03-28T09:41:13.782+08:00 level=INFO msg="use credential" component=client client_type=Source client_id=9bqB-J8I3l-6YHkuhB11I client_name=source credential_name=none
time=2023-03-28T09:41:13.786+08:00 level=INFO msg="use credential" component=client client_type="Stream Function" client_id=jS-GCGUBMRW1yTnyU6Yke client_name=sink credential_name=none
2023/03/28 09:41:13 [send] [0] Hello, YoMo!
2023/03/28 09:41:13 [recv] [0] HELLO, YOMO!
2023/03/28 09:41:14 [send] [1] Hello, YoMo!
2023/03/28 09:41:14 [recv] [1] HELLO, YOMO!
2023/03/28 09:41:15 [send] [2] Hello, YoMo!
2023/03/28 09:41:15 [recv] [2] HELLO, YOMO!
2023/03/28 09:41:16 [send] [3] Hello, YoMo!
2023/03/28 09:41:16 [recv] [3] HELLO, YOMO!
2023/03/28 09:41:17 [send] [4] Hello, YoMo!
2023/03/28 09:41:17 [recv] [4] HELLO, YOMO!
2023/03/28 09:41:18 [send] [5] Hello, YoMo!
2023/03/28 09:41:18 [recv] [5] HELLO, YOMO!It works!
There are many other examples that can help reduce the learning curve:
- 0-basic: Write Stream Function in pure golang.
- 1-pipeline: Unix Pipeline over Cloud.
- 2-iopipe: Unix Pipeline over Cloud.
- 3-multi-sfn: Write programs that do one thing and do it well. Write programs to work together. -- Doug Mcllroy
- 4-cascading-zipper: Flexible adjustment of sfn deployment and run locations.
- 5-backflow
- 6-mesh: Demonstrate how to put your serverless closer to end-user.
- 7-wasm: Implement Stream Function by WebAssembly in
c,go,rustand even zig. - 8-deno: Demonstrate how to write Stream Function with TypeScript and deno.
- 9-cli: Implement Stream Function in Rx way.
- Connect to FaunaDB to store post-processed result the serverless way
- Connect to InfluxDB to store post-processed result
- Connect to TDEngine to store post-processed result
YoMo-Source: docs.yomo.run/sourceYoMo-Stream-Function: docs.yomo.run/stream-functionYoMo-Zipper: docs.yomo.run/zipperStream Processing in Rx way: RxFaster than real-time codec: Y3
YoMo ❤️ Vercel, our documentation website is
- IoT/IIoT/AIoT
- Latency-sensitive applications.
- Networking situation with packet loss or high latency.
- Handling continuous high frequency generated data with stream-processing.
- Building Complex systems with Streaming-Serverless architecture.
- Based on QUIC (Quick UDP Internet Connection) protocol for data transmission, which uses the User Datagram Protocol (UDP) as its basis instead of the Transmission Control Protocol (TCP); significantly improves the stability and throughput of data transmission. Especially for cellular networks like 5G.
- A self-developed
y3-codecoptimizes decoding performance. For more information, visit its own repository on GitHub. - Based on stream computing, which improves speed and accuracy when dealing with data handling and analysis; simplifies the complexity of stream-oriented programming.
- Secure-by-default from transport protocol.
First off, thank you for considering making contributions. It's people like you that make YoMo better. There are many ways in which you can participate in the project, for example:
- File a bug report. Be sure to include information like what version of YoMo you are using, what your operating system is, and steps to recreate the bug.
- Suggest a new feature.
- Read our contributing guidelines to learn about what types of contributions we are looking for.
- We have also adopted a code of conduct that we expect project participants to adhere to.
Any questions or good ideas, please feel free to come to our Discussion. Any feedback would be greatly appreciated!
Discussion #314 Tips: YoMo/QUIC Server Performance Tuning