The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Building Crash-Consistent LSM Trees with Write-Ahead Logging and io_uring
Your storage engine passed every kill -9 test.
Then the power failed, and acknowledged writes were gone.
The file's contents had reached the disk. The record of where to find them never did.
Deterministic Storage Engines in C++ shows how to build an engine that proves otherwise.
Minimum price
$29.00
$39.00
About the Book
Your engine passed every kill -9 test. Then the power failed, and acknowledged writes were gone.
Book description
Most storage engines don't lose data because of a recovery bug. They lose it because of a missing barrier. The new manifest was written and synced, then renamed into place, and nobody synced the directory. The contents reached the disk. The record of where to find them never did.
Deterministic Storage Engines in C++ is a build-it-yourself guide to an LSM tree where every durability promise names the barrier that provides it, the failure it survives, and the test that proves it.
You build a complete reference engine in modern C++23 on Linux:
This is not a survey of database papers. Each chapter opens with a concrete failure and works through the mechanism that prevents it:
O_DIRECT is not durabilityfsync can never be retriedEvery chapter closes with a Durability and Throughput Ledger covering throughput and latency ranges, read, write, and space amplification, and exactly how durability was verified.
Who it's forfsync and a correct databaseBundles that include this book
About the Author
Weston Ashgrove is a C++ systems engineer who builds software where being wrong or slow has a cost. He came up through quantitative trading, building order books, matching logic and the low-latency infrastructure underneath them and now brings the same discipline to performance engineering, concurrency, storage, networking, GPUs, and AI inference.
His rule for performance-critical code is simple: nothing is true until it has been profiled, fuzzed, and replayed. Every technique in his books comes with the measurement that proves it, the trade-off it costs, and the failure it prevents. He writes for working engineers who ship and debug production C++, and he leaves out anything that only works on a slide.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.