This issue recommends a low-latency streaming edge computing framework based on GO – yomo.
YoMo is a low-delay streaming data processing framework for edge computing. Based on QUIC protocol communication and Functional Reactive Programming as the programming paradigm, YOMO builds reliable and secure low-delay real-time computing applications. Tap the potential of 5G and unlock the value of real-time computing.
Feature
- data transmission based on QUIC protocol
- Each packet is based on TLSv1.3 security policy
- Ensure the stability and throughput of data transmission under 5G/WiFi-6 network
- Closer to end users with Edge-Mesh Native architecture
- Event-driven and resilient with serverless services
- Build applications and microservices with just a few lines of code
- Self-developed y3-codec optimized decoding performance faster than real-time codecs
- RX-based reactive flow calculation to improve the speed and accuracy of data processing and analysis
YoMo is suitable for
- Internet of Things/Industrial iot /AIoT
- Developing latency-sensitive applications
- Handling high network latency and packet loss
- Processing continuous high frequency data through streaming programming
- Building complex systems with a streaming Serverless architecture
Quick Start
1 Prerequisites
Ensure that the Go compilation runtime environment is installed.
2 Installing the CLI
Binary (recommended) :
$ curl -fsSL "https://bina.egoist.sh/yomorun/cli? name=yomo" | sh
or compile from source code:
$ go install github.com/yomorun/cli/yomo@latest
Verify CLI installation successfully:
$ yomo -V
YoMo CLI version: v0.1.8
3 Create a Serverless application
$ 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
YoMo The CLI will automatically create app.go files with the following:
package main
import (
"context"
"encoding/json"
"fmt"
"time"
"github.com/yomorun/yomo/rx"
)
// NoiseData represents the structure of data
type NoiseData struct {
Noise float32 `json:"noise"` // Noise value
Time int64 `json:"time"` // Timestamp (ms)
From string `json:"from"` // Source IP
}
var echo = func(_ context.Context, i interface{}) (interface{}, error) {
value := i.(*NoiseData)
value.Noise = value.Noise / 10
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
}
// Handler will handle data in Rx way
func Handler(rxstream rx.Stream) rx.Stream {
stream := rxstream.
Unmarshal(json.Unmarshal, func() interface{} { return & NoiseData{} }).
Debounce(50).
Map(echo).
StdOut()
return stream
}
func DataTags() []byte {
return []byte{0x33}
}
4 Compile and run
Run yomo dev from terminal and you can see:
$ 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
Schematic Diagram

—END—
Open Source protocol: Apache2.0