Recent submissions

Comment · 2 months ago
Answered elsewhere but the tl;dr is lock the db file. The design is multiple readers, single writer.
Comment · 2 months ago
Why not use something else? I wanted to build something from scratch.

What you've built with ArcadeDB is definitely impressive, but much larger scale that what I was trying to accomplish with this. Like the repo says, think sqlite but for graph dbs :)

Comment · 2 months ago
Not comparable. Similar to Neo4j vs LatticeDB. Lattice's goals are simplicity, single file, super easy to start using. Surreal supports embedded mode, but my understanding is it is not a single file. Surreal supports a huge number of data models, Lattice is more focused. Surreal also appears to have a company behind it. Lattice is just me.

If you are looking for something lightweight and simple, choose Lattice. If you are an Enterprise looking for hosting, Enterprise support, and maybe a database that can handle all of your needs instead of a specific one, pick SurrealDB.

I hadn't heard of SurrealDB until your comment though, so take what I have to say here with a grain of salt.

Comment · 2 months ago
Just added file locking to avoid concurrent writers across processes in the latest release.
Comment · 2 months ago
Thanks - appreciate the feedback! I wanted the README to be something you could quickly glance at, get a sense of the project and whether it's what you are looking for, and be done with it.
Comment · 2 months ago
Thanks for sharing this. The lattice numbers are pretty close but my sqlite numbers are way off. I got a new computer since then so will remeasure.
Comment · 2 months ago
I started thinking more deeply about how I would actually do this today and it won't be as straight forward as I initially thought. Will keep it on the radar and see if I can figure out a clean way to implement. Great suggestions!
Comment · 2 months ago
I am in the final stages of adding this based on your comment. Just wrapping up doc updates and will push a new release with hot copy functionality tonight!
Comment · 2 months ago
Within the same process it's enforced at the db level. After reviewing the code more I see we don't have a mechanism in place to manage safety across processes. Will add a file lock mechanism tonight. Great call out!

In general though, the goal for this was single writer multiple readers. That was a design decision to keep things simple.

Comment · 2 months ago
The permissions question is interesting. I think the answer depends on context. One approach would be to create some edge types `hasAccessTo` and `accessibleBy` that connect a user to a node. Then I'd create an edge type `childOf`. The rest is business logic. Permission checks can just traverse up to the first root node with permissions. The downside is this is all business logic, so can't really look at the database and understand this is how it works. Depending on the database you could create a function that returns permissions for any node, that encapsulates this logic.

Anyways, thanks for checking it out! Really appreciate it. Good luck with your project!

Comment · 2 months ago
very cool site!
Comment · 2 months ago
Great question! Two reasons. One, I wanted to build something on my own from the ground up rather than contribute to an already established large project. For me, it's a better way to learn. Hopefully people find it cool and want to use it. But if the best that happens is it's just a fun project I built then that is just fine for me. Secondly, the data layouts are different. They are very similar in the single-file, graph db respect. But lattice is transactional and row oriented while kuzu is columnar.
Comment · 2 months ago
Yes! This is something I've been thinking about quite a bit the past few weeks. We are going in this direction at work and I think graph storage is a natural way to think about this.
Comment · 2 months ago
I used claude extensively (as well as codex, I finding myself switching between the two every few months). How I used claude varied by the stage. I spent a lot of time initially going back and forth with claude on the idea, figuring out what exists, what would make this interesting, key features I wanted as a user and how to build something around that that made sense as a product.

The initial phases of building I would build out piece by piece. For example, building out the file system interactions I would have claude build a feature and explain how it worked in an educational manner (e.g., like it was a section in a book on latticedb internals). I would then read through the code. This was a great way to learn and build, simultaneously.

In the later stages, where the features and work was more complex, I would spend more time discussing, instructing, and verifying, but less time understanding the actual implementation. I'll give you an example. It's been a long time since I've handwritten SIMD code. I could try and review claudes output, but I am certain I'd miss any subtle bugs that may exist. I found it more productive to assume the code was right and focus on thinking about how I would verify that. Benchmarking, playing with latticedb, etc. were my primary tools for verifying the work. I could run a benchmark and see performance was great. Then I'd explore the test vectors and realize they were trivial, completely invalidating the benchmark results. So we would go back to the drawing board, create a new benchmark set, see results weren't great, and evaluate what was wrong with the implementation. Sometimes features would take days to get out just because of the iteration loop.

Comment · 2 months ago
Thank you!

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton