15

Say you wanted a database inside a huge distributed JSON file that scaled vertically.

So that get("users.jane33"), pulls Jane33's profile.

Are there any specs for that? I've seen MongoDB, but no longer like its license.

I'm thinking a DHT with pointers, and raw data blobs. But would like to see what's already working.

you are viewing a single comment's thread
view the rest of the comments
[-] TehPers@beehaw.org 2 points 13 hours ago

Maybe a different kind of solution to what you're looking for, but JSON-LD does this in a distributed (multi-system) manner. Maybe a little more distributed than you want, though.

Essentially, you can use IRIs (and IRI references) to point to specific objects/subtrees. The thing is, IRIs are usually dereferenceable as URLs that point to the object's value, so you'd use a HTTP client to fetch it in order to dereference the data.

It's used by Lemmy of course (and ActivityPub in general), and it's mostly designed when you have different people publishing JSON documents that want to link to each other.


More along the lines of what you're probably looking for is any NoSQL document database. You want to be able to set an index within the document that the database can use for fast lookups. There's a ton out there, so not much point listing them here when you can find lists online very easily.

Personally, I'd rather just use a SQL database for this though. To begin with, you wouldn't design your database to be a single, large, ever-growing JSON document, but rather several JSON documents (one per "object" being stored, like one per user). This allows your distributed database to split the load on requests coming in via sharding as well as help it quickly find what you're looking for (assuming your query is on an indexed key). SQL databases let you better structure the data you actually intend to query on (IDs, names, whatever), and you can put whatever other attached data you want as a JSON field (Postgres JSONB for example).

this post was submitted on 29 Nov 2026
15 points (69.2% liked)

Programming

29423 readers
468 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS