News for hackers. Stuff that matters.
Re:Give Me Back My Monolith by merb on Wednesday March 13, 2019 @06:21PM (#19384525)
> So naturally, branching, building and testing across all these different microservices is difficult. Imagine having to roll back a commit, then having to find the equivalent commit in the two other parent services, then rolling back the horizontal services to the equivalent commit

that should not happen. if it does you don't have a microservice architecture, you have a spaghetti service architecture.

Re:Give Me Back My Monolith by tabtab on Wednesday March 13, 2019 @06:25PM (#19384548)
How does one know if X is the wrong solution or if X is the right solution but the shop is "doing X wrong"? This also applies to monoliths: maybe they can scale, but one is doing them wrong. Changing from doing monoliths wrong to doing microservices wrong is obviously not progress.

The same issue appeared when OOP was fairly new: people started using it heavily and ended up making messes. They were then told that they were "doing it wrong". OOP was initially sold as magic reusable Lego blocks that automatically create nice modularity. There was even an OOP magazine cover showing just that: a coder using magic Legos that farted kaleidoscopic glitter. Microservices is making similar promises.

It took a while to learn where and how to use OOP and also when not to: it sucks at some things.

Re:Give Me Back My Monolith by taneq on Wednesday March 13, 2019 @08:57PM (#19385558)
Simple:

If X is a technology I don't like, and it's not working for you, then it's the wrong solution.

If X is a technology I don't like, and it is working for you, then you simply haven't scaled enough to understand its limitations.

If X is a technology I like, but it's not working for you, then your shop is "doing X wrong".

If X is a technology I like, and it's working for you, then it's the right solution and we're both very clever.

Re:Give Me Back My Monolith by staticassertion on Wednesday March 13, 2019 @10:48PM (#19386130)
edit: See below
Re:Give Me Back My Monolith by taneq on Wednesday March 13, 2019 @11:02PM (#19386193)
Uh, my post was snark towards engineers' general tendency to champion and defend their own favourite architecture over competing approaches rather than focusing on the most suitable architecture for the circumstance, in response to this question:

> How does one know if X is the wrong solution or if X is the right solution but the shop is "doing X wrong"?

Edit: And a civil conversation ensued. :)

Re:Give Me Back My Monolith by staticassertion on Wednesday March 13, 2019 @11:19PM (#19386278)
Sorry, I just misread your post as being more of an attack. As I had said, I dislike the constant "hype means something is bad" posts that I've been seeing for years - I think it's really unfortunate.
Re:Give Me Back My Monolith by taneq on Wednesday March 13, 2019 @11:34PM (#19386333)
No worries, I can see how it might have been read that way in the wider context of the conversation. And I totally hear you on the "hype equals bad" thing. If something's popular, it's popular for a reason. That reason MIGHT just be trendoids jumping on a hype train, but it might also be because the thing is good.
Re:Give Me Back My Monolith by freedomben on Wednesday March 13, 2019 @07:35PM (#19385081)
If you want to learn "the right way" I highly recommend "Building Microservices: Designing Fine-Grained Systems" by Sam Newman[1]

[1] https://smile.amazon.com/Building-Microservices-Designing-Fi...

Re:Give Me Back My Monolith by notyourday on Wednesday March 13, 2019 @08:13PM (#19385299)
I have posted about this before. OP is describing nano-services, not micro-services. Nano-service is micro-service that provides leftpad via JSON api.

You have an auth.yourapp.com and api.yourapp.com and maybe tracer.yourapp.com and those three things are not a single app that behaves like auth, api or tracer depending on setting of a NODE_ENV variable? If so, you have micro services.

Re:Give Me Back My Monolith by dragonwriter on Wednesday March 13, 2019 @07:09PM (#19384901)
> that should not happen. if it does you don't have a microservice architecture, you have a spaghetti service architecture.

A "service" is not defined principally by a code repository or communications-channel boundary (though it should have the latter and may have the former), but by a coupling boundary.

OTOH, maintaining a coupling boundary can have non-obvious pitfalls; e.g., supported message format versions can become a source of coupling--if you roll back a service to the version that can't send message format v3, but a consumer of the messages requires v3 and no longer supports consuming v2, then you have a problem.

Re:Give Me Back My Monolith by merb on Wednesday March 13, 2019 @07:20PM (#19384973)
you should never actually remove an api without a deprecation process. basically a message format is part of your api. actually in a microservice world your interfaces/api should be as stable as possible. if something gets changed, it needs to go trough a deprecation, that means not removing it until a certain amount of time.
Re:Give Me Back My Monolith by xj9 on Wednesday March 13, 2019 @10:11PM (#19385960)
private apis exist for a reason. going through the deprecation cycle repeatedly sounds like a waste of time if you control all sides of the system. which is to say, not every interface needs to be a service boundary. you do need to keep versioned apis, but there is a cost to doing so.
Re:Give Me Back My Monolith by organsnyder on Wednesday March 13, 2019 @10:22PM (#19386024)
IMHO, part of a successful microservices program is treating your "private" APIs like your public ones, with SLAs, deprecation protocols, etc. Otherwise, you end up with tight coupling to the point that you should just go with a monolith.
Re:Give Me Back My Monolith by galangalalgol on Thursday March 14, 2019 @11:03AM (#19389830)
When you are still figuring out the problem space and message formats are being created removed extended and reverted several times a sprint, and you have already gone live with third parties depending on stable interfaces so that you cannot make the changes you need in a timely fashion, the warm arms of a purpose built monolith look particularly attractive.
Re:Give Me Back My Monolith by organsnyder on Thursday March 14, 2019 @11:38AM (#19390199)
Indeed. At that early stage of development, a monolith (or at least monolith-style practices, such as tight coupling between API providers and consumers) is definitely simpler and more efficient. But it wouldn't hurt to take steps from the beginning to make it easier to break the monolith apart when/if it becomes pragmatic to do so.
Re:Give Me Back My Monolith by lmm on Thursday March 14, 2019 @07:31AM (#19388259)
> private apis exist for a reason. going through the deprecation cycle repeatedly sounds like a waste of time if you control all sides of the system. which is to say, not every interface needs to be a service boundary.

The whole point of a microservice is to create a service boundary. If you have a private interface where both sides are maintained by the same team, both sides should be in the same service.

Re:Give Me Back My Monolith by geezerjay on Thursday March 14, 2019 @05:04AM (#19387540)
All interfaces are service boundaries. The only difference is whether you controll all clients and servers or not. Either way, API versioning is a must and trivial to implement, and there is really no excuse to avoid it. All it takes is a single integration problem caused by versioning problemd to waste more time than it takes to implememt API versioning.
Re:Give Me Back My Monolith by NicoJuicy on Wednesday March 13, 2019 @09:30PM (#19385760)
The accept header could fix this easily if no third parties are involved and if it's a rest like API protocol
Re:Give Me Back My Monolith by dragonwriter on Thursday March 14, 2019 @12:03AM (#19386441)
The accept header is a mechanism for communicating formats you support; it doesn't do anything to address the problem of managing change to supported versions, which is a dev process issue, not a technical issue.
Re:Give Me Back My Monolith by NicoJuicy on Thursday March 14, 2019 @08:45AM (#19388699)
Feature flags, just enable it.

When all applications are adjusted, the accept-headers request a protobuff format in return.

=> Propagated everywhere except when a js ajax calls happens to the api-gateway.

Re:Give Me Back My Monolith by geezerjay on Thursday March 14, 2019 @05:06AM (#19387547)
> The accept header is a mechanism for communicating formats you support; it doesn't do anything to address the problem of managing change to supported versions

That assertion is not true. Media type API versioning is a well established technique.

Re:Give Me Back My Monolith by NicoJuicy on Wednesday March 13, 2019 @09:30PM (#19385758)
The accept header could fix this easily if no third parties are involved
Re:Give Me Back My Monolith by sequoia on Wednesday March 13, 2019 @08:56PM (#19385549)
It sounds like you're paraphrasing the great Steven Jobs: "You're holding it wrong"

Be that as it may, I believe mirkules's issue is not an uncommon one. Perhaps saying "building a microservice architecture 'the right way' is a complex and subtle challenge" would capture a bit of what both of you are saying.

Something being complex and therefor easy to mess up does not mean it's a great system and the users are dumb, especially if there are other (less complicated, less easy to mess up) ways to complete the task.

Re:Give Me Back My Monolith by geezerjay on Thursday March 14, 2019 @04:57AM (#19387523)
> Perhaps saying "building a microservice architecture 'the right way' is a complex and subtle challenge" would capture a bit of what both of you are saying.

Supporting API versioning is not a complex or subtle challenge. It's actually a very basic requirement of a microservice architecture. It's like having to test null pointers: it requires additional work but it's still a very basic requirement if you don't want your app to blow up in your face.

Re:Give Me Back My Monolith by mirkules on Wednesday March 13, 2019 @06:30PM (#19384599)
Heh, I like that “Spaghetti Microservices”.

You are right. It should not happen. It is difficult to see these pitfalls when unwinding an unwieldy monolith, and, as an organization all you’ve ever done are unwieldy monoliths, that have a gazillion dependencies, interfaces and factories.

We learned from it, and we move on - hopefully, it serves as a warning to others.

Re:Give Me Back My Monolith by tcbasche on Wednesday March 13, 2019 @06:38PM (#19384675)
I've heard the term 'Distributed Monolith'
Re:Give Me Back My Monolith by c3534l on Thursday March 14, 2019 @01:16AM (#19386686)
I think we should call it angel-hair pasta code. You know, because it's very small spaghetti.
Re:Give Me Back My Monolith by james_s_tayler on Wednesday March 13, 2019 @06:55PM (#19384802)
MicroPasta
Re:Give Me Back My Monolith by cestith on Wednesday March 13, 2019 @07:00PM (#19384848)
Tangled angelhair.
Re:Give Me Back My Monolith by smnplk on Thursday March 14, 2019 @05:50AM (#19387743)
No, it's ravioli oriented architecture
Re:Give Me Back My Monolith by balp on Thursday March 14, 2019 @12:38AM (#19386564)
To handle deploys and especially rollbacks you need a working CI, or rather CD chain. Where eveything is automated. In there are dependencied in your architecture, all of that needs to be part of the same deploy so you can redo the deploy before that one. With a monolith, you get a simple deploy of all dependencies, as they are baked into one thing. There are down sides of everything baked into one thing. Having all your "micoro" servies deplyed as one package, would make the dependency you have act as before the monolith change. Seeing this kinds of dependency imho even in a monolith are an architechture problem, that in the monolith shows up at code changed and fixes can't be handles by localized fixes, but changed have to go into large parts of the code base.
Re:Give Me Back My Monolith by jeffasinger on Wednesday March 13, 2019 @09:01PM (#19385587)
I think a bigger thing here, is that each deploy should have a REALLY good reason to not be backwards compatible for some pretty long time period. If that requirement is painful for you, then you probably have two pretty tightly coupled services.