r/softwarearchitecture • • 3d ago

Discussion/Advice [ Removed by moderator ]

[removed] — view removed post

16 Upvotes

34 comments sorted by

•

u/softwarearchitecture-ModTeam 3d ago

Posts that are clearly generated by an AI are not allowed in the community. If you'd like to ask a question or start a discussion, create a separate post that is in your own words (even if English isn't your first language). Thank you for understanding.

31

u/SessionIndependent17 3d ago

in the age of AI, it could have formatted this for actual humans to read.

8

u/hirebirhan 3d ago

I could have done better, will consider it for next time

7

u/z960849 3d ago

This was perfectly formatted and a good story. My team is currently having the same issues but we can't move to a mono repo.

1

u/hirebirhan 3d ago

Think of the long-term plan, I think it's important to take action as early as possible if there is a need to do so.

1

u/z960849 3d ago

Unfortunately I'm in a 300 person engineering organization with multiple verticals. Each vertical has multiple teams and multiple development schedules and different languages I currently have about 20 separate repos on my local cause I can't trust that other people api behave as I expect. But at least I have very high Claude budget .

27

u/grumpy-554 3d ago

Then someone else would complain that it’s AI slop. There is no way to please everyone

5

u/definitelyoneof 3d ago

This was definitely written by AI.

5

u/Suspicious-Disk6077 3d ago

I thought it was AI lol

3

u/PenGroundbreaking160 3d ago

I did not find any issue reading the post it was very enjoyable

5

u/Hithrae 3d ago

Don’t be grumpy

-20

u/WuhmTux 3d ago

in the age of AI, you would not need to write this text because ai can develop better architectures than any human could do.

9

u/foresterLV 3d ago

it's not there yet even with fable/opus.  when model encounters a bug or need new feature developed it almost never thinks from perspective how existing design can be unified/generalized and jumps to the shortest path possible adding just another special case. over time it grows to a big ball of mud. so anything big pretty much need to either invest into strict reasoning harness (not part of existing subscriptions/tools) or observe the changes and add suggestions/reviews/architecture grooming all the time.

1

u/gbrennon 3d ago

its that classic scenario:

  • model wll poorly impl that feature, modify tests to pr be mergeable, break conventions and lie to u multipl times claiming that its the final version 🤣🤣🤣

-3

u/WuhmTux 3d ago

I think you have missed the development of the last three months.

Its old knowledge...

3

u/foresterLV 3d ago

I had that experience just last week with fable 5.2 orchestrating new service/product feature. I noticed its fixing same bugs over and over in the different components but all being same class of problem (synchronizing/ordering distributed state), when asked to do the analysis on design level and why per component problems return in a cycle it basically agreed to change design and rewrite half of the code done. no regressions since then. but it pretty much was wrestling with own decisions for day or so until interrupted.

1

u/grumpy-554 3d ago

Can it? Would love to see that.

10

u/ShineProper9881 3d ago

2 weeks to migrate from microservices to a modular monolith? I call bullshit. The database migration alone is pure hell.

7

u/IGuessSomeLikeItHot 3d ago

I would guess their database was a monolith to begin with.

1

u/hirebirhan 3d ago

You call it whatever you want. We did it but we were team of 3 with Claude.

1

u/Lilacsoftlips 3d ago

I dunno why this person is calling bs. With three people we did something similar (40 repos) before ai in a couple weeks. It’s mostly just changing stuff like GitHub actions/whatever your ci is.  The main issue was coordination with code owners and roadshowing how it would work. 

1

u/z960849 3d ago

Why would you need to migrate the data?

1

u/ShineProper9881 3d ago

With microservices you usually have separate databases per microservice. In a monolithic architecture you would have a monolithic database. Therefore migration.

18

u/heavy-minium 3d ago

Microservices are very cool when you can have a stable architecture with relatively stable seams. But if what you are doing or your phase of growth doesn't allow for that, they can quickly turn into a useless exercise.

Best to be implemented in a company that is already mature and where you don't constantly redefine boundaries and only ever pile up more functionalities in existing domains.

1

u/analcocoacream 3d ago

Interesting do you have more content on this?

9

u/Strange_Passenger814 3d ago

Good work on identifying, accepting and correcting your architecture mistake. Microservices are a solution to a growing problem. One never starts with microservices, you grow into it. There is a ton of additional work involved, and that only make sense at a scale.
But the lessons learned should not be modular monoliths are better than microservices or vice versa. When it comes to software engineering, you always have to ask, does it make sense given my constraints and context. There’s no X is always better than Y situation.

4

u/beattyml1 3d ago

In general m greenfield work in an agile environment usually should be a monolith/modular monolith. You only break out service once you fully understand the domain well enough to understand the problem you’re solving thoroughly and generally have good understanding of the roadmap for the next year and are doing architecture and requirements for it in advance. Some services may demand being broken out sooner for scaling reasons but those usually hit you in the face with the need. The other case where you might proactively move to microservices is if the team working on your code base is too large to function as one scrum/pizza sized team and you can assign each team a service this tends to be you forcing the known roadmap and architecture planning before it naturally happens a bit though as even in this scenario you still need to do all the actual planning it’s just the price of being wrong so smaller and the price of not splitting is higher.

3

u/Separate_Panic6805 3d ago

Your story isn't uncommon, and the issue may not be what you thought it was.

I find it interesting that you features that should have been simple required coordination across multiple services. Is it possible that you got your service boundaries wrong? It is the hardest thing to get right when you're building a microservices architecture, and it's a subject that's poorly handled by the literature.

In an ideal world, features are contained within a single microservice, or a couple of services at most. If that isn't the case, then you're always going to find a monolith easier to work with.

This isn't about code stability: optimally drawn services absorb change easily. But achieving that optimal structure is the hard problem with the architecture.

1

u/avropet 3d ago

Getting the boundaries "right" is indeed the hard part. And sometimes the world changes and the "right boundaries" are no longer right and need to shift. Those types of refactorings are a hell of a lot easier if they are inside a modular monolith. I would always start out as a modular monolith and only extract modules to a microservice if there is a genuine (business) need for it. Stay monolith for as long as possible because you never get that simplicity back if you give it up! Working with an messagebus would be the way to go to let your modules communicate with each other. Only if one of your modules becomes a microservice you need a "real" message broker, but in the mean time you could use an in process messagebus or something in your monolith's database. Design and build your modules as if they could be a microservice but then fight tooth and nail to prevent that from happening ;)

2

u/RedditForW 3d ago

Follow

1

u/Just_Information334 3d ago

Microservices are a solution to people communication problem and office politics. Some times, to legal requirements.

They are not a solution to any technical problem. They only add more of those.

1

u/jah-roole 3d ago

Microservices have a very special place in architecture when multiple stars align just right. In all other cases it is a fucking pain in the ass, expensive or both.

1

u/kkodev 3d ago

What is the purpose of this slop