Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bnewbold/readme rainbow #822

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Run with, eg, `go run ./cmd/bigsky`):
- `cmd/supercollider`: event stream load generation tool
- `cmd/sonar`: event stream monitoring tool
- `cmd/hepa`: auto-moderation rule engine service
- `cmd/rainbow`: firehose fanout service
- `gen`: dev tool to run CBOR type codegen

Packages:
Expand Down
32 changes: 32 additions & 0 deletions cmd/rainbow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

`rainbow`: atproto Firehose Fanout Service
==========================================

This is an atproto service which consumes from a firehose (eg, from a relay or PDS) and fans out events to many subscribers.

Features and design points:

- retains "backfill window" on local disk (using [pebble](https://github.com/cockroachdb/pebble))
- serves the `com.atproto.sync.subscribeRepos` endpoint (WebSocket)
- retains upstream firehose "sequence numbers"
- does not validate events (signatures, repo tree, hashes, etc), just passes through
- does not archive or mirror individual records or entire repositories (or implement related API endpoints)
- disk I/O intensive: fast NVMe disks are recommended, and RAM is helpful for caching
- single golang binary for easy deployment
- observability: logging, prometheus metrics, OTEL traces

## Running

This is a simple, single-binary Go program. You can also build and run it as a docker container (see `./Dockerfile`).

From the top level of this repo, you can build:

```shell
go build ./cmd/rainbow -o rainbow-bin
```

or just run it, and see configuration options:

```shell
go run ./cmd/rainbow --help
```
Loading