Show HN: Salvobase – 由 AI 代理维护的、用 Go 编写的、兼容 MongoDB 的数据库
1 分•作者: inder1•6 个月前
MongoDB 很好用,直到你读了 SSPL 协议。然后你就会面临要么支付 Atlas 的高昂费用,要么运行旧的 4.x 版本,或者假装 FerretDB 已经可以用于生产环境。我们构建了第三个选择。
```
Salvobase 是一个用 Go 语言编写的、与 MongoDB 协议兼容的文档数据库。使用任何 Mongo 驱动程序都可以直接连接。无需更改驱动程序,也无需更改配置。它采用 Apache 2.0 协议,因此你可以将其嵌入到商业产品中,而无需进行法律方面的沟通。
它的功能:
- 完整的 CRUD 操作,索引(单索引、复合索引、唯一索引、文本索引、TTL 索引、部分索引、通配符索引),以及大部分聚合管道操作($match, $group, $lookup, $unwind, $facet 等)
- SCRAM-SHA-256 身份验证
- bbolt 存储引擎:每个数据库一个 .db 文件,使用 Snappy 压缩 BSON
- 内置 Prometheus 指标,位于 :27080/metrics (无需导出器)
- 内置 REST/JSON API,位于 :27080/api/v1/ (MongoDB 对应的功能需要付费 Atlas)
- 每个租户的速率限制、审计日志、1 秒 TTL 精度、SIGHUP 热重载
- 运行 make build && make dev 即可启动
它的不足:
不支持复制。不支持分片。不支持变更流。不支持多文档事务(仅为占位符)。不支持 $where 或 mapReduce(出于安全性和复杂性考虑)。仅支持单节点。如果你需要一个分布式 MongoDB 替代方案,目前它还无法满足。但我们希望有一天它能实现,由 AI 智能体构建。
奇怪的地方:
代码库由 AI 智能体维护。不是“AI 辅助” - 这些智能体从待办事项列表中选择问题,编写代码,提交 PR,互相审查 PR,然后合并。有一个正式的协议 (https://github.com/inder/salvobase/blob/master/AGENT_PROTOCOL.md) 涵盖了身份、信任层级、审查的反串通规则、声明超时和紧急停止开关。人类设定方向;智能体执行。
我们很好奇,自主智能体维护是否能够长期维持一个真正的开源项目,而不仅仅是生成初始代码。
```
* 如果你想捐赠一个智能体,只需将此提示放入 Claude Code、Cursor、Aider、Devin 等工具中:Fork/clone github.com/inder/salvobase,阅读 QUICKSTART.md,然后开始贡献
GitHub: [https://github.com/inder/salvobase](https://github.com/inder/salvobase)
谢谢。
查看原文
MongoDB is great until you read the SSPL. Then you're either paying Atlas prices, running an old 4.x build, or pretending FerretDB is production-ready. We built a third option.<p><pre><code> Salvobase is a MongoDB wire-protocol-compatible document database written in Go. Point any Mongo driver and it works. No driver changes, no config changes. It's Apache 2.0, so you can embed it in a commercial product without a legal conversation.
What it does:
- Full CRUD, indexes (single, compound, unique, text, TTL, partial, wildcard), and most of the aggregation pipeline ($match, $group, $lookup, $unwind, $facet, etc.)
- SCRAM-SHA-256 auth
- bbolt storage engine: one .db file per database, Snappy-compressed BSON
- Built-in Prometheus metrics at :27080/metrics (no exporter needed)
- Built-in REST/JSON API at :27080/api/v1/ (MongoDB's equivalent is paid Atlas)
- Per-tenant rate limiting, audit logging, 1-second TTL precision, SIGHUP hot reload
- make build && make dev and you're running
What it doesn't do:
No replication. No sharding. No change streams. No multi-document transactions (stubbed). No $where or mapReduce (intentional: security + complexity). Single-node only. If you need a distributed MongoDB replacement, this isn't it yet. But we hope one day it will become that, built by agents.
The weird part:
The codebase is maintained by AI agents. Not "AI-assisted" - the agents pick issues from the backlog, write code, submit PRs, review each other's PRs, and merge. There's a formal protocol (https://github.com/inder/salvobase/blob/master/AGENT_PROTOCOL.md) covering identity, trust tiers, anti-collusion rules for reviews, claim timeouts, and a kill switch. Humans set direction; agents do the execution.
We're curious whether autonomous agent maintenance can sustain a real open source project over time, not just generate initial code.
</code></pre>
* If you want to donate an agent just drop this prompt into Claude Code, Cursor, Aider, Devin, whatever: Fork/clone github.com/inder/salvobase, read QUICKSTART.md, and start contributing<p>GitHub: <a href="https://github.com/inder/salvobase" rel="nofollow">https://github.com/inder/salvobase</a><p>Thank you.