News for hackers. Stuff that matters.
Re:How to Design Software Architecture for Startups by mjr00 on Monday May 08, 2023 @11:38AM (#35862807)
In the first paragraph, that doc echoes exactly what I explain.

> You need to carefully assess the application architecture before adopting this pattern, and make sure that you avoid hot tables (single tables that are shared among multiple microservices).

Using the same database table with multiple services (micro or not) is an absolute disaster.

Re:How to Design Software Architecture for Startups by lukeasrodgers on Monday May 08, 2023 @11:49AM (#35862963)
Having service A write to a table and service B read from that table in the same database is a perfectly suitable architecture for many applications.
Re:How to Design Software Architecture for Startups by mason55 on Monday May 08, 2023 @11:52AM (#35863016)
At that point it's just an argument about "what is a service"? But people typically find that using the database as an API ends up with the services so coupled that they might as well be one even if they technically run as different binaries.
Re:How to Design Software Architecture for Startups by tmshkr on Monday May 08, 2023 @03:06PM (#35865736)
Exactly. We’re talking about software architecture for startups here. Best to keep it simple.
Re:How to Design Software Architecture for Startups by Scarblac on Monday May 08, 2023 @03:14PM (#35865812)
Isn't the database just another service?

Are other services also restricted in the same way?

Re:How to Design Software Architecture for Startups by lucasyvas on Tuesday May 09, 2023 @09:36PM (#35882586)
It's nuanced, but it's not because there is no single owner.

If microservices share a database, it's not clear who migrates the schema and coordinating it is nearly impossible because another piece of code in another service may be reading the old schema and break.

Sharing the database means you have a distributed monolith - you lose all independent deployability. It is the worst of both worlds.

The exception may be if you share a database instance, but each service has its own schema and only has authorization to read and write to its own schema.

That doesn't make the single database a service - it would make it shared infrastructure, however. This may bring its own maintainenance challenges but it doesn't violate any principles.