https://github.com/threepointone/durable-objects-streaming-example
https://github.com/threepointone/durable-objects-streaming-example
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/threepointone/durable-objects-streaming-example
- Owner: threepointone
- Created: 2025-02-21T13:10:29.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-21T13:29:38.000Z (3 months ago)
- Last Synced: 2025-02-21T14:23:05.926Z (3 months ago)
- Language: TypeScript
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

```bash
npm install
npm start
```This is an example to show some streaming capabilities of Cloudflare Durable Objects.
In this example, we have 2 servers, a source and a target. We use a form to submit a query to the source server. The source server makes an LLM request based on the query, and does a streaming POST to the target server. The Target server sends on this streaming post to a Durable Object Target 1. Target 1 then streams this response to Target 2, by calling RPC calls. Target 2 then broadcasts the response to all browser clients that are connected.
```
Form Input
|
v
Source Server
|
v
Target Server
|
v
Target 1 DO
|
v
Target 2 DO
|
v
Browser Clients
```