TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: A Database Written in C

9 点作者 alexpadula大约 2 个月前
Hey hackernews! I&#x27;d like to share a hobby and passion project I&#x27;ve been working on for almost a year now. It&#x27;s an open-source storage engine (underlying component of a database(s)) similar to that of LevelDB&#x2F;RocksDB but written entirely in C.<p>The storage engine is called TidesDB.<p>TidesDB is written entirely in C. It&#x27;s designed as a fast, transactional key-value storage engine built on a log-structured merge-tree (LSM-tree) architecture.<p>My journey with TidesDB began nearly 2 years ago whilst I was experimenting with various data structures and databases in Go. When I encountered the log-structured merge tree concept, I was initially overwhelmed by its complexity after reviewing other implementations.<p>However, after studying the original paper, I realized I could potentially simplify the design by focusing on just a 2-level approach(memory level and a disk level). This was challenging at first, and I scrapped many ideas along the way, but over time I discovered how powerful this design could potentially be.<p>The beauty of this design&#x2F;architecture is its extensibility. Since the disk level contains many SSTables (Sorted String Tables), we can efficiently pair and merge them in various ways - whether in parallel for speed or incrementally to minimize resource impact.<p>What began as a challenging learning process has I believed evolved into a unique engine design and library.<p>You can check out TidesDB code here: <a href="https:&#x2F;&#x2F;github.com&#x2F;tidesdb&#x2F;tidesdb" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tidesdb&#x2F;tidesdb</a><p>Website here (Architecture-design, documentation and more): <a href="https:&#x2F;&#x2F;tidesdb.com" rel="nofollow">https:&#x2F;&#x2F;tidesdb.com</a><p>There are a variety of FFI libraries in the works for C++, GO, Python, Lua and more!<p>Currently TidesDB is nearing its first major release, we are still in beta development.<p>I&#x27;d love to get your thoughts, questions and all :)

2 条评论

Rochus大约 2 个月前
That&#x27;s a cool project, thanks for sharing! Does string sorting also consider unicode (or did I get SSTables wrong)?
评论 #43436092 未加载
ivanimprv大约 2 个月前
tried tidesdb with python and it&#x27;s really fast. a transactional key-value database written in c with a modern lsm-tree architecture. worth checking out
评论 #43436905 未加载