6 ms·
> But you do not simply go and poke your reporting fingers into individual service databases. This is why I distrust all of the monolith folks. Yes, it's easie
by echelon 7y ago
> But you do not simply go and poke your reporting fingers into individual service databases.
This is why I distrust all of the monolith folks. Yes, it's easier to get your data, but in the long run you create unmaintainable spaghetti that can't ever change without breaking things you can't easily surface.
Monoliths are undisciplined and encourage unhealthy and unsustainable engineering. Microservices enforce separation of concerns and data ownership. It can be done wrong, but when executed correctly results in something you can easily make sense of.
- adamc 7y agoI do not claim expertise here, but it would seem like microservices would add significant performance costs. Stitching together a bunch of results from different microservices is going to be a LOT more expensive than running a query with joins.
- ddek 7y agoThat wouldn't be a microservice then. There's going to be a relationship between data in your services, but it shouldn't be directly referential.
- echelon 7y agoHumans are the most expensive part of the system. You have to make it easy for humans to understand and change the system, and at the end of the day that's the number one thing to optimize for. This is why microservices are compelling. But to speak directly to your concern, you have to think about service boundaries and granularity correctly. Nobody is saying make a microservice out of every conceivable table. Think about the bigger picture, at a systems level. Wherever you can draw boxes you might have a service boundary. Why would you need to join payment data to session and login data? Do you need to compare employee roles and ACLs against product shipping data? These things belong in different systems. If you keep them in the same monolith, there's the danger that people will write code that intertwines the model in ways it shouldn't. Deploying and ownership become hard problems. The goal is to keep things that are highly functionally related together in a microservice and expose an API where the different microservices in your ecosystem are required to interact. (Eg, your employees will login.) When the data analytics folks want to do advanced reporting on the joins of these systems (typically offline behavior), you can expose a feed that exports your data. But don't expose an internal view of it to them or they'll find ways of turning you into a monolith.
- mewpmewp2 7y agoIn my experience it is a lot more difficult to navigate around all the different microservices to understand what needs to be done compared to being in a monolith where you can jump from file to file. Also then what also happens is microservices are created using different languages which in turn adds so much complexity to understand what is going on on the whole big picture level. And code gets repeated a lot more. If there is change in a microservices or update everyone will need to figure out what services depend on and how they will have to adapt. With monolith you can just use your IDE to see what will break if you make a change. So much repeated business logic. Creating a new feature involves having to have many meetings to figure out what services in which way have to be updated. It is crazy mess in my opinion. I have been with a company that had monolith application which they split up to more than 15 services (some python, some js, Scala, Java, etc...). Monolith still is used for some parts that are not migrated. I was working on single service having no idea how the whole system worked together. Then I had to do something in the old parts and I very quickly got an understanding how everything works together.
- NicoJuicy 7y agoProgramming complexity is changed to devops complexity. With microservices, without a good documentation how it connects, it's going to leave a very bad impression.
- mewpmewp2 7y agoHaving to have that documentation, finding, reading, understanding and trusting it already adds so much overhead. It is still nowhere close to ability to jumping around with IDE. It might be in a different language, different design patterns and to get to the details you have to check out that project anyway because you can't document absolutely everything out of code base. And if you do you will end up with multiple sources of truth. It is so much more likely that for every little issue which you otherwise might be able to find an answer to yourself very easily you will have to contact the team owning that microservices. It is not only mentally exhausting. It is time consuming, it requires so much back and forth. It creates so much dependence on other people because figuring out how things are related is so much more difficult. Sometimes I have 8 or more different IDE windows open to understand what is going on.
- pas 7y agoIf you already can't serve your requests from one DB, and you already want to factor out the analytics stuff, the long running background queries, modularize the spaghetti, scale the maintenance load, CI build + testing time, etc... That's what SOA and microservices is supposed to solve. At that scale you do reporting from a purpose-built service. Allegedly.
- adamc 7y agoWe do a lot of reporting that when. Then the users are unhappy that the data is slightly "stale". It serves some purposes, but not all purposes.
- smoe 7y ago> It can be done wrong, but when executed correctly [...] Quite the self-fulfilling prophecy there. > Yes, it's easier to get your data, but in the long run [...] Systems can and should be evolved and adapted over time. E.g. deploying components of the monolith as separate services. You can't easily predict what the requirements for your software going to be in say 10 years. And depending on the stage a company is, easy access to data for business decisions outweighs engineering idealism.
- pg_is_a_butt 7y ago> easy access to data for business decisions outweighs engineering idealism. GET HIM!
- echelon 7y ago> Quite the self-fulfilling prophecy there. Microservices require your organization to have an engineering culture. I would be afraid of introducing them at, say, Home Depot where (I've heard) your average programmer doesn't even write tests. If you have engineering talent within a small multiplicative factor of Google (say 0.5), then you can pull off Microservices at your org. Edit: I'm being downvoted, but I don't think it's a dangerous assumption or point to make that it takes a certain amount of discipline and experience to implement microservices correctly. When you have that technical capacity and the project calls for it, the benefit is tremendous.
- redact207 7y agoI think you're being downvoted because you're implying monoliths don't require an engineering culture and that microservices are a silver bullet in getting systems built correctly. I've seen good and bad in each approach. It's certainly possible to enforce good SOCs and proper boundaries in monorepos, and also possible to plough a system into the ground with microservices. They're all just tools in your toolbox and both have a part to play in modern development.
- deleted 7y ago[deleted]
- twh270 7y agoMy client is doing a lot of it wrong. To be fair, they got sold a lot of really horrible and ridiculous advice from IBM consultants (is there another kind?), but they also have people in charge (organizationally and technically) who aren't great decision-makers. As the article says though, you can't fix a people problem (bad engineering practices and discipline) by going from one technology to another (monolith to microservices).
- NicoJuicy 7y agoDDD enforces seperation also. It's about code quality, microservices are easy replaceable. Modules are too. With both systems, the core part ( eg. mesh, Infrastructure, ... ) Is crucial. I think experienced developers can see this, the ones that actually delivered products and had big code changes. The ones that handled their "legacy" code. Microservices are just a way to enforce it, there are others. None are perfect or bad, both have their use-case.
- deleted 7y ago[deleted]
- StavrosK 7y agoYou're saying "monoliths encourage unhealthy engineering" and then in the next sentence say "when executed correctly" for microservices. That sounds like a having/eating cake type situation.
- rriepe 7y agoTo be fair, this is how I've seen tech decisions presented at most big tech companies.
- geggam 7y agoQuit talking about what is behind the curtain
- jayd16 7y agoNot exactly. It's hard to tell from the outside if a monolith was architecture well or is about the fall over. In a microservice architecture it's harder to pretend you're doing it right.
- StavrosK 7y agoI disagree, "doing it wrong" just looks different there.
- throwaway894345 7y agoThe argument (which I sort of buy) is that microservices provide rails that keep people from doing certain stupid things like N clients depending on the data schema (making the schema a de-facto public interface). The trick with microservices is that the ecosystem is maturing and there are still lots of ways to screw up other things that are harder to screw up with monoliths. In time 95% of those will go away (my specific prediction is that one day we will write programs that express concurrency and the compiler/toolchain will work out distributing the program across Cloud services--although "Cloud" will be an antiquated term by then--including stitching together the relevant logs, etc and possibly even a coherent distributed debugger experience).
- wtetzner 7y ago> you create unmaintainable spaghetti that can't ever change without breaking things you can't easily surface. How does creating a tangle of microservices (effectively distributed objects) really solve the problem?
- NicoJuicy 7y agoConstructed good, it's Ravioli and not spaghetti.
- wtetzner 7y agoBut that's true of a well-constructed monolith, too. And it has far fewer failure modes and less complexity in general.
- MadWombat 7y agoMicroservices provide an abstraction. That is kind of the point. If you feel like the data yours service operates on would be better off stored in a redis database instead of an RDBMS, you can rewrite your persistence layer, test and roll out the new version of the service. As long as your APIs do not change, nobody cares how you produce responses to requests. In a monolith, this would be a nightmare. You don't have a single persistence layer to change, you have to go through every module, find all the places where this specific table or tables are being accessed and change retrieval and storage functionality everywhere.
- geggam 7y agoSeems to me you are talking about a database access layer instead of microservices. My understanding of microservices is a bunch of loosely connected services that can be changed with minimal impact to the others Problem with the ideal is in reality this never works as complexity grows the spaghetti code moves to spaghetti infrastructure ( Done a network map of a large k8s / istio deployment lately ? )
- hopia 7y ago
- lucidone 7y ago> enforce separation of concerns and data ownership You can enforce separation of concerns and data ownership in a monolith just as much as you can not enforce these two characteristics in a micro service architecture. Microservices and monoliths are a discussion about deployment artifacts, full stop.
- deleted 7y ago[deleted]
- pjmlp 7y agoOnly when done by folks that never learned how to write modular code and package libraries. The same folks aren't going to magically learn how to do distributed computing properly, rather they will implement unmaintainable spaghetti network calls with all the distributed computing issues on top.
- wtetzner 7y agoAnd untangling a monolith tends to be much less problematic that untangling a bunch of microservices. For one thing, you can refactor/untangle it all offline, do your testing, and do a single release with the updated version, as opposed to trying to coordinate releases of a bunch of services whose interfaces/boundaries were poorly defined.
- no_wizard 7y agoIn practice, splitting your code into consumable libraries/modules works equally as well. Then your monolith is just all the modules glued together.
- flukus 7y agoSplitting code into libraries works better, it's simpler and faster. The only thing micro services bring to the table is being to deploy updates independently (although this is also possible with libraries). If you don't need to deploy independently then micro services are useless complexity, if you can't deploy independently then you've got a distributed monolith.
- jffhn 7y ago>Microservices enforce separation of concerns Depending on where you work, it can be a problem, because the separation is not always appropriate, and can for political reasons be much harder to revert when visible at the service level (for example because the architect doesn't understand consistency, or because your manager tells you that the distributed architecture documentation has been sent to the client so it cannot be modified). In case of undue separation, reworking the internals of the enclosing monolith should have less chance to cause frictions.