News for hackers. Stuff that matters.
Re:Death by a Thousand Microservices by hot_gril on Tuesday September 12, 2023 @12:07PM (#37483385)
Our large org is familiar with the 1 DB approach, cause that's what we held onto until it became blatantly necessary to jump to microservices. Even our subteam is feeling the need to divide up our service because its scope has kept expanding.

Startups shouldn't start with microservices. I've worked for a few different ones, and I've always created a monolith while avoiding all kinds of premature planning. Doesn't mean I'd run things that way with 200 people owning systems with evolving requirements for 10+ years, or even two separate dev teams of 5 people.

Re:Death by a Thousand Microservices by corethree on Tuesday September 12, 2023 @02:56PM (#37486028)
Right. But you likely split the db for performance not just for decoupling data and code. Microservices is an option for scaling. My argument is more against it as a way to decouple and organize logic.
Re:Death by a Thousand Microservices by hot_gril on Tuesday September 12, 2023 @03:24PM (#37486536)
Performance wasn't the issue; mono DB was actually fast enough. Multiple teams' services sharing tables became effectively a fragile API between them with hidden dependencies. New business requirements were introducing widespread breaking changes, and the org relied too heavily on a few experts who understood it all. Plus, schema changes were behind a ton of red tape since they affected everyone.

Also if by "decoupling data and code" you mean decoupling data from code, that's not the goal. It's to decouple one team's data from another team's data, and to properly abstract it.

The only reason our mono-DB even lasted this long was because previously, very few requirements were changing over time. So when people say their big org is monolithic, I can believe it. It works in some scenarios, in most it doesn't.

Re:Death by a Thousand Microservices by corethree on Thursday September 14, 2023 @12:49AM (#37505103)
>you mean decoupling data from code, that's not the goal. It's to decouple one team's data from another team's data

Use a schema bro.

You can do this with two schemas. Think of it as folders in databases. Then give different permissions to users per schema.

Re:Death by a Thousand Microservices by hot_gril on Friday September 15, 2023 @08:29PM (#37530736)
Our DBMS doesn't support schemas, but our team's services just use separate tables with separate ACLs. I think of those cliques as separate databases cause it's basically the same thing.

It can also have multiple "databases" on a single running instance, each with separate quota and ACLs. So each team uses its own database. Only a few teams are special enough to need a dedicated instance.