编程与软件工程corecursive.com
SQLite 不为人知的故事
The Untold Story of SQLite
2021 — 2024,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这期 Corecursive 播客访谈 SQLite 作者 Richard Hipp,讲述 SQLite 的由来、开发历程以及它作为嵌入式数据库背后的工程选择。对话还涉及 SQLite 发布前极其庞大的测试投入,以及 Richard 对掌控自己数据和基础设施的坚持。
为什么经久不衰:SQLite 无处不在却极少被看见,而这篇访谈揭示了它为何能如此可靠,以及一位工程师如何用极端测试和独立精神做出经久耐用的基础软件。
HN 评论精选
主持人补充 SQLite 每个版本发布前会进行数十亿次测试,体现其对可靠性的极端要求。
我是主持人,感谢分享。Richard 很会讲故事,SQLite 带他经历的那些冒险也相当有趣。我想他也在 HN 上(@SQLite)。我了解到 SQLite 开发过程中一个有趣之处是测试量之大:单元测试、参数化测试和模糊测试加起来,每个版本要跑数十亿次测试,发布前要花好几天运行。我知道自己不喜欢部署服务前等漫长的 CI 构建,但像 SQLite 这样的东西需要完全不同级别的韧性。
agbell查看英文原文
Host Here. Thanks for sharing. Richard is a great story teller and adventures that SQLite has taken him on pretty interesting. I think he in on hn as well ( @SQLite). One interesting thing I found about how SQLite is developed is the amount of testing that is done. Between unit tests and parameterized tests and fuzzer tests they are doing billions of tests per release and spending days running them before each release. I know I don't like to wait for a long CI build before I deploy a service but something like SQLite needs whole different category of resilience.
Richard 想自建邮件服务器,以摆脱 Gmail 对个人通信记录的控制。
“我要写自己的邮件服务器。就在我们安排这次通话时,我还在做相关笔记。这是个大问题,难度至少不亚于写数据库引擎,甚至更难;但我不想受制于 Gmail。我不想让他们掌控我的命运,不想让他们掌控我所有对话的记录。我想自己掌控这些,所以我愿意经历很多痛苦、付出大量工作和努力,找出一个我能自己控制的方案。我可以去云端租一台虚拟机自己运行,而不依赖第三方来控制我的邮件。”
1vuio0pswjnm7查看英文原文
"I'm going to write my own mail server. I was making notes on that even as we were setting up this call. That's a big problem, and that's at least as difficult if not more difficult than writing a database engine, but I don't want to be beholden to Gmail. I don't want them controlling my destiny. I don't want them controlling the record of all of my conversations. I want to control that myself, and so I'm going to go through a lot of pain and a lot of work and a lot of effort to come up with some solution that I can control myself. I can go out and lease a virtual machine out there in the cloud and run it myself and not depend on a third party to control my email."
评论者对 Postgres 在模糊测试中的稳健表示佩服,同时称赞 SQLite 的长期实用价值。
“他设法让他试过的每一个数据库引擎都发生段错误,包括 SQLite,唯独 Postgres 例外。Postgres 总是能运行并给出正确答案。我们始终没能从中找出故障。Postgres 的人告诉我,我们只是还不够努力。让 Postgres 出错是可能的,但我们印象非常深刻。”这对 Postgres 来说很了不起。SQLite 也很不可思议,我多年来在各种重要项目里用过它。
EMM_386查看英文原文
> he managed to segfault every single database engine he tried, including SQLite, except for Postgres. Postgres always ran and gave the correct answer. We were never able to find a fault in that. The Postgres people tell me that we just weren’t trying hard enough. It is possible to fault Postgres, but we were very impressed. This is impressive for Postgres. SQLite is incredible. I've used it over the years in a variety of important projects.
早期就有人想要无服务器的 SQL 库,SQLite 最终让这个想法普及开来。
我记得 2000 年代初刚开始接触 SQL 时,我的一个反应是:“SQL 很棒,但为什么需要一个服务器?为什么不用一个简单的库和文件?”于是我问同事有没有这种东西。很多人的反应是:“这很蠢,你为什么要那样?在 localhost 上装个服务器就行了。”很少有人被说服。这甚至不是“好主意,该由别人来做”的问题;我觉得人们只是把 SQL 和服务器联系在一起,而作为新手,我没有这种先入为主的观念。几年后,SQLite 无处不在。它正是我当初设想的东西(只是我完全没有足够的技术自己实现)。
GuB-42查看英文原文
I remember in the early 2000s, I just got started with SQL and one of my reaction was "SQL is great, but why do we need a server? Why not use a simple library and files?" So I asked my coworkers if such a thing existed. And I had a lot of reactions along the lines of "it is stupid why do you want that? Just install a server on localhost" few people were convinced. It wasn't even a case of "nice idea, someone else should do it it", I think people just associated SQL with servers and by being new to it, I didn't have that preconceived idea. A couple of years later sqlite was everywhere. It was exactly what I had in mind (but with nowhere enough skills to do it myself).
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选