News for hackers. Stuff that matters.
Re:MondayDB: A new in-house data engine from monday.com by bob1029 on Monday October 09, 2023 @06:29AM (#37818890)
> Unlimited tables

If you ever find yourself in a position where you need a database table per instance of an abstraction, you've almost certainly failed to model the domain appropriately.

If you find yourself in a position where you think you need to write your own database engine because nothing on the market can even approach your problem, you probably need to go take a nap.

The only instancing that makes sense to me is at the database level (aka one per customer/board/etc), and if you're going to be doing a lot of database files... Did SQLite even remotely cross the mental threshold here? I can see several ways to make it solve this problem if you are going to insist on one table/file per real world thing.

One SQLite database per board with everything defined in SQL command text using application defined functions to bind to platform features. Customization can be performed deeply and at the grain of each board. You could allow enterprise customers to bring custom schemas or even code modules to inject and call. Would also make import/export absolutely trivial for any customer.

Or we can spend all our special innovation tokens on developing a goddamn database engine from zero...

Re:MondayDB: A new in-house data engine from monday.com by benjaminwootton on Monday October 09, 2023 @06:50AM (#37819004)
One table or schema per customer is possibly a valid model for segregation in a multi tenant system. I’ve never felt the need to do it before, but maybe it could work, if you squint?
Re:MondayDB: A new in-house data engine from monday.com by baq on Monday October 09, 2023 @07:07AM (#37819101)
If you never touch the schema in any way, perhaps...? It sounds like an operational nightmare otherwise.
Re:MondayDB: A new in-house data engine from monday.com by benjaminwootton on Monday October 09, 2023 @07:22AM (#37819190)
But the advantages are - better for compliance, faster analytical queries, possible to upgrade people at different paces. I agree it would be painful from a database migration perspective but I can see situations where it might be the right call.
Re:MondayDB: A new in-house data engine from monday.com by throwaway0365 on Monday October 09, 2023 @07:49AM (#37819404)
I have read about table inheritance but never used it. It seems like it would make it possible to alter the schema of the root table, but it probably introduces other issues that I am not aware of. You would still need to manage indexes, constraints and default values for each child table, but the structure of the table itself would be inherited.
Re:MondayDB: A new in-house data engine from monday.com by nijave on Monday October 09, 2023 @06:59AM (#37819054)
How do you manage all these sqlite dbs? Throw them on 1 large server, develop some scheme to sprinkle them across multiple servers, something else?

Redis and Cassandra already handle distribution out of the box.

It seems like there product is basically a web GUI for creating db tables with workflow automation so it doesn't seem like too far of a stretch to have 1 table per customer table. I guess the alternative is designing some system for shoving arbitrary schemes into another schema.

I guess https://en.m.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%... is an option

Re:MondayDB: A new in-house data engine from monday.com by robust-cactus on Monday October 09, 2023 @07:37AM (#37819293)
Eh - sometimes you gotta solve hard problems and no amount of simplification is going to net good results.
Re:MondayDB: A new in-house data engine from monday.com by shafyy on Monday October 09, 2023 @07:48AM (#37819387)
Eh - we're talking about a glorified project management application here.
Re:MondayDB: A new in-house data engine from monday.com by sgarland on Monday October 09, 2023 @08:20AM (#37819660)
To have any hope at HA with SQLite, you’d have to use something like RQLite [0], and at that point you’re already building a far more complex system than Cassandra + Redis.

They didn’t build a DB, they taped some products together with middleware. That isn’t to say what they did is bad, just that it’s not “let’s write a DB from scratch” as the headline implies.

[0]: https://github.com/rqlite/rqlite

Re:MondayDB: A new in-house data engine from monday.com by otoolep on Monday October 09, 2023 @08:55AM (#37819968)
rqlite[1] creator here, happy to answer any questions.

[1] https://www.rqlite.io

Re:MondayDB: A new in-house data engine from monday.com by sgarland on Monday October 09, 2023 @09:12AM (#37820115)
Hi! Your product looks quite good to be clear, and that was in no way a slam on it. I’ve long wanted a reasonable excuse to use it, just to see how it works at scale.

One thing that stopped me from trying it in the past for a project was this:

> Is rqlite a good match for a network of nodes that come and go – perhaps thousands of them?

> Unlikely.

While I wasn’t going to get to thousands, it was going to be hosted on K8s, and it seemed like I’d have to write lifecyclehooks to ensure nodes gracefully left consensus, and others felt that was an unnecessary complexity for the problem. Can you speak more to this point, since in the FAQ you also say it can run on K8s? If a node dies due to, say, hardware failure, when it rejoins is it seen as a slightly out-of-date existing node since it’s part of statefulset? If so, assuming quorum is maintained, this is probably a lot easier than I was making it out to be.

Re:MondayDB: A new in-house data engine from monday.com by otoolep on Monday October 09, 2023 @10:08AM (#37820600)
When I say "thousands coming and going" I'm talking about trying to run rqlite on, say, a network of cellphones. When people ask me about this, it usually means they have the wrong mental model of what rqlite is.

However, running it on Kubernetes should work quite well. Check out the documentation at https://rqlite.io/docs/guides/kubernetes/

>If a node dies due to, say, hardware failure, when it rejoins is it seen as a slightly out-of-date existing node since it’s part of statefulset? If so, assuming quorum is maintained, this is probably a lot easier than I was making it out to be.

Assuming I follow you, yes, this should work fine -- and exactly as you expect. I suggest you try it out, and if you don't understand what you're seeing file a ticket on GitHub, or join the rqlite Slack[1].

[1] https://rqlite.slack.com/

Re:MondayDB: A new in-house data engine from monday.com by renegade-otter on Monday October 09, 2023 @09:00AM (#37820029)
There are RARE exceptions.

AirTable developed their own DB, but their case may be justified. I listened to an interview with a founder once - very thoughtful and reasonable. They fully understood what they were getting into.

But by default, NEVER:

* Write your own DB

* Write your own search engine to match ElasticSearch or other serious technologies

It will take over your life, and then ruin it.

Re:MondayDB: A new in-house data engine from monday.com by tablet on Tuesday October 10, 2023 @03:08AM (#37829312)
Not sure why they needed own DB. Fibery.io has similar domain and we built everything on Postgres. Works like a charm and you even don't have Airtable bases connectivity problem. We have schema-per-customer and table-per-entity-type model, performance is quite good.
Re:MondayDB: A new in-house data engine from monday.com by dsagal on Monday October 09, 2023 @11:14AM (#37821298)
Shhh, don't tell them about SQLite! It's the secret sauce behind Grist (I am a founder), and we are sort of competitors. Wouldn't want Monday.com knowing about our competitive advantage!