Earlier quoted context omitted.
Mocking modules for unit testing - yes. Testing the specific build artifact with a module replaced by a mock - no, it is not.
A dependency injection framework where you use flags at the composition root to determine whether the “real” implementation class or the mock class is used based on the environment. IOrderService -> OrderService in production. IOrderService ->FakeOrderService when testing.
Goodbye Microservices: From 100s of problem children to 1 superstar
151–160 of 782 posts
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#152I probably don't understand their architecture well enough since they don't try and explain it in detail. The blame is also put on microservices whereas it's the architecture that can be fixed to improve performance and the cost of deployment. A shared library works up until a certain point. If every service uses a shared library then you are already getting to a world of a monorepo. A monorepo for different services…
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#153Earlier quoted context omitted.
> You push data consistency concerns out of the database and between service boundaries. Sing that from the rooftops. That is exactly my observation as well. All the vanilla "track some resource"-style webapps I've worked on were never designed to cope with a consistency boundary that spans across service boundaries. Turning a monolith into distributed services is hard for that reason - you have to redesign your data…
It's worse than that; it's my observation that most microservice architectures just ignore consistency altogether ("we don't need no stinking transactions!") and blindly follow the happy path. I've never quite understood why people think that taking software modules and separating them by a slow, unreliable network connection with tedious hand-wired REST processing should somehow make an architecture better. I think…
That is not completely on the developer, either. Pre 4.0 Mongodb, for example, does not do transactions. On the other hand, I've seen some pretty flagrant disregard for it just because there are not atomicity guarantees.
Microservices makes reasoning on that harder.
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#154software engineering walks in circles. NoSQL people seem to be growing up and learning about consistency and transactionality. I'm waiting for somebody to discover threads and shared variables back as a revolutionary way to improve performance and greatly simplify the implementation of a system of "actors".
Joking aside, i think greatest reason for Segment's microservices failure was that they didn't use Kubernetes.
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#155Earlier quoted context omitted.
Right, but the thing that makes Linux actually useful isn't really the kernel is it? I would say what makes it useful is all the various small, targeted programs (some might call them microservices) it lets you interact with to solve real world problems. If Linux tried to be an entire computing system all in one code base, (sed, vim, grep, top, etc., etc.) what do you think that would look like code base/maintainabil…
But there is a big difference. These small targeted programs are invoked in user land, usually by the user. Microservices get invoked directly by the user when debugging is going on. Otherwise they are expected to automagically talk to each other and depending on the abstraction even discovery each other automatically. Also I can pipe these tools together from the same terminal session, like tail -f foo | grep someth…
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#156Earlier quoted context omitted.
People look at microservices as a solution to the Big Ball of Mud, and then confuse "a solution" with "the solution". You really do have to modularize. In some languages, you can even use separate compilation units for separate modules to enforce the separation. You can do all of that but get simultaneous deployment, which cuts out whole classes of integration nightmares.
It seems like a Big Ball of mud is much more difficult to deal with than a bunch of small balls of mud just in general?
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#157This is a classic case of not understanding micro services and trying to fit a problem around a tool. At work, we have close to ~50 services(no one calls them microservices), but they do not suffer from this brittleness. We segregate our services based on languages. So, all C services go under coco/ , all Java services go under jumanji/ , all go services go under goat/ , all JS services go under js/. This means, ever…
The irony being that anything approaching SOA (or microservices) requires exactly the same amount of communication. More likely they require more since it's almost certain that such a decision introduced chaos.
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#158Earlier quoted context omitted.
A dependency injection framework where you use flags at the composition root to determine whether the “real” implementation class or the mock class is used based on the environment. IOrderService -> OrderService in production. IOrderService ->FakeOrderService when testing.
Do you realize that this is actually an anti-pattern, that adds unnecessary complexity and potential security problems to your app? Test code must be separated from production code - something, that should know every developer.
But if you are testing an artifact, why isn’t the artifact testing part of your CI process? What you want to do is no more or less an anti pattern than swapping out mock services to test a microservice.
I’m assuming the use of a service discovery tool to determine what gets run. Either way, you could screw it up by it being misconfigured.
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#159This is a classic case of not understanding micro services and trying to fit a problem around a tool. At work, we have close to ~50 services(no one calls them microservices), but they do not suffer from this brittleness. We segregate our services based on languages. So, all C services go under coco/ , all Java services go under jumanji/ , all go services go under goat/ , all JS services go under js/. This means, ever…
Re: Goodbye Microservices: From 100s of problem children to 1 superstar
#160But that's an "all in" environment. You are Elixir/Erlang/OTP, or you are out. That is, understandably, not an option for many use cases.