Hacker News new | ask | show | jobs
by tkone 478 days ago
Why not just use pouchdb? It's pretty battle-tested, syncs with couchdb if you want a path to a more robust backend?

edit: https://pouchdb.com/

2 comments

Scale really. GoatDB easily handles hundreds of thousands of items being edited in realtime by multiple users
Hundreds of thousands of items and multiple users could be done on a $5 PI zero 2 w (1Ghz quad-core A53) with the C++ standard libary and a mutex.

People were working at this scale 30 years ago on 486 web servers.

I swear we've been going backwards for the past 15 years
Doing concurrent editing AND supporting offline operation?
What do you mean by "offline operation"? Which part is non-trivial?
Your server/network goes down, but you still want to maintain availability and let your users view and manipulate their data. So now users make edits while offline, and when they come back online you discover they made edits to the same rows in the DB. Now what do you do?

The problem really is about concurrency control - a DB creates a single source of truth so it can be either on or off. But with GoatDB we have multiple sources of truth which are equally valid, and a way to merge their states after the fact.

Think about what Git does for code - if GitHub somehow lost all their data, every dev in the world still has a valid copy and can safely restore GitHub's state. GoatDB does the same but for your app's data rather than source code

So now users make edits while offline, and when they come back online you discover they made edits to the same rows in the DB. Now what do you do?

Store changes in a queue as commands and apply them in between reads if that's what you want. This is really simple stuff. A few hundred thousand items and a few users is not a large scale or a concurrency problem.

so can couch/pouch? (pouch is a façade over leveldb on the backend and client-side storage in your browser)

have you done benchmarks to compare the two?

i know from personal experience leveldb is quite performant (it's what chrome uses internally), and the node bindings are very top notch.

GoatDB is web scale. PouchDB isn't web scale.
But how many goats does pouchdb have? I'm betting 0.
you can fit a lot of goats into a pouch, depending on the size of the pouch
"A pouch is most useful when it is empty" - Confuseus