Show HN:Bebox——单进程中的一体化后端
Show HN: Bebox – back end in a box, inside a single process

原始链接: https://bebox.run

Unsworn 是一个配置优先的后端平台,使用 TOML 定义安全、路由、校验、CORS、IP 规则和持久化速率限制,并在处理函数运行前拒绝无效请求。它结合了两个嵌入式数据库:dimedb 用于微秒级内存事务状态,rodedb 用于基于磁盘分页的 SQL,支持 SSI 事务、BM25 搜索、Int8 向量、镜像和原子多提交。精确读集缓存会跟踪键和 SQL 范围,在数据变化时仅淘汰受影响的 GET 响应,同时通过 SSE 流式推送实时增量。它还提供 SQL 暂存队列、带 leader 保护的 UTC 定时任务,以及支持日志记录、休眠和事件等待的可安全重放工作流。bebox sim 可通过单个种子和虚拟时钟实现确定性的全后端测试。生产特性包括加密 Raft 集群、ACME HTTPS、HTTP/3、快速部署 cartridge,以及将加密的 WAL/PITR 备份到 S3 或 R2。

黑客新闻 最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 展示 HN:Bebox——单进程中的一体化后端 (bebox.run) 6 分 由 j4w8n 发布于 35 分钟前 | 往期 | 收藏 | 讨论 API 路由、数据库、路由处理程序等,全部运行在一个进程中。 缓存设置、身份验证检查、速率限制等都在 TOML 中配置。 你的处理程序几乎可以用任何语言编写,甚至可以混合搭配多种语言 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请加入 YC | 联系 搜索:
相关文章

原文

unsworn

Config-First Security & Routing

Declare API keys, Clerk/Auth0/Supabase JWKS JWT auth, parameter bounds, JSON schemas, CORS, IP rules, and durable rate limits in TOML. Invalid requests fail before handler code runs.

dimedb + rodedb

Dual Embedded Databases

Pair microsecond in-memory transactional [state] (dimedb) with disk-paged [sql] (rodedb) featuring SSI transactions, BM25 full-text, Int8 vector indexes, [[sql.mirror]], and atomic ctx.multiCommit.

Zero Stale Reads

Exact Read-Set Cache & Live SSE

Every cached GET records the exact keys and SQL ranges it read. The instant a matching row commits, ReadSetCache evicts only affected responses while [[stream]] pushes live SSE deltas.

SystemDb

Queues, Crons & Durable Workflows

Stage jobs atomically inside SQL transactions with tx.enqueue, run leader-guarded UTC [[cron]] schedules, and write replay-safe [[workflow]]s with ctx.journal, sleep, and waitEvent.

bebox sim

Deterministic Whole-Backend Testing

Run your entire app—routing, auth, both databases, torn-write crash recovery, crons, workflows, and mocked outbound HTTP—under one u64 seed and virtual clock for bit-for-bit reproducible tests.

Production Ready

Encrypted Raft, ACME HTTPS & PITR

Scale to 3–5 HA nodes with automatic X25519 + ChaCha20-Poly1305 encryption, deploy live .cartridge bundles in 154 ms, enable native Let's Encrypt HTTPS + HTTP/3, and stream encrypted WAL backups to S3/R2.

联系我们 contact @ memedata.com