News for hackers. Stuff that matters.
Re:Death by a Thousand Microservices by theshrike79 on Tuesday September 12, 2023 @03:35AM (#37477878)
Splitting data is just a hardcore way of splitting the responsibility for the data.

You can't have 42 different classes directly poking the User-table for example. You need one clear location that has the responsibility for the data.

If you move the User-table to a different database schema, other places CANNOT touch it because they won't have access to it =)

Re:Death by a Thousand Microservices by aledalgrande on Tuesday September 12, 2023 @03:43AM (#37477933)
And then the order table will need to set user ids as a foreign key and you will have two sources of truth lol

Will be fun when you decide that you want to have organizations to be linked to orders instead of users.

All this to say, data management and having more than one source of truth complicates your world a lot. The responsibility for writing the data has to be solved at the appropriate layer: only one entity writing it.

Re:Death by a Thousand Microservices by rewmie on Tuesday September 12, 2023 @12:39PM (#37483911)
> And then the order table will need to set user ids as a foreign key and you will have two sources of truth lol

Why should your order manager service be tightly-coupled to your IAM service when the only responsibility it has is to store a single ID?

Re:Death by a Thousand Microservices by fragmede on Tuesday September 12, 2023 @12:52PM (#37484110)
> And then the order table will need to set user ids as a foreign key and you will have two sources of truth

You might be databasing wrong if that results in two sources of truth.