yomorun / yomo

🦖 Stateful Serverless Framework for Geo-distributed Edge AI Infra. with function calling support, write once, run on any model.
https://yomo.run
Apache License 2.0
1.65k stars 128 forks source link

feat: add example for Cron and Target #715

Closed fanweixiao closed 7 months ago

fanweixiao commented 7 months ago

Example 10: Target property and Cron feature

Steps to run the example

1. Start Zipper Server

yomo serve -c ../config.yaml

2. Start sfn-1-executor

This stateful serverless function will emit data every 2 seconds.

go run sfn-1-executor/main.go

3. Start two instances of sfn-2-sink to consume the data

First one start with USERID=alice, this instance will consume the data with target property set to alice.

USERID=alice go run sfn-2-sink/main.go

Second one start with USERID=bob, this instance will consume the data with target property set to bob.

USERID=bob go run sfn-2-sink/main.go
image
vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **yomo** | ⬜️ Ignored ([Inspect](https://vercel.com/yomorun/yomo/4MUuLkA6SqFXqEwGgFbtEh2QeY6j)) | [Visit Preview](https://yomo-git-example-target-and-cron-yomorun.vercel.app) | | Feb 5, 2024 10:12am |