Skip to content

Latest commit

 

History

History
901 lines (678 loc) · 19.2 KB

presi.md

File metadata and controls

901 lines (678 loc) · 19.2 KB

background-image: url(img/explore.jpg)


name: about class: left background-image: url(img/about.jpg)

.right-column[ Open Minded

|> Science

|> Craftsman

.footnote[ cmg-dev

@codethonian ] ]


name: introduction class: middle, center background-image: url(img/space.jpg)

.regular[

Advanced Microservices

]


name: introduction class: left, middle background-image: url(img/space.jpg)

.regular[

Advanced Microservices

1. Advices

2. A New Idea

3. Technical Topics

]


name: introduction class: left, middle background-image: url(img/space.jpg)

.regular[

Advices

]


name: introduction class: left, middle background-image: url(img/space.jpg)

.regular[

Advices

.page_right[ ] ] .footnote[ XKCD ]


name: introduction class: left, middle background-image: url(img/space.jpg)

.page_left[

An Interesting Age

Instagram Netflix Whatsapp SAP ]


name: introduction class: left, middle background-image: url(img/space.jpg)

.page_left[

An Interesting Age

Instagram Python (Django) Monolith.

Netflix Well documented Microservice structure.

Whatsapp Monolithic structure; started out in Erlang.

SAP SAP Hana and Hybris as Cloud Microservice as a Service.

]


name: motivation class: left, middle background-image: url(img/space.jpg)

.regular[

What is a Microservice?

The term "Microservice Architecture" (...) describe[s] a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around (...) business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data. [1]

So we are not sure. ]

.footnote[ [1]: https://www.martinfowler.com/articles/microservices.html ]


name: motivation class: left, middle background-image: url(img/extinct.jpg)

.regular[

Where Does it Come From?

Ancient Aliens ]


name: motivation class: left, middle background-image: url(img/extinct.jpg)

.regular[

Eric Raymond’s 17 Unix Rules

  1. Rule of Modularity
  2. Rule of Composition
  3. Rule of Separation
  4. Rule of Simplicity
  5. Rule of Robustness
  6. Rule of Transparency
  7. Rule of Parsimony

(...) ]

???

  1. Rule of Modularity

    Developers should build a program out of simple parts connected by well defined interfaces, so problems are local, and parts of the program can be replaced in future versions to support new features. This rule aims to save time on debugging code that is complex, long, and unreadable.

  2. Rule of Composition

    Developers should write programs that can communicate easily with other programs. This rule aims to allow developers to break down projects into small, simple programs rather than overly complex monolithic programs.

  3. Rule of Separation

    Developers should separate the mechanisms of the programs from the policies of the programs; one method is to divide a program into a front-end interface and a back-end engine with which that interface communicates. This rule aims to prevent bug introduction by allowing policies to be changed with minimum likelihood of destabilizing operational mechanisms.

  4. Rule of Simplicity

    Developers should design for simplicity by looking for ways to break up program systems into small, straightforward cooperating pieces. This rule aims to discourage developers’ affection for writing “intricate and beautiful complexities” that are in reality bug prone programs.

  5. Rule of Parsimony

    Developers should avoid writing big programs. This rule aims to prevent overinvestment of development time in failed or suboptimal approaches caused by the owners of the program’s reluctance to throw away visibly large pieces of work. Smaller programs are not only easier to write, optimize, and maintain; they are easier to delete when deprecated.

  6. Rule of Transparency

    Developers should design for visibility and discoverability by writing in a way that their thought process can lucidly be seen by future developers working on the project and using input and output formats that make it easy to identify valid input and correct output. This rule aims to reduce debugging time and extend the lifespan of programs.

  7. Rule of Robustness

    Developers should design robust programs by designing for transparency and discoverability, because code that is easy to understand is easier to stress test for unexpected conditions that may not be foreseeable in complex programs. This rule aims to help developers build robust, reliable products.

(...)


name: motivation class: left, middle background-image: url(img/extinct.jpg)

.regular[

Mike Gancarz: The UNIX Philosophy

  1. Small is beautiful.
  2. Make each program do one thing well.
  3. Build a prototype as soon as possible.
  4. Choose portability over efficiency.
  5. Store data in flat text files.
  6. Use software leverage to your advantage.
  7. Use shell scripts to increase leverage and portability.
  8. Avoid captive user interfaces.
  9. Make every program a filter. ] .footnote[ The Unix Philosophy ]

??? In 1994, Mike Gancarz (a member of the team that designed the X Window System), drew on his own experience with Unix, as well as discussions with fellow programmers and people in other fields who depended on Unix, to produce The UNIX Philosophy which sums it up in 9 paramount precepts:


name: motivation class: left, middle background-image: url(img/extinct.jpg)

.regular[

Example 1

# Print all SVGs...

$ tree | grep svg | awk '{ print $3 }'

]


name: motivation class: left, middle background-image: url(img/extinct.jpg)

.regular[

Example 1 - Explanation

# Get all SVGs in tree

$ tree | grep svg
│   ├── complete_view.svg
│   ├── landscape.svg
│   ├── layered_architecture_with_processes.svg
│   ├── orchestration.svg
│   ├── process_delete.svg
│   ├── process_sample.svg
│   ├── three_landscapes.svg

# Print 3rd coloumn so we get the filenames

$ tree | grep svg | awk '{ print $3 }'
complete_view.svg
landscape.svg
layered_architecture_with_processes.svg
orchestration.svg
process_delete.svg
process_sample.svg
three_landscapes.svg

]


name: motivation class: left, middle background-image: url(img/extinct.jpg)

.regular[

Example 2

git branch --merged | egrep -v "(master|develop)" | xargs git branch -D

]

name: motivation class: left, middle background-image: url(img/extinct.jpg)

.regular[

Example 2 - Explanation

# Get all merged branches.

git branch --merged

# All merged branches; exclude master and devevlop.

git branch --merged | egrep -v "(master|develop)"

# Delete all merged branches exept master and develop.

git branch --merged | egrep -v "(master|develop)" | xargs git branch -D

]


name: motivation class: center, middle background-image: url(img/space.jpg)

.regular[

How Does it Look Like?

]

Complete Process


name: introduction class: left, middle background-image: url(img/tidy_stack_small.jpg)

.regular[

Advices - Summary

  1. Know the Unix philosophy.

  2. Design good APIs.

  3. Use a centralized logging.

  4. Communication is key.

  5. Do 12 Factor apps. ] .footnote[ 12 Factor ]


background-image: url(img/breathe.jpg)


background-image: url(img/company_clouds.jpg)


name: introduction class: left, middle background-image: url(img/company_clouds.jpg)

.regular[

Something is on the Horizon

]


name: introduction class: left, middle background-image: url(img/company_clouds.jpg)

.regular[

What Have We Done?

use case

Missing link. ]


name: introduction class: center, middle background-image: url(img/company_clouds.jpg)

.regular[

Bring it to Life! With an Orchestration

use case ]


name: introduction class: center, middle background-image: url(img/thunder.jpg)

use case


name: introduction class: left, middle background-image: url(img/thunder.jpg)

.regular[

We Lost the Connection to the Business

]


name: introduction class: left, middle background-image: url(img/idea.jpg)

.regular[

A New Idea: Processes

]


name: introduction class: left, middle background-image: url(img/idea.jpg)

.regular[

A New Idea

Processes as

  1. central tool of communication.
  2. core of the documentation.
  3. foundation for Microservices. ]

background-image: url(img/people_boss.jpg)


name: motivation class: left, middle background-image: url(img/people_boss.jpg)

.regular[

Boss Thinks

Money Money Money. ]


background-image: url(img/people_dev.jpg)


name: motivation class: left, middle background-image: url(img/people_dev.jpg)

.regular[

Developer Thinks

Code Code Code. ]


background-image: url(img/people_op.jpg)


name: motivation class: left, middle background-image: url(img/people_op.jpg)

.regular[

Operator Thinks

OMG. Mess. Help. ]


background-image: url(img/work_together.jpg)


name: motivation class: left, middle background-image: url(img/work_together.jpg)

.regular[

Work Together, How?

Find a common language. This is hard. ]


name: motivation class: left, middle background-image: url(img/business_case.jpg)

.regular[

Argument for Processes

]


name: motivation class: left, middle background-image: url(img/business_case.jpg)

.regular[

Argument for Processes

Wait, what about the Rules?

  1. Rule of Transparency
  2. Rule of Parsimony
  3. Rule of Generation
  4. Rule of Optimization ] .footnote[ From 17 Unix Rules ]

???

  1. Rule of Generation

    Developers should avoid writing code by hand and instead write abstract high-level programs that generate code. This rule aims to reduce human errors and save time.

  2. Rule of Optimization

    Developers should prototype software before polishing it. This rule aims to prevent developers from spending too much time for marginal gains.

  3. Rule of Diversity

    Developers should design their programs to be flexible and open. This rule aims to make programs flexible, allowing them to be used in ways other than those their developers intended.

  4. Rule of Extensibility

    Developers should design for the future by making their protocols extensible, allowing for easy plugins without modification to the program's architecture by other developers, noting the version of the program, and more. This rule aims to extend the lifespan and enhance the utility of the code the developer writes.


name: motivation class: center, top background-image: url(img/business_case.jpg)

.regular[

Argument for Processes

Process Delete ]


name: motivation class: center, top background-image: url(img/business_case.jpg)

.regular[

Argument for Processes

Landscape ]


name: motivation class: center, top background-image: url(img/business_case.jpg)

.regular[

Argument for Processes

Process Sample ]


name: motivation class: center, top background-image: url(img/business_case.jpg)

.regular[ Layered Architecture ]


name: motivation class: center, middle background-image: url(img/business_case.jpg)

.regular[ Dashboad ]


name: motivation class: center, middle background-image: url(img/business_case.jpg)

.regular[ Heatmap ]


name: motivation class: left, middle background-image: url(img/business_case.jpg)

.regular[

Argument for Processes

We already have plenty of them!

Using them is probably a good idea.

It will bring us to our common goal. ]


background-image: url(img/together.jpg)


background-image: url(img/final_scene.jpg)


name: motivation class: center, middle background-image: url(img/together.jpg)

.regular[

Boss == Developer == Operator

Money. Money. Money.

]


background-image: url(img/beautiful_stack.jpg)


name: introduction class: left, middle background-image: url(img/cinema.jpg)

.regular[

Summary and Story Time

]


name: introduction class: left, middle background-image: url(img/cinema.jpg)

.regular[

Summary and Story Time

  1. We want to be fault tolerant.
  2. Dependencies are all transparent.
  3. We want well behaving services.
  4. Failures are just changes.
  5. We want to scale. ]

name: introduction class: left, middle background-image: url(img/workshop_garage.jpg)

.regular[

Technical Topic: Pilots

]


name: introduction class: left, middle background-image: url(img/workshop_garage.jpg)

.regular[

The Story Translates to

  1. Service Discovery
  2. Load Balancing
  3. Automated failover
  4. Config changes
  5. Architectural Monitoring ]

name: introduction class: left, middle background-image: url(img/pilot.jpg)

Autopilot Pattern


name: introduction class: center, middle background-image: url(img/pilot.jpg)

Containerpilot

.footnote[ Source ]


name: introduction class: left, middle background-image: url(img/pilot.jpg)

.regular[

Service Responsible For Startup/Discovery/Shutdown...

  1. preStart - to initialize the microservice (e.g. to create configuration files).
  2. preStop/postStop - to perform a cleanup right before or after main process stopped.
  3. health - to periodically check if the application behaves as expected.
  4. onChange - whenever a dependency changes its state. ]

name: introduction class: center, middle background-image: url(img/pilot.jpg)

.regular[ Containerpilot ] .footnote[ Autopilot Hello-World ]


name: introduction class: left, middle background-image: url(img/pilot.jpg)

.regular[

What Do We Have?

  1. Nginx - nginx server rendering static assets.
  2. Consul - service catalog used to keep track of registered services.
  3. Hello - Node.js service responding with the word "Hello".
  4. World - Node.js service responding with the word "World". ]

name: demo class: left, middle background-image: url(img/solo_1.jpg)

.regular[

Livedemo Fun

Let's check out the ContainerPilot Pattern... ]


background-image: url(img/construct.jpg)


name: introduction class: center, middle background-image: url(img/construct.jpg)

.regular[ Containerpilot ] .footnote[ Source ]


name: introduction class: center, middle background-image: url(img/construct.jpg)

.regular[ Containerpilot ] .footnote[ Source ]


name: introduction class: center, middle background-image: url(img/construct.jpg)

.regular[ Containerpilot ] .footnote[ Source ]


name: introduction class: center, middle background-image: url(img/construct.jpg)

.regular[ Containerpilot ] .footnote[ Source ]


name: introduction class: center, middle background-image: url(img/construct.jpg)

.regular[ Containerpilot ] .footnote[ Source ]


name: introduction class: center, middle background-image: url(img/construct.jpg)

.regular[ Containerpilot ] .footnote[ Source ]


name: introduction class: left, middle background-image: url(img/construct.jpg)

.regular[

Autopilot

  1. Technology agnostic orchestration pattern.
  2. Will bring you transparency.
  3. Devs learn to think like operators.
  4. Available on your platform. ]

name: introduction class: center, middle background-image: url(img/travel.jpg)


name: explore class: left, middle background-image: url(img/playground.jpg)

.regular[

Let's Play Together...

Visit our Meetups!

5Minds Events

Dotnet Dev Ruhr ]


name: explore class: left, middle background-image: url(img/curious.jpg)

.page_left[ #... Stay Curious! ]