# S6 Bonus: A Version-Controlled Knowledge Graph with Gavin Mendel-Gleason of TerminusDB

Published: 2022-08-11
Duration: 1344s
Audio: https://pdst.fm/e/pscrb.fm/rss/p/audio4.redcircle.com/episodes/829bed22-3cc4-4cd6-b625-ca984bf904ce/stream.mp3

## Key Takeaways
- Born From Historical Research: TerminusDB began at Trinity College Dublin, where a study of civilizational collapse needed time-scoped, geographically scoped data with a complicated chain of provenance.
- Diffs Instead of Snapshots: A Prolog prototype fell over past about 20 million triples. HDT's succinct data structures scaled far better and led to layered updates that, Git-like, track change but store diffs because data snapshots would be too large.
- Features Cost Scalability: Early on, TerminusDB handled about a billion triples but required a full upload for any change. Adding transactions and Git-like features slowed it down, and the team is still winning that speed back.
- Rust Replaced a C++ Pain: After segfaults and re-entrancy bugs in the C++ HDT library, an engineer's Rust proof of concept won Gavin over. The team now finds slow spots in its Prolog orchestration layer and pushes them down into Rust.
- Commit Fully to Early Customers: The database wasn't ready for an early deployment, and the team split effort between that customer and the roadmap. Gavin says going all in would have surfaced and fixed industrial pain points sooner.

**A version-controlled knowledge graph database: Gavin Mendel-Gleason from TerminusDB on a database with Git-like branching, diffing and merging for connected data.**

———

When asked what he does for fun, Gavin Mendel-Gleason likes to program for fun. He builds stuff in his spare time, as tech dominates his life. Outside of tech though, he has 2 daughters, and his family enjoys spending time outdoors, specifically in the alps.

At Trinity College in Dublin, Gavin and his teammates were working on a project that required the storage and relation between loads of complex datasets. During this project, they decided to create a better kind of database, to help solve with these sorts of problems.

This is the creation story of [TerminusDB](https://terminusdb.com/).

Sponsors

- [Immediate](http://joinimmediate.com/codestory)
- [Orbit](http://orbit.love/codestory)
- [Postmark](https://postmark.com/codestory)
- [Stytch](http://stytch.com/codestory)
- [Verb Data](https://verbdata.com/codestory)
- [Webapp.io](http://webapp.io/codestory)

Links

- Website: [https://terminusdb.com/](https://terminusdb.com/)
- LinkedIn: [https://www.linkedin.com/in/gavinmendelgleason/](https://www.linkedin.com/in/gavinmendelgleason/)

  

Timestamps

00:00 – Intro

03:28 – Building the TerminusDB MVP

05:52 – Maturing Product and Roadmap

09:11 – Building the TerminusDB Team

11:30 – Scaling the Database

15:07 – Proudest Moment

16:18 – An Early Customer Mistake

17:48 – Influences on Gavin's Work

19:05 – What He'd Do Differently

20:02 – Advice for Young Entrepreneurs

Times are from the episode recording; ad breaks in your player may shift them a bit later.

  

Read the key answers from this episode, with quotes and timestamps from Gavin Mendel-Gleason from TerminusDB: [https://www.codestory.co/episodes/s6-bonus-what-if-git-and-mongodb-had-a-baby-building-a-version-controlled-knowledge-graph-with-gavin-mendel-gleason-terminusdb/](https://www.codestory.co/episodes/s6-bonus-what-if-git-and-mongodb-had-a-baby-building-a-version-controlled-knowledge-graph-with-gavin-mendel-gleason-terminusdb/)

  
  

Current Sponsors:

- [Tiger Data](https://tigerdata.com/)

- [Protected Harbor](http://protectedharbor.com/codestory)

- [Render](https://render.com/)

- [Fitnexa](https://www.fitnexa.com/)

- [Perplexity](https://pplx.ai/codestory)

- [Entelligence](https://entelligence.ai/)

Checkout our [Substack](https://news.codestory.co/subscribe)

Checkout our [Stacklist!](https://stacks.codestory.co/)

Checkout our [Patreon!](https://www.patreon.com/cw/codestory)

Hosted by  [Noah Labhart.](https://noahlabhart.com/)

  
  
Our Sponsors:  
* Check out Granola and use my code granola.ai/CODESTORY for a great deal: https://granola.ai  
* Check out Perplexity: https://pplx.ai/codestory  
  
  
Advertising Inquiries: [https://redcircle.com/brands](https://redcircle.com/brands)  
  
Privacy & Opt-Out: [https://redcircle.com/privacy](https://redcircle.com/privacy)

## Chapters
- 0:00 — Intro
- 3:28 — Building the TerminusDB MVP
- 5:52 — Maturing Product and Roadmap
- 9:11 — Building the TerminusDB Team
- 11:30 — Scaling the Database
- 15:07 — Proudest Moment
- 16:18 — An Early Customer Mistake
- 17:48 — Influences on Gavin's Work
- 19:05 — What He'd Do Differently
- 20:02 — Advice for Young Entrepreneurs

## Frequently Asked Questions
- **Q:** Why was TerminusDB created? — **A:** Gavin Mendel-Gleason and his colleagues at Trinity College Dublin were researching long-range historical patterns and needed to store complex, interrelated data along with its sources. As Gavin put it, "that problem really sort of drove us to try to create a different kind of database" [03:15].
- **Q:** How does TerminusDB handle Git-like version control for data? — **A:** Gavin's idea was to handle updates by creating intermediate layers built with HDT-like succinct data structures, which resembled how Git stores history. Because full snapshots of data would be too large, he explained, "we'd store the diff between them" [05:45].
- **Q:** Why did TerminusDB move from C++ to Rust? — **A:** The team had been chasing segfaults and re-entrancy problems in the C++ HDT library when an engineer named Matthias wrote a Rust proof of concept. Gavin said Rust offered much greater safety along with "getting high speed, similar speeds to what we had in C++" [13:20].
- **Q:** What is a real-world use case for TerminusDB? — **A:** Gavin described CAMS, a critical assets management system that maps how assets depend on one another to help small developing nations deal with climate change impacts, including a project in Dominica. He is proud that "we could really feel comfortable deploying it for real use cases like this" [16:05].
- **Q:** What would Gavin Mendel-Gleason do differently if he started TerminusDB again? — **A:** Gavin said that at some points he would have grown more slowly, taken on capital more slowly and focused on consultancies that build the product. He believes this keeps feature decisions honest, noting that "it's often best just to be your own consumer" [19:45].
