It is weird to read people write about microservices (or some other tech fad) as if it is this otherworldly thing that requires instruction and training. So many words dedicated to describing the supposedly bad old days! All this stuff is just another aspect in the life of a practitioner of computing. A proper expert should see these things not as a fad, but as a collection of techniques that can be added or subtract…
...but you can write (and sell) books about, talk at conferences too
The End of Microservices
131–140 of 154 posts
Re: The End of Microservices
#132Earlier quoted context omitted.
I have been doing it since the early 90's. It is called unit, module, package, library. No need to put some network layer, with its own set of problems, between method/function calls.
Libraries typically don't have databases or daemons. It's operationally very different. Can I envision a language-specific framework wherein "microservices" are just plugins that implement interfaces (Java interfaces, for example) for exposing RPC endpoints, which you then "mount" in your framework, allowing developer-enforced separation of concerns, but still allowing a single codebase to share things like config st…
As for the rest, that is what a proper design of module interfaces is supposed to be.
Apparently too many people nowadays don't read books about ADTs (Abstract Data Types).
Re: The End of Microservices
#133Earlier quoted context omitted.
You say it as if it's a bad thing... Compared to the alternative, fiefdoms really are a wonderful thing! I once work for a giant fortune 500 corporation. Our department had a good 300 developers, and had been writing code for years. They had built the whose system using the classic, box-box-cylinder architecture. There were hundreds of little top tier 'services', but in practice, they all shared the same database, ha…
I agree with you that it's not a bad thing - I think it's the main benefit of microservices for most larger organizations, the ability for different teams to control their own destiny and not be blocked on each other. But there's now a whole bunch of new developers out there who are just starting out and read all about these microservices, and think that it's the way to write web backends, and that if you don't do it…
Until it doesn't. And that change will come and it'll make your fancy architecture look like a tin shack instead of a stately manor.
These devs are loud. And management loves loud. Loud is confidence.
We need a Dilbert for developers. Truly.
Re: The End of Microservices
#134Earlier quoted context omitted.
> The reality is that microservices add a whole host of failure modes, for just one benefit over monoliths: They are easier to scale horizontally. If you don't absolutely need horizontal scalability, and not many companies do, then you'd be foolish to pay the large cost. If you are writing and deploying standalone applications, I agree. Microservices do have another benefit, though: forcing the application to be modu…
> The microservice (maybe not micro, but definitely service) architecture we are moving to will allow us to compose applications with reusable building blocks more easily than trying to maintain different git branches and library versions. Can you elaborate why? Presumably, with microservices, you're always running the latest version, whereas you're mentioning a need for "different branches and versions" in your comm…
Not necessarily. Depends on the needs of the customer and what we deploy to them. In general, we try to deploy the most recent version of everything when we make a release for a particular customer.
The issue we have with our builds is dependency management. As a note below, that in itself is something that could be addressed by refactoring our projects[1]. Because of the way we need to deploy our software (shaded uberjars) even a well-structured dependency hierarchy would result in large data updates every time we had to update the monolithic application.
> Microservices don't force you to modularize, you can still make a mess by not cleanly separating things or by cutting across the wrong boundary. You modularized well because you created a clean, separated, thought-out architecture, not because of any intrinsic property of microservices.
They don't force you to modularize well. but they force you to think about how to break your application up. You still need the systems engineering to break it up well.
You're right that services aren't the only way or necessarily the best way to accomplish this. We could get the modularization just by refactoring the organization of out projects. In the absence of the requirements for third-party integration and an actual need for horizontal scalability, that is what I would have done. All-totaled, though, I think the service paradigm was the right way to go for us.
I need to note for context that the software we write and deliver needs to be delivered on physical disks (yes, we still literally ship software) and that deployment size is an issue. We also can't guarantee that we will have access to anything besides a Windows or Linux JVM, so our deployment needs to drag all of its supporting data along with it. being able to simply deploy a new version of a particular service makes updates much less painful.
[1] And actually using versions for our Maven artifacts, but that is a battle I lost a long time ago...
Re: The End of Microservices
#135I see several people criticize microservices here. We've been doing it for about 6 years and are extremely happy with it. A core principle which a lot of people and articles ignore, though, is reusability . I bring this up on HN every time there's a discussion about microservices, yet I've never seen any discussion about it. Essentially, you build out the backend to act as a library for your front end. So we have log…
Separate pieces of functionality into small reusable libraries? Great. Enforce separation of each library's internals from each other one? Great. Ensure each database is owned by one and only one service? Great. Invoke those services via RPC-over-HTTP? Why???
Re: The End of Microservices
#136I'm not totally convinced that allowing developers to build faster is really all that great of an idea. At least not the sacred ideal that seems to be accepted without any question. Most of what I see when people are moving fast is building things as fast as they can think of them based on the first idea that comes to mind that sounds like it might get things done. But the reality is that the first way that you think…
Often the worse offenders are rewarded for being highly productive and the people who end up having to cleanup, refactor and get things actually working are not acknowledge for the vital effort they put in. In my view this is the result of bad management incentives and failure to properly asses results and contributions.
Re: The End of Microservices
#137I'll tell you the real reason behind microservices: developer fiefdoms. "Faux-Specialization". It allows developers to feel like they have control over certain pieces of infrastructure and run the gambit on their strategy for getting ever more increasing pieces of the pie. It has nothing to do with building reliable software. You could just as easily build and deploy a single networked application (so called "monolit…
Someone builds a monolith, it gets some traction, and suddenly the server bill gets into five, six figures a month. Management have never been management before, and have never paid anything more than a few hundred dollars a month for servers, so their new cloud bill is mind blowing to them. They're spending as much money as a house costs every month on renting servers. They imagine they're hemmoraging cash right and left, they freak out and order engineering to rearchitect everything around a Service Oriented Architecture, because clearly it's time for the big boy toys. Google does it that way, so clearly that's what one does when one is at scale, when one is successful and has lots of paying customers, right?
99.9% would be better off financially and technically just rewriting a V2 of the monolith using lessons learned from V1, but that's perceived as outmoded, old-world thinking, because it's not what Google does.
Re: The End of Microservices
#138Earlier quoted context omitted.
>Invoke those services via RPC-over-HTTP? Why??? I can think of a few off the top of my head: 1. Being able to scale individual, smaller components rather than one giant application 2. Being able to build-and-deploy any one module much faster than one monolithic bundle of local dependencies 3. Universal interface with language-agnostic applications. Do you need to expose big data statistical analytics, but can't find…
> 1. Being able to scale individual, smaller components rather than one giant application Why does the size of the application matter? Sure it'll take up a little more disk space, maybe even some memory, but probably less than the overhead of splitting into components. Two copies of a monolith wastes less RAM etc. than five components of which you deploy two copies of one. > 2. Being able to build-and-deploy any one…
Spinning up multiple components generally takes a few seconds once the image is built, as it is not much more involved than spinning up a new docker container of an image that is already pulled. Each image might take a couple of minutes to build, but because there are no hard dependencies between images (unlike libraries in a monolith) any amount of them can be building and deploying in parallel.
It doesn't really matter how fast the "whole thing" can be built-and-deployed before, because in a monolith, you need every developer building and deploying their own library versions as well as the monolith. Meaning, not only do your changes to production have to wait in the queue for everyone else's, but you unintentionally pick up work from other folks along the way. That road leads down to the environment you describe, where every developer needs at some point to spin up their own dev instance and live on their own branch just to be able to test in isolation, resulting in an organization that requires merging, building, and deploying several times along the way in different environments before the change finally reaches production.
I also described a perfect use case of an HTTP interface (or RPC, or whatever language agnostic interface you want to use, it doesn't matter to me and rarely matters in the real world). Data science work is often in a different language space than web work. I'm not going to bundle native Python/R/Clojure dependencies with my node.js apps. It's too much work to maintain those bindings between runtime versions and app versions. I'm not going to force Data scientists to use JS because the library ecosystem is targeted toward completely different use cases. With HTTP or RPC or whatever transport, each team can use the best tools for the job.
Re: The End of Microservices
#139I'll tell you the real reason behind microservices: developer fiefdoms. "Faux-Specialization". It allows developers to feel like they have control over certain pieces of infrastructure and run the gambit on their strategy for getting ever more increasing pieces of the pie. It has nothing to do with building reliable software. You could just as easily build and deploy a single networked application (so called "monolit…
I agree about fiefdoms, and want to address a particular aspect of that pattern, somewhat complementary to yours, that I've seen at least in the (very large) organization that I'm a member of. Specifically, like a microservice allows encapsulation of functionality, it also allows encapsulation of blame[1]. In a monolith (from whence the org I'm in came), a build failure or test regression could be caused by any numbe…
> Specifically, like a microservice allows encapsulation of functionality, it also allows encapsulation of blame
I think, the example of Joe's and Sally in parent [1] and your comment, makes the point in micro-services. During various Web Services integrations developers not only may blame specific part of system as faulty but also helps follow rule 'do not test your own code'. I remember few situation in pre-microservices era when during developing new API wrapper developers discovered a flaw in the remote web service (e.g. parameter doesn't change state) non-documented error code or raw Java exception as response. In these cases, owners of the API are are usually notified about issue so we may expect that will be fixed.
I agree with you that is hard way to advocate either way is better. It is worth noting that creating a micro services leads to problem which may end with _duplicating_ (creating monolithic) code to provide possibility to communicate between the hosts (imagine mesh network).
Re: The End of Microservices
#140Earlier quoted context omitted.
You are not getting more reusability from a bunch of microservices, compared to one big service, I don't see where you got that?
It's especially fun when you get to write the monolith 3 times over for web, ios and android.
You write it once, have it expose an API. Have your Web, IOS and Adroid client use the said API. Easy pease. Optional: allow your customers to use the API, too.