News for hackers. Stuff that matters.
Re:Goodbye Microservices: From 100s of problem children to 1... by johndubchak on Tuesday July 10, 2018 @03:29PM (#17501314)
I think what was missed, in the article, is that the fundamental problem was centered around a shared architecture of destinations and shared code.

You cannot possibly have every destination be a separate repo and then have the development lifecycle of your shared code be so active that it ultimately puts at risk the architecture of your entire organization.

What makes shared code so perfect is having stability such that you extract your variant code into your non-shared code. Shared code should evolve at a much slower pace than your non-shared code or you risk this very outcome.

Microservices are not dead, nor are they the solution to everything. We need better architects.

Re:Goodbye Microservices: From 100s of problem children to 1... by mikekchar on Tuesday July 10, 2018 @07:20PM (#17503062)
> ... the fundamental problem was centered around a shared architecture of destinations and shared code.

From an architectural perspective, there is absolutely no difference between a micro service and a library. The only real difference is in the dispatch mechanism.

The problems around configuration management are the same problems we've had as programmers for decades. It's just that the people who are keen on micro services are usually not old enough to have experienced the pain in a different context.

Should shared libraries be in different repos, or should you put everything in a single repo? How do you deal with versioning? What happens if one app wants version 1 of the library and another app wants version 2? How do you deal with backwards compatibility of the API? Do you make a whole new library when you decide the old API is incompatible with the new vision? Blah, blah, blah, blah. None of this is a new problem.

I can't remember which version of Windows it was (maybe 7?) where they were seriously delayed mainly because they had so many programs using different versions of libraries. Integrating it at the end was apparently complete hell. Since they wanted to have separation of responsibility in their groups, each group was just pounding away implementing the features that they needed, but not integrating as they went -- because that would mean lots of cross team communication. The exact same thing is likely in a large organisation with a ton of micro services.

There isn't just one way to solve the problem. Mono repos and monoliths help in certain ways and cause problems in other ways. There are other techniques as well (should we implement ld.so for micro services? :-) ) But as you mention, the real answer is that the solution requires humans, not technology.

Re:Goodbye Microservices: From 100s of problem children to 1... by parasubvert on Tuesday July 10, 2018 @11:42PM (#17504319)
You’re oversimplifying.

Architecturally speaking, there are some similarities between micro services and libraries because they’re both forms of modularization and usually have an API, but there are some stark differences beyond the “dispatch mechanism”.

The main difference is that a service’s deployment lifecycle is completely up to the service admin. Microservices are like websites - they can continuously evolve (within their API’s contract) without asking permission from consumers. This is their main superpower and why they’re a way of scaling a development organization without slowing it down too much.

In the case of a shared library, it’s completely up to the host admin as to when to upgrade. In the case of a static library, it’s up to the consuming software to determine when to upgrade. A service can upgrade when it feels like it.

Issues of API backwards compatibility, forwards compatibility, extensibility, self descriptiveness, versioning, etc. are old issues but usually have different answers when upgrades are truly happening all the time and not just in theory. It tends towards much fewer hard versions and more evolutionary backwards compatibility.

IOW, microservices aren’t a cure all, but they do encourage a set of behaviors. Many articles detracting from them seem to have not wanted those behaviors in their org in the first place.

Re:Goodbye Microservices: From 100s of problem children to 1... by blub on Wednesday July 11, 2018 @01:55AM (#17504729)
You are assuming that microservices must be deployed on the internet, however they can be deployed on another type of network or on a single OS installation, which would prevent them from being completely transparently updated.

Shared libraries can be an implementation of micro services. On a platform (e.g. Android) it can be that a shared library is updated and then all consumers are forced to update.

Re:Goodbye Microservices: From 100s of problem children to 1... by parasubvert on Wednesday July 11, 2018 @11:51PM (#17512051)
No, I’m assuming they must be deployed on an IP network of some sort, not necessarily the Internet. A microservice by definition is a networked service. The whole REASON the term was coined was to differentiate from services which often were developed and deployed monolithically, as opposed to truly autonomous runtime processes (aka. bounded contexts).

Services, whether SOA, web services, messaging services, or network services etc, as in SOA, describe a client/server architecture with an API. Usually these APIs are designed by the principles of Domain Driven Design, where different teams map to bounded contexts that have their own published API.

Microservices are a form of SOA where each API also runs in its own process and thus has independent deployment lifecycle. Many in the SOA world advocated for this 10-15 years ago (and often ignored), and now the industry has gone back and coined a term for this practice.

In an organization that does microservices properly at scale, like Amazon, you have teams that build and run and upgrade their service autonomously from others. Read the Steve Yegge rant about Amazon and Platforms to understand this. It allows tremendous parallelisation of effort and allows for thousands of deploys to production daily without breakage. This is hard to pull off though, and a new initiative doesn’t generally won’t more than a small handful of services.

If it’s a shared library, then call it a shared library. It has a completely different lifecycle from a microservice. In your Android example, shared libraries by definition are controlled by whomever can dictate OS updates, not the app developer.

Re:Goodbye Microservices: From 100s of problem children to 1... by ronjouch on Tuesday July 10, 2018 @09:20PM (#17503701)
> "should we implement ld.so for micro services? :-)"

Working exactly along those lines this week on multiple services exposed over REST APIs, I was wondering if tools exist to check compatibility between them. Said differently,

- I have a `swagger.yaml` for my service A managing chipmunks and it says endpoint `/chipmunks` supports an 'color' query parameter.

- In service B, I have a `handleToServiceA` that encapsulates calling A. Then say I write `const chipmunks = handleToServiceA.getChipmunks({'colour': 'blue'})`.

Are there (whatever the ecosystem) tools that would read serviceA's swagger.yaml, detect my error in serviceB (color -> colour) and report the issue at compile time rather than run time?

Re:Goodbye Microservices: From 100s of problem children to 1... by aeonsky on Tuesday July 10, 2018 @10:23PM (#17503973)
I think this is one of the standard options: https://docs.pact.io
Re:Goodbye Microservices: From 100s of problem children to 1... by noahsark769 on Wednesday July 11, 2018 @02:28AM (#17504847)
At work, to alleviate this issue, we use a client library for service A (i.e., one that provides service.getChipmunks(color='blue')). This gives you the compile time check, assuming the client library is a compiled language.

One step better is autogenerated client libraries where a new version is created every time a new version of swagger.yaml is deployed. However, I don't know an open source project that does this.

Re:Goodbye Microservices: From 100s of problem children to 1... by codesuki on Tuesday July 10, 2018 @10:41PM (#17504066)
> Should shared libraries be in different repos, or should you put everything in a single repo? How do you deal with versioning? What happens if one app wants version 1 of the library and another app wants version 2? How do you deal with backwards compatibility of the API? Do you make a whole new library when you decide the old API is incompatible with the new vision?

Could you share methods that worked well for you? Asking because those question come up a lot and there never seems to be any conclusion.

Re:Goodbye Microservices: From 100s of problem children to 1... by maxxxxx on Tuesday July 10, 2018 @08:41PM (#17503500)
"From an architectural perspective, there is absolutely no difference between a micro service and a library. The only real difference is in the dispatch mechanism."

I always tell people if you can't write and maintain a library then don't do microservices.

Re:Goodbye Microservices: From 100s of problem children to 1... by scruffyherder on Tuesday July 10, 2018 @10:22PM (#17503967)
Yes the kids have just rediscovered the move from COM to DCOM.

It's so silly that we are wasting so much time rebuilding existing things, poorly.

Re:Goodbye Microservices: From 100s of problem children to 1... by User23 on Tuesday July 10, 2018 @11:34PM (#17504288)
COM wasn't a picnic to work with back when it was the new thing. The toolchain sucked. I'll never write another line of MIDL in my life.
Re:Goodbye Microservices: From 100s of problem children to 1... by maxxxxx on Tuesday July 10, 2018 @11:54PM (#17504367)
Agreed. Although with tools like Visual Basic it was quite nice to use. Now, DCOM was another story. Pretty much everybody I knew who used it started to become suicidal after a while...
Re:Goodbye Microservices: From 100s of problem children to 1... by voltagex_ on Wednesday July 11, 2018 @12:05AM (#17504408)
I still maintain a (third party) app that requires DCOM.
Re:Goodbye Microservices: From 100s of problem children to 1... by pjmlp on Wednesday July 11, 2018 @01:21AM (#17504620)
MDIL has been rejuvenated for C++/WinRT, the new C++17 based projection for UWP.
Re:Goodbye Microservices: From 100s of problem children to 1... by weberc2 on Tuesday July 10, 2018 @08:30PM (#17503441)
Microservices do have various organizational tradeoffs. Individual teams can now own deployment, operation, language, and tooling choices for better or worse. This is probably advantageous for large companies where the number of teams scales beyond what a hierarchical control structure can support. In other words, a single devops team can't make good decisions and prescriptions about languages, tooling, deployment, etc nor effectively react to feedback from the dev teams. Control (power and responsibility) becomes distributed instead of centralized, with all the tradeoffs that entails.
Re:Goodbye Microservices: From 100s of problem children to 1... by robotresearcher on Tuesday July 10, 2018 @08:29PM (#17503438)
> From an architectural perspective, there is absolutely no difference between a micro service and a library.

I’ll stick to linking glibc, friend architect. Performance is also architecture.

Re:Goodbye Microservices: From 100s of problem children to 1... by JonasJSchreiber on Tuesday July 10, 2018 @11:05PM (#17504166)
Yes, couldn't agree more. The O in SOLID should be adhered to in this case. Open for extension, closed for modification
Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Tuesday July 10, 2018 @04:20PM (#17501749)
No we need science and theory to definitively define necessary architectures that are appropriate to certain use cases.

An architect is just a another man with an opinion.

Re:Goodbye Microservices: From 100s of problem children to 1... by wsy on Tuesday July 10, 2018 @04:50PM (#17502032)
It's a bit like asking to replace medical doctors with science and theory.

We need science and theory, and skilled architects who can apply it to the problem at hand.

Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Tuesday July 10, 2018 @08:45PM (#17503522)
The practices of Doctors are based off of science and theory. Design patterns and microservices while technical are not based off of science. They are ideas without quantitiative basis or science.
Re:Goodbye Microservices: From 100s of problem children to 1... by wsy on Wednesday July 11, 2018 @09:02AM (#17506493)
I agree that we need more empirical investigations of software 'diseases' and 'cures'.

That being said, practical medicine is much less scientific than many think. There is a lot of master/apprentice learning going on, just as in software engineering.

Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Wednesday July 11, 2018 @12:17PM (#17508067)
I don't even think we need empirical investigations. A formal logic system from axiomatic rules for architecture is really enough. I use the term science here incorrectly. I don't mean experimentation. I mean formalized logic. Like graph theory, complexity theory, number theory.... Architecture Theory.

In the world of math you don't need empirical data to verify a point. It's all logic derived from a small set of axioms.

Re:Goodbye Microservices: From 100s of problem children to 1... by wsy on Thursday July 12, 2018 @04:41AM (#17513063)
Ah, here I disagree. Architecture is usually influenced not only by the software requirements, but also by many non-technical constraints (how is your development organization structured, how skilled are the devs, how sure are you that requirements will not change over time, etc.). There are just too many soft factors involved to 'compute' a solution.
Re:Goodbye Microservices: From 100s of problem children to 1... by User23 on Tuesday July 10, 2018 @11:38PM (#17504301)
Actually computing science is the most well understood science. Physicists can only give results with a few millionths* of accuracy, a computing scientist can prove a theorem about his subject matter with perfect accuracy.

Everyone else, including doctors, who call themselves scientists are just trying to float on the cachet physicists earned with their astonishingly good predictions. Properly speaking, they are phenomenologists . Please note that I'm not saying what they do isn't of great societal and intellectual value! The study and categorization of phenomena is certainly a noble enterprise. But none of them can make predictions good to 9 decimal places.

*might be billionths or quadrillionths by now in QED, but doesn't change my point.

Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Wednesday July 11, 2018 @12:17AM (#17504452)
You are diving to deep and talking about the difference between formal logic and empirical sciences. I am not talking about that.

Things like algorithmic complexity are well understood and formalized but design patterns are not a science nor has the concepts ever been formalized..

There is no theory or formalized system that says monolithic is better than micro or vice versa, it's all opinion. That's why its' called design.

Re:Goodbye Microservices: From 100s of problem children to 1... by User23 on Wednesday July 11, 2018 @01:51AM (#17504715)
Formal logic is a tool used by computing scientists and that they made almost incredible contributions to. It’s a tool that’s available to other scientists too, and the more rigorously minded ones use it.

For your latter point, it’s a matter of elegance, which is a pretty way of saying cognitively manageable. Think of epicycles vs Newtonian mechanics as an analogy. With enough epicycles you can compute the same result, but Newton’s approach is still a clear scientific advance.

Your point about design is well taken. Any given design is analogous to a theory. So we should aim for the simplest and most cognitively manageable design that satisfies our needs. That’s not literally formalized, but it’s a well established principle with an excellent record.

Re:Goodbye Microservices: From 100s of problem children to 1... by agentultra on Tuesday July 10, 2018 @11:07PM (#17504173)
Model checking is based off of mathematics and can be verified or, with some elbow grease, proven.

I'll take a TLA+ specification over a diagram any day.

Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Wednesday July 11, 2018 @12:19AM (#17504453)
What do you mean by model checking? Usually anything with the keyword "Design" like design patterns for microservices have no science or mathematics to back it up.
Re:Goodbye Microservices: From 100s of problem children to 1... by eitally on Wednesday July 11, 2018 @12:55AM (#17504549)
You may be technically correct, but I'd argue it's generally more useful what we do have: practical experience. When one says "we need better architects", to me that implies that our current architects are creating design patterns and reference implementations that are both 1) not practical, and 2) don't adhere to known-good best practices.

Systems design in real life is an "artistic science": there are always known limitations (and some expected unknown ones) that rule out the theoretic optimal design for good reasons. The problem is that limitations and compromises are often not disclosed, and that many programmers and architects are too inexperienced to really grok the implicit meaning behind specific design decisions.

So we struggle along, with bloggers, researchers and FOSS contributors halfheartedly collaborating to make point improvements as solutions are discovered. Stodgy enterprises suffer, big tech companies make decisions with global impact, startups are left wondering WTF to do, and the rest of us largely don't care. Why? Because nit picking doesn't solve business problems [almost ever. I'd argue this point in cases of things like SCADA systems and other mission critical control systems.].

Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Wednesday July 11, 2018 @12:24PM (#17508137)
The thing with practical experience is you can put two engineers with practical experience in a room and they can argue for days about a architecture or design pattern.

Nobody argues about which algorithm is better for sorted data sets: linear search or binary search. Theory already establishes one is faster than the other, but no theory establishes which architecture is better than the other.

Re:Goodbye Microservices: From 100s of problem children to 1... by agentultra on Wednesday July 11, 2018 @10:09AM (#17507011)
A model checker is a software program you use to validate a given mathematical model of a system. If the proposed properties of the model hold the model checker will let you know. More interestingly if the properties fail to hold you'll get a trace back into where your assumptions fell apart.

TLA+ is one such system that includes a language for writing models and a model checker to verify them for you. In the context of microservices you would write a model of your services and the checker would help you to verify that certain properties of your model will hold for all possible executions of the model. Properties people seem to be interested in are consistency and transaction isolation. You can develop a model of your proposed microservices architecture and work out the errors in your design before you even write a lick of code.

Or if you already have a microservice system you could write a model of it and find if there are flaws in its design causing those annoying error reports.

Amazon wrote a paper about how they use it within the AWS team [0]. Highly worth the read. And if any of this sounds interesting I suggest checking out Hillel Wayne's course he's building [1].

[0] https://lamport.azurewebsites.net/tla/formal-methods-amazon.... [1] https://learntla.com/

Re:Goodbye Microservices: From 100s of problem children to 1... by johndubchak on Tuesday July 10, 2018 @04:48PM (#17502018)
We have these things. A better architect implies that one is trained in analyzing and producing these architectures using the science she/he was trained with: https://www.sei.cmu.edu/education-outreach/credentials/crede...

The certificate means nothing, the training and instruction is priceless. Add to that things like TOGAF and a deep understanding of the current state of existing architectures and you'll understand what I originally meant, but failed to explain.

UPDATE: misspelled "meant"

Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Wednesday July 11, 2018 @12:22AM (#17504463)
The closest mathematical formal system I've seen that dictates architecture is category theory. But even this system doesn't say anything about being "better" or more efficient than another design pattern.
Re:Goodbye Microservices: From 100s of problem children to 1... by crimsonalucard on Tuesday July 10, 2018 @08:44PM (#17503515)
That's not science or proof. Thats a course on design. By science and proof I mean like definitive logic. a^2 + b^2 = c^2