News for hackers. Stuff that matters.
Re:DevOps Is Bullshit by jedberg on Thursday October 20, 2022 @12:17PM (#33276926)
What is your definition of Spaghetti Architecture? Netflix had a good SOA that enabled rapid development and had strong cut lines between services, with no way to access the data of a service without going through the service's API.

I think that's where most people go wrong. They put a bunch of services in front of a shared database, which means that they don't have to go through a service's API to get to it's data, and that's what breaks everything.

Re:DevOps Is Bullshit by eropple on Thursday October 20, 2022 @12:42PM (#33277267)
This is really important, and I've gotten a lot of quizzical looks when making this assertion over the years: data is owned by one and only one service. If two pieces of code assert ownership of it by mutating that data or looking past the public encapsulation of that data, then that code is the same service.

If you see a queue between two services, that is usually an indication that some ownership is being transferred (even briefly), and that is a critical point where you need introspection and observation.

Re:DevOps Is Bullshit by wikibob on Thursday October 20, 2022 @01:05PM (#33277607)
> Data sovereignty per microservice

> An important rule for microservices architecture is that each microservice must own its domain data and logic . Just as a full application owns its logic and data, so must each microservice own its logic and data under an autonomous lifecycle, with independent deployment per microservice.

https://learn.microsoft.com/en-us/dotnet/architecture/micros...

Re:DevOps Is Bullshit by JamesBarney on Thursday October 20, 2022 @02:23PM (#33278660)
The big issue I've seen is that takes a lot of work, so people cut corners. The problem is of course when you cut corners with microservices and rely on a shared database for instance, suddenly you're dealing with 40% of the costs of a microservices and 0% of the benefits.
Re:DevOps Is Bullshit by GauntletWizard on Thursday October 20, 2022 @03:30PM (#33279507)
Shared database can be a reasonable microservice boundary, especially when using database-as-queue or database-as-mucroservice. In the former, services a, b and c can insert and query but only D can update, i.e. any service can creat a work-order but only D can mark it completed. I. The latter, nobody can read or write and all access to tables is done through stored procedures.

I don't recommend either, and it's still a code smell, but with clear definitions they can work.

Re:DevOps Is Bullshit by JamesBarney on Thursday October 20, 2022 @03:53PM (#33279830)
The benefits of the microservice pattern are you can build separate teams responsible for different business logic, and they can have their own deployment schedule. You don't get either of those benefits when a b and c have to coordinate on their work-order creation business logic, and a, b, c and d all need to be deployed at the same time anytime the schema changes.

Btw some of the confusion might be what I mean by shared database. I didn't mean two services sharing a limited set of tables, using the database as a rabbitmq replacement. I meant sharing the backing database of the microservices. It sounds like we probably agree I just wasn't very clear about what I meant by sharing a database.

(Ironically I am literally using a database as a queue to share data between two services we are running in prod. I don't think of it as a microservice because it's not separate teams, it just because our monolith is hosted on a platform that doesn't support certain libraries so we had to role those libraries onto a separate platform that does support them.)

Re:DevOps Is Bullshit by GauntletWizard on Thursday October 20, 2022 @04:04PM (#33279976)
I think we're in violent agreement - A database can be a queue and that doesn't link things as the same, but it's easy to break those promises and you need to be clear in that promise to begin with. If two "microservices" have to move in strict lockstep, they're not microservices, they're components of a larger service.
Re:DevOps Is Bullshit by P5fRxh5kUvp2th on Friday October 21, 2022 @07:05AM (#33286741)
That's completely untrue and glosses over the very real costs of transaction management in such an environment.

Using a shared database allows you to punt a lot of that complexity to a system that's been specifically designed for it, and working well for probably 20+ years.

Too many people think microservices don't have their own, severe, downsides. The likes of netflix, google, et al, can afford to pay people whose entire job is to manage the complexities of these approaches that flat don't exist in other scenarios.

But it's a hell of a lot simpler to use a single database if you can get away with it.

Re:DevOps Is Bullshit by lamontcg on Thursday October 20, 2022 @12:49PM (#33277389)
Yeah, services should be formed around the needs of data, and you shouldn't run multiple services in the same image/container just to split the code up. It shouldn't ever be about the code.

Amazon's SOA architecture at least all started out about pulling bits of data spread over hundreds of servers into services that could take advantage of caching.

Re:DevOps Is Bullshit by maxrev17 on Thursday October 20, 2022 @04:57PM (#33280588)
This is it exactly!
Re:DevOps Is Bullshit by throwdbaaway on Thursday October 20, 2022 @03:36PM (#33279598)
I have seen the "data service" design pattern that tries to work around this, by having a CRUD microservice to front a database, providing hundreds of APIs to read/write the data for 50 other microservices. If one of these CRUD microservices goes down, everything breaks.