Spinach Blog Archive Pages Categories Tags

Evolutionary Architectures

15 November 2016

TL;DR


Full Version

ilities example:

Dynamic equilibrium problem: If you planned 2 years ago for an architecture for next 5 years, without docker, then after 2 years, you should drop your plan. Well, we can’t predict the future, so what can we do? We can have a plan that is adaptable, evolvable.

Dimensions of Archietcture:

Let’s talk more of the technical architecture, which is layered Architecture. presentaiton -> business -> persistence -> database layer. It is a pass-through architecture, which has to go through all of the layers. And what if we want to add business -> service (optional) -> persistence layer, we add one more dependency, so if want to change persistence layer, will have 2 dependencies, which is not evolvable. dimensions = 1

Then came Microservices, dimensions = n. We can swap out implementation of a part without affecting the other parts. Composoability will let you build better evolvable systems.

Incremental Change is when separate components are deployed independently. Dependent components with time route to new deployed component. Then the old component dies once no one is using it. That is incremental. We want to decrease cycle time at the end of the time.

Features are released and then applications consist of routing

Fitness functions: determines if the next version is better than last version. It is an objective function that measure some metric. So we define architecture fitness functions in order to make sure we evolved in the positive way, whether it is using metrics or tests. We have atomic functions, which are application level functions that does one thing. And we have holistic fitness function which runs the interaction between the different services (integration tests are an example).

Bring the pain forward: Pain increases exponentially with the time you wait to act (sync codebase, deploy to prod). Hence Continious delivery.

Deployment pipeline: directly run your build trhought UTs, function test etc.. and automate all these things.

When changing something in microservie, 2 things to verify: Did I break production? and then did the thing that I add work? Hence came the idea of staging.

Consumer driven contracts good for testing. each consumer defines the contract of what they need, and the producer promises that the test in this contract stays green. So if producer changes and tests are ok, then all good and can keep moving forward, keep evolving.

We have to be reactive to unknown unknowns, rather than predictive.

DDD’s anti-corruption layer: instead of wiring yourself directly to a library, wire yourself to an interface to that library.

Switch to domani-centric architectures. We rarely change persistence layer, and always change to customer demands. So the layered architecture above is flipped so that a domain encapsulates the 3 other layers (business, persistence, database). So think of your architecture as a domain.

####Summary

Evolutionary architecture:

Evolutionary architecture opens up the door to more desirable 21st century processes. Can easily A/B test, swap up parts etc. Great quick feedback loop with this kind of architecture, agile. evolutionaryarchitecture.com

blog comments powered by Disqus
Fork me on GitHub