同步操作将从 YoMo/yomo 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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.1.3
$ yomo init yomo-app-demo
⌛ Initializing the Stream Function...
✅ Congratulations! You have initialized the stream function successfully.
ℹ️ You can enjoy the YoMo Stream Function 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"
"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 DataID() []byte {
return []byte{0x33}
}
yomo dev
from the terminal. you will see the following message:$ yomo dev
ℹ️ YoMo Stream Function file: app.go
⌛ Create YoMo Stream Function instance...
⌛ YoMo Stream Function building...
✅ Success! YoMo Stream Function build.
ℹ️ YoMo Stream Function is running...
2021/11/16 10:02:43 [core:client] has connected to yomo-app-demo (dev.yomo.run:9140)
[localhost] 1637028164050 > value: 6.575044 ⚡️=9ms
[StdOut]: 6.5750437
[localhost] 1637028164151 > value: 10.076103 ⚡️=5ms
[StdOut]: 10.076103
[localhost] 1637028164251 > value: 15.560066 ⚡️=8ms
[StdOut]: 15.560066
[localhost] 1637028164352 > value: 15.330824 ⚡️=2ms
[StdOut]: 15.330824
[localhost] 1637028164453 > value: 10.859857 ⚡️=7ms
[StdOut]: 10.859857
Congratulations! You have done your first YoMo Stream Function.
YoMo-Source
: yomo.run/source
YoMo-Stream-Function
(formerly flow): yomo.run/stream-function
YoMo-Zipper
: yomo.run/zipper
Stream Processing in Rx way
: Rx
Faster than real-time codec
: Y3
YoMo ❤️ Vercel, Our documentation website is
y3-codec
optimizes decoding performance. For more information, visit its own repository on GitHub.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:
Any questions or good ideas, please feel free to come to our Discussion. Any feedback would be greatly appreciated!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。