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. makes real-time data processing reliable, secure, and easy.
Official Website: đĻhttps://yomo.run
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 Celluar/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 |
$ go install github.com/yomorun/cli/yomo@latest
$ yomo -V
YoMo CLI version: v0.0.6
$ yomo init yomo-app-demo
â Initializing the Serverless app...
â
Congratulations! You have initialized the serverless function successfully.
âšī¸ You can enjoy the YoMo Serverless via the command:
âšī¸ DEV: yomo dev -n Noise yomo-app-demo/app.go
âšī¸ PROD: First run source application, eg: go run example/source/main.go
Second: yomo run -n yomo-app-demo yomo-app-demo/app.go
$ cd yomo-app-demo
CLI will automatically create the app.go
:
package main
import (
"context"
"fmt"
"time"
y3 "github.com/yomorun/y3-codec-golang"
"github.com/yomorun/yomo/pkg/rx"
)
// NoiseDataKey represents the Tag of a Y3 encoded data packet
const NoiseDataKey = 0x10
// NoiseData represents the structure of data
type NoiseData struct {
Noise float32 `y3:"0x11"`
Time int64 `y3:"0x12"`
From string `y3:"0x13"`
}
var printer = func(_ context.Context, i interface{}) (interface{}, error) {
value := i.(NoiseData)
rightNow := time.Now().UnixNano() / int64(time.Millisecond)
fmt.Println(fmt.Sprintf("[%s] %d > value: %f âĄī¸=%dms", value.From, value.Time, value.Noise, rightNow-value.Time))
return value.Noise, nil
}
var callback = func(v []byte) (interface{}, error) {
var mold NoiseData
err := y3.ToObject(v, &mold)
if err != nil {
return nil, err
}
mold.Noise = mold.Noise / 10
return mold, nil
}
// Handler will handle data in Rx way
func Handler(rxstream rx.RxStream) rx.RxStream {
stream := rxstream.
Subscribe(NoiseDataKey).
OnObserve(callback).
Debounce(50).
Map(printer).
StdOut().
Encode(0x11)
return stream
}
- Run
yomo dev
from the terminal. you will see the following message:
$ yomo dev
âšī¸ YoMo serverless function file: app.go
â Create YoMo serverless instance...
â YoMo serverless function building...
â
Success! YoMo serverless function build.
âšī¸ YoMo serverless function is running...
âšī¸ Run: /Users/xiaojianhong/Downloads/yomo-app-demo/sl.yomo
2021/06/07 12:00:06 Connecting to zipper dev.yomo.run:9000 ...
2021/06/07 12:00:07 â
Connected to zipper dev.yomo.run:9000
[10.10.79.50] 1623038407236 > value: 1.919251 âĄī¸=-25ms
[StdOut]: 1.9192511
[10.10.79.50] 1623038407336 > value: 11.370256 âĄī¸=-25ms
[StdOut]: 11.370256
[10.10.79.50] 1623038407436 > value: 8.672209 âĄī¸=-25ms
[StdOut]: 8.672209
[10.10.79.50] 1623038407536 > value: 4.826996 âĄī¸=-25ms
[StdOut]: 4.826996
[10.10.79.50] 1623038407636 > value: 16.201773 âĄī¸=-25ms
[StdOut]: 16.201773
[10.10.79.50] 1623038407737 > value: 13.875483 âĄī¸=-26ms
[StdOut]: 13.875483
Congratulations! You have done your first YoMo application.
Multiple data sources combined calculation
- 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
: yomo.run/sourceYoMo-Flow
: yomo.run/flowYoMo-Sink
: yomo.run/sinkYoMo-Zipper
: 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-codec
optimizes 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!