{"id":49809420,"url":"https://github.com/beava-dev/beava","last_synced_at":"2026-05-13T00:00:54.955Z","repository":{"id":356318193,"uuid":"1229310351","full_name":"beava-dev/beava","owner":"beava-dev","description":"Real-time feature server for fraud, ad-tech, and behavioral analytics.","archived":false,"fork":false,"pushed_at":"2026-05-07T15:41:47.000Z","size":32878,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T15:42:49.670Z","etag":null,"topics":["analytics","feature-store","fraud-detection","python","real-time","rust","streaming"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beava-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-04T23:12:23.000Z","updated_at":"2026-05-07T15:26:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"a42b848b-4809-45d1-802a-a80ef74d6a77","html_url":"https://github.com/beava-dev/beava","commit_stats":null,"previous_names":["beava-dev/beava"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/beava-dev/beava","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beava-dev%2Fbeava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beava-dev%2Fbeava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beava-dev%2Fbeava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beava-dev%2Fbeava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beava-dev","download_url":"https://codeload.github.com/beava-dev/beava/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beava-dev%2Fbeava/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32961785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"ssl_error","status_checked_at":"2026-05-12T23:30:18.191Z","response_time":102,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","feature-store","fraud-detection","python","real-time","rust","streaming"],"created_at":"2026-05-13T00:00:38.055Z","updated_at":"2026-05-13T00:00:54.928Z","avatar_url":"https://github.com/beava-dev.png","language":"Rust","funding_links":[],"categories":["Libraries","Table of Contents"],"sub_categories":["Data streaming","Streaming Engine"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://beava.dev\"\u003e\n    \u003cimg src=\"beava-design-system/project/assets/readme-banner.png\" alt=\"beava\" width=\"100%\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/beava-dev/beava/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/beava-dev/beava/ci.yml?branch=main\u0026label=build\" alt=\"build\"/\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-Apache--2.0-7ca84a\" alt=\"license Apache-2.0\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://beava.dev\"\u003e\u003cimg src=\"https://img.shields.io/badge/site-beava.dev-3a6a8a\" alt=\"site beava.dev\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://beava.dev/docs\"\u003e\u003cimg src=\"https://img.shields.io/badge/docs-beava.dev%2Fdocs-3a6a8a\" alt=\"docs\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/J5trwbCYpS\"\u003e\u003cimg src=\"https://img.shields.io/badge/chat-discord-7ca84a\" alt=\"discord\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/beava-dev/beava/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/beava-dev/beava?include_prereleases\u0026label=release\u0026color=d97757\" alt=\"release\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nA real-time feature server. Push events over HTTP or TCP, declare features in Python, query them at sub-millisecond latency.\n\nbeava is a single-binary feature server for fraud detection, ad-tech, and behavioral analytics. Push events in over HTTP or TCP; beava tracks per-entity features (counters, velocities, distances, rates, distributions) updated atomically on every event; your application queries them at sub-millisecond latency to power live scoring rules.\n\nThink **Redis for stateful streaming features**, with 50+ purpose-built aggregation primitives instead of do-it-yourself Lua scripts.\n\n## 60-second quickstart\n\nPick whichever install path matches your box. All three deliver the same `beava` binary.\n\n```bash\n# pip    — installs SDK + bundled Rust server binary from PyPI\n#          (~14 MB, polars / ruff / uv pattern). `beava` lands on PATH.\n#          Pin a version with `pip install beava==0.0.0`.\npip install beava\n\n# brew   — Homebrew formula (macOS + Linuxbrew)\nbrew install beava-dev/beava/beava\n\n# docker — zero deps on the host\ndocker run -p 8080:8080 -p 8081:8081 beavadev/beava:latest\n```\n\nThen start the server:\n\n```bash\nbeava --data-dir ./.beava/\n```\n\nOr kick the tyres without writing anything to disk:\n\n```bash\nbeava quickstart   # 4-step in-process demo, ~10s, drops a beava_quickstart.py file\nbeava --memory-only   # ephemeral server, no WAL, no recovery\n```\n\n```python\nimport beava as bv\n\n@bv.event\nclass Click:\n    user_id: str\n    page: str\n\n@bv.table(key=\"user_id\")\ndef UserActivity(e: Click):\n    return e.group_by(\"user_id\").agg(\n        clicks_1h=bv.count(window=\"1h\"),\n        unique_pages_1h=bv.n_unique(\"page\", window=\"1h\"),\n    )\n\napp = bv.App(url=\"http://localhost:8080\")    # or bv.App() to spawn an embed-mode server\napp.register(Click, UserActivity)\n\napp.push(\"Click\", {\"user_id\": \"alice\", \"page\": \"/home\"})\napp.push(\"Click\", {\"user_id\": \"alice\", \"page\": \"/products\"})\n\napp.get(\"UserActivity\", \"alice\")\n# =\u003e {\"clicks_1h\": 2, \"unique_pages_1h\": 2}\n```\n\nThat's it. **No broker, no ETL, no schema registry, no separate stream / batch path.** One binary, one Python decorator, real-time features.\n\nFull walkthrough: [beava.dev/docs](https://beava.dev/docs).\n\n## Why beava\n\nReplaces Postgres triggers + Redis counters + the cron job that heals drift. Same pipeline from laptop to production.\n\n**Performance:** 684,812 sustained events/sec on a single Apple-M4 core[^1] — simple-fraud pipeline, TCP transport, msgpack wire, parallel=16, 60s sustained run. Run multiple beava instances for higher throughput (Redis-cluster style; no in-process sharding).\n\n**Memory:** ~7 KB per entity for a rich 30-feature pack → ~700 GB for 100M entities. Size your box; in-memory only — no SSD overflow.\n\n**Durability:** WAL on every push + periodic snapshot. Boot recovers state in seconds. Refuse-on-network-FS so you don't accidentally fsync over NFS.\n\n[^1]: Reproduce: `cargo run -p beava-bench --release -- throughput --pipeline small --transport tcp --wire-format msgpack --parallel 16 --duration-secs 60 --pipeline-depth 1024`. Numbers vary by hardware; dedicated x86 server-class boxes typically clear 1M+ EPS sustained. See [crates/beava-bench/README.md](crates/beava-bench/README.md) for the harness.\n\n## Wire surface\n\nbeava binds three listeners:\n\n- **HTTP/JSON on `127.0.0.1:8080`** - curl-compatible debugging path.\n- **Framed TCP on `127.0.0.1:8081`** - sub-millisecond fast-path. JSON or msgpack content.\n- **Admin sidecar on `127.0.0.1:8090`** - observability endpoints for `/health`, `/ready`, `/metrics`, and `/registry`. Override with `BEAVA_ADMIN_ADDR`.\n\n### HTTP\n\n```bash\ncurl -X POST localhost:8080/register -d '{...schema...}'\ncurl -X POST localhost:8080/push     -d '{\"event\":\"Click\",\"data\":{\"user_id\":\"alice\",\"page\":\"/home\"}}'\ncurl -X POST localhost:8080/get      -d '{\"table\":\"UserActivity\",\"key\":\"alice\"}'\ncurl -X POST localhost:8080/batch_get -d '{\"requests\":[{\"table\":\"UserActivity\",\"key\":\"alice\"}]}'\ncurl -X POST localhost:8080/ping\n```\n\n### TCP frame\n\n```text\n[u32 length BE][u16 op BE][u8 content_type][payload: length - 3 bytes]\n```\n\n`length` counts the bytes after itself. Multi-byte integers are big-endian. **Strict FIFO per connection** (Redis RESP style) — frame order correlates requests to responses; no `request_id` field.\n\n| Opcode | Name | Body |\n|--------|------|------|\n| `0x0010` | `push` | `{event, data}` |\n| `0x0020` | `get` | `{table, key}` |\n| `0x0024` | `batch_get` | `{requests: [...]}` |\n| `0x0030` | `register` | full schema |\n| `0x0040` | `reset` | `{}` (test_mode-only) |\n| `0xFFFF` | `error_response` | `{error: {code, message}}` |\n\n| Content-type | Format |\n|--------------|--------|\n| `0x01` | JSON |\n| `0x02` | msgpack |\n\nUnknown opcodes return `error_response` with code `unknown_op` and the connection stays open.\n\n## Server CLI\n\n```text\nbeava [OPTIONS] [SUBCOMMAND]\n\n  -c, --config \u003cCONFIG\u003e     YAML config file (full surface; optional)\n      --http-addr \u003cADDR\u003e    default: 127.0.0.1:8080\n      --tcp-addr \u003cADDR\u003e     default: 127.0.0.1:8081\n      --data-dir \u003cPATH\u003e     default: ./.beava/  (WAL → \u003cDIR\u003e/wal,\n                                                 snapshots → \u003cDIR\u003e/snapshots)\n      --memory-only         ephemeral; no WAL/snapshot\n      --test-mode           enable POST /reset and OP_RESET\n  -h, --help\n  -V, --version\n\nsubcommands\n  quickstart [--no-file]    in-process 4-step first-touch demo\n\nenv vars\n  BEAVA_LOG_LEVEL=debug|info|warn     default: info\n  BEAVA_TEST_MODE=1                   alias for --test-mode\n  BEAVA_ADMIN_ADDR                    admin sidecar address; default: 127.0.0.1:8090\n  BEAVA_WAL_DIR / BEAVA_SNAPSHOT_DIR  per-dir overrides (use --data-dir\n                                      for a single-root convenience flag)\n  BEAVA_LISTEN_ADDR                   alias for --http-addr\n  BEAVA_TCP_HOST / BEAVA_TCP_PORT     per-listener overrides\n                                      (use --tcp-addr for the canonical form)\n\nWAL fsync interval and snapshot interval ride along inside YAML config;\npromotion to first-class CLI flags (`--wal-flush-ms`, `--snapshot-interval-mins`)\nis a v0.0.x followup. Most operators don't tune these.\n```\n\nNo TLS in v0 — terminate at nginx, Envoy, or Cloudflare if you need it. No auth in v0 — bind to a private network.\n\n## Learn more\n\n- [beava.dev](https://beava.dev) — site, docs, guides, RFCs, dev calls\n- [examples/](examples/) — vertical demos in Python\n- [crates/beava-bench/README.md](crates/beava-bench/README.md) — benchmark harness, reproduce the numbers\n\n## Community \u0026 open-source commitment\n\nThe open-source project is the real system — something you can clone, run, test, operate, and trust as your use case grows. A managed beava service can remove operational burden later, but the open-source binary is the real product. TiDB-style commitment to open source. Apache-2.0, no open-core lock-in.\n\n- **Discussions:** [github.com/beava-dev/beava/discussions](https://github.com/beava-dev/beava/discussions)\n- **Discord:** [discord.gg/J5trwbCYpS](https://discord.gg/J5trwbCYpS)\n- **Security:** private disclosure to `hoang@beava.dev` (see [SECURITY.md](SECURITY.md))\n\n[Apache 2.0](LICENSE) · [CHANGELOG](CHANGELOG.md) · [SECURITY](SECURITY.md) · [CONTRIBUTING](CONTRIBUTING.md) · [GOVERNANCE](GOVERNANCE.md) · [MAINTAINERS](MAINTAINERS.md) · [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeava-dev%2Fbeava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeava-dev%2Fbeava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeava-dev%2Fbeava/lists"}