a prototypical tool to discover architecture changes based ...€¦ · a prototypical tool to...

43
Chair of Software Engineering for Business Information Systems (sebis) Faculty of Informatics Technische Universität München wwwmatthes.in.tum.de A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed system Patrick Schäfer, 08.11.2017, Munich Advisor: Martin Kleehaus

Upload: others

Post on 09-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Chair of Software Engineering for Business Information Systems (sebis)

Faculty of Informatics

Technische Universität München

wwwmatthes.in.tum.de

A prototypical tool to discover architecture

changes based on multiple monitoring data

sources for a distributed systemPatrick Schäfer, 08.11.2017, Munich

Advisor: Martin Kleehaus

Page 2: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Motivation

▪ Modeled & Runtime Architecture

▪ Problem Statement

Research Questions

Prototypical Implementation

▪ Operating Environment

▪ Discovery Concept

▪ Implementation

Live Demonstration

Limitations

Outline

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 2

Page 3: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Motivation

Modeled Enterprise Architecture

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 3

VM VM VM VM

Page 4: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Motivation

Runtime architecture

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 4

Necessity of knowledge about runtime architecture

▪ Detecting deviations from modeled architecture

▪ Compliance violations / SLA violations

▪ Semi-automated root cause analysis

▪ Semi-automated Impact analysis

State of the art solutions

Application Runtime Architecture Discovery

Architecture

discovery

VM VM VM VM

Page 5: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Motivation

Problem statement

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 5

Problem:

Current discovery solutions don‘t own knowledge about the entire architecture including

dependencies between and within the architectual layers

Consequences

▪ comparison of modeled and runtime architecture

not possible across all layers

▪ root cause analysis is challenging and time consuming

▪ Incomplete impact analysis

Objective

▪ a system, that owns knowledge about all

realtime architecture components as well as

their inter- and intralayer dependencies

?

Page 6: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

How to discover the Microservice Architecture by applying

distributed tracing?

What are component relationship types and how to discover them

automatically?

How to discover concurrency and synchronization?

How to recognize changes in the Microservice Architecture?

How to provide a smart user interface for adding business

semantic on top of business services?

Research questions

© sebis 6171108 Schäfer, Patrick - Master's Thesis final presentation

1

2

3

4

5

Page 7: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Operating Environment

© sebis 7171108 Schäfer, Patrick - Master's Thesis final presentation

Service

Service

Service

ServiceClient

Required Component

Optional Component

Legend:

Instrumented Distributed System

API

Gateway

EurekaRepository

Zipkin

Server

Service

Instrumented Service

Service

Distributed Tracing Spans

Required components of the prototypes operating environment:

▪ Instrumented Services

▪ Service Repository Eureka

▪ Zipkin Server

Page 8: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Architecture Model

© sebis 8171108 Schäfer, Patrick - Master's Thesis final presentation

Hardware 1

Process

Activity 1 Activity 2

Service 1

Instance 1.1 Instance 1.2

Service 2

Processes

Bu

sin

ess L

aye

r

Activities

Services

Ap

plic

ation

Laye

r

Service-Instances Instance 2

Hardware 2Hardware

Te

ch

nolo

gy L

aye

r

Page 9: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Architecture Model - Relations

© sebis 9171108 Schäfer, Patrick - Master's Thesis final presentation

Hardware 1

Process

Activity 1 Activity 2

Service 1

Instance 1.1 Instance 1.2

Service 2

Processes

Bu

sin

ess L

aye

r

Activities

Services

Ap

plic

ation

Laye

r

Service-Instances Instance 2

Hardware 2Hardware

Te

ch

nolo

gy L

aye

r

is followed by

uses

is executed by is executed by

is composed of is composed of is composed of

runs on runs on

Implicit meaning of relations

Page 10: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Architecture Model - Relations

© sebis 10171108 Schäfer, Patrick - Master's Thesis final presentation

Hardware 1

Process

Activity 1 Activity 2

Service 1

Instance 1.1 Instance 1.2

Service 2

Processes

Bu

sin

ess L

aye

r

Activities

Services

Ap

plic

ation

Laye

r

Service-Instances Instance 2

Hardware 2Hardware

Te

ch

nolo

gy L

aye

r

Hierarchical Interlayer-Relation Non-Hirarchical Intralayer-Relation

Relation classification: Interlayer- and Intralayer-Relations

Page 11: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Architecture Model - Relations

© sebis 11171108 Schäfer, Patrick - Master's Thesis final presentation

Hardware 1

Process

Activity 1 Activity 2

Service 1

Instance 1.1 Instance 1.2

Service 2

Processes

Bu

sin

ess L

aye

r

Activities

Services

Ap

plic

ation

Laye

r

Service-Instances Instance 2

Hardware 2Hardware

Te

ch

nolo

gy L

aye

r

Direct Relation

Relation classification: Direct and Indirect Relations

Indirect Relation

Page 12: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Architecture Model - Relations

© sebis 12171108 Schäfer, Patrick - Master's Thesis final presentation

Hardware 1

Process

Activity 1 Activity 2

Service 1

Instance 1.1 Instance 1.2

Service 2

Processes

Bu

sin

ess L

aye

r

Activities

Services

Ap

plic

ation

Laye

r

Service-Instances Instance 2

Hardware 2Hardware

Te

ch

nolo

gy L

aye

r

Direct RelationPath of Indirect Relation

Relation classification: Direct and Indirect Relations

Indirect Relation

Page 13: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Architecture Model - Relations

© sebis 13171108 Schäfer, Patrick - Master's Thesis final presentation

Activity 1 Activity 2

API Gateway Service

Indirect Relations are necessary

Service 1 Service 2

Service 3

Page 14: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Architecture Model - Relations

© sebis 14171108 Schäfer, Patrick - Master's Thesis final presentation

Activity 1 Activity 2

API Gateway Service

Indirect Relations are necessary

Service 1 Service 2

Service 3

Page 15: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Business Layer

© sebis 15171108 Schäfer, Patrick - Master's Thesis final presentation

Processes

Activities

Services

Instances

Hardware

Modelling via Web UI:

▪ Process and Activity entities

▪ Process-flow

Added to the architecture model via REST API

Page 16: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Application / Technology Layer

© sebis 16171108 Schäfer, Patrick - Master's Thesis final presentation

Processes

Activities

Services

Instances

Hardware

Detection of

▪ Services, Instances, Hardware

▪ Interlayer-Relations of these types

In Realtime by analysing Distributed Tracing

▪ Detects new entities only

Cyclic by processing Eureka API

▪ Detects new, updated or removed entitites

Page 17: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Service intralayer Relations

© sebis 17171108 Schäfer, Patrick - Master's Thesis final presentation

Processes

Activities

Services

Instances

Hardware

Detection of relations between Services

in Realtime by analysing Distributed Tracing Spans

*Source: http://opentracing.io/documentation/pages/instrumentation/instrumenting-large-systems.html

Distributed Tracing Span production*

Page 18: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Business / Application Relations

© sebis 18171108 Schäfer, Patrick - Master's Thesis final presentation

Processes

Activities

Services

Instances

Hardware

Detection of Interlayer-Relations between

Activities and Services in Realtime

▪ Set of regular expressions mapping to activities

▪ Set defined via Web UI and REST API

▪ Distributed Tracing Spans applied to ruleset

Page 19: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Implementation: System Components

© sebis 19171108 Schäfer, Patrick - Master's Thesis final presentation

Prototype

Kafka Stream Websocket Bridge

Webapplication

Business Layer Modelling

Relation Ruleset

Architecture Visualization

Microservice

Architecture

Eureka Repository

Distributed Tracing

Architecture-

discovery service

RE

ST

AP

I

Page 20: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Implementation: Environment

© sebis 20171108 Schäfer, Patrick - Master's Thesis final presentation

Service

Service

Service

ServiceClient

Instrumented Distributed System

API

Gateway

EurekaRepository

Zipkin

Server

Service

Service

▪ Zipkin Server replaced by Prototype

▪ Prototype extends Zipkin implementation

▪ Zipkin Server Features stay complete and unmodified

Page 21: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

▪ Zipkin Server replaced by Prototype

▪ Prototype extends Zipkin implementation

▪ Zipkin Server Features stay complete and unmodified

Prototypical Implementation

Implementation: Environment

© sebis 21171108 Schäfer, Patrick - Master's Thesis final presentation

Service

Service

Service

ServiceClient

Instrumented Distributed System

API

Gateway

EurekaRepository

Prototype and

Zipkin Server

Service

Service

Page 22: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 22171108 Schäfer, Patrick - Master's Thesis final presentation

Live Demonstration

Scenario: Business Process

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 23: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 23171108 Schäfer, Patrick - Master's Thesis final presentation

Business Core

Service

Accounting Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 24: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 24171108 Schäfer, Patrick - Master's Thesis final presentation

Business Core

Service

Accounting Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 25: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 25171108 Schäfer, Patrick - Master's Thesis final presentation

Accounting Core

Service

Business Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 26: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 26171108 Schäfer, Patrick - Master's Thesis final presentation

Accounting Core

Service

Business Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 27: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 27171108 Schäfer, Patrick - Master's Thesis final presentation

Accounting Core

Service

Business Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 28: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 28171108 Schäfer, Patrick - Master's Thesis final presentation

Accounting Core

Service

Business Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 29: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 29171108 Schäfer, Patrick - Master's Thesis final presentation

Accounting Core

Service

Business Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 30: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 30171108 Schäfer, Patrick - Master's Thesis final presentation

Accounting Core

Service

Business Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Login

Ende

Start

Select Provider

Search Route

Book Route

Logout

Page 31: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 31171108 Schäfer, Patrick - Master's Thesis final presentation

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture - Deployment

Host 0 (10.0.2.100)

Eureka

Config Service

Prototype

Host 1 (10.0.2.110)

Zuul

API Proxy

Business Core

Service

Accounting Core

Service

Host 2.1 (10.0.2.121)

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Travel-

companion

Service

Maps Helper

Service

Host 2.2 (10.0.2.121)

Page 32: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 32171108 Schäfer, Patrick - Master's Thesis final presentation

Live Demonstration

Page 33: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 33171108 Schäfer, Patrick - Master's Thesis final presentation

Limitations

▪ Requires Zipkin-compatible instrumentation as well as Eureka

▪ Amount of metainformation depends on instrumentation

▪ Raw communications like Database-Access is not detected

▪ Virtual Hosts are not detected

▪ Business layer is modelled

Page 34: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Technische Universität München

Faculty of Informatics

Chair of Software Engineering for

Business Information Systems

Boltzmannstraße 3

85748 Garching bei München

Tel +49.89.289.

Fax +49.89.289.17136

wwwmatthes.in.tum.de

Patrick Schäfer

B.Sc.

[email protected]

Page 35: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Backup

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 35

Page 36: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis 36171108 Schäfer, Patrick - Master's Thesis final presentation

Business Core

Service

Accounting Core

Service

DeutscheBahn

Mobility Service

DriveNow

Mobility Service

Zuul

API Proxy

Travel-

companion

Service

Maps Helper

Service

Live Demonstration

Scenario: Microservice Architecture

Asynchronous communication

Synchronous communication

Page 37: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Discovery Concept: Architecture Model - Relations

© sebis 37171108 Schäfer, Patrick - Master's Thesis final presentation

Hardware 1

Process

Activity 1 Activity 2

Service 1

Instance 1.1 Instanz 1.2

Service 2

Processes

Bu

sin

ess L

aye

r

Activities

Services

Ap

plic

ation

Laye

r

Service-Instances Instanz 2

Hardware 2Hardware

Te

ch

nolo

gy L

aye

r

Direct RelationPath of Indirect Relation

Relation classification: Direct and Indirect Relations

Indirect Relation

Page 38: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Implementation: Zipkin Server Extension

© sebis 38171108 Schäfer, Patrick - Master's Thesis final presentation

Collektor

REST Collektor Kafka Collektor …

MySQL DB

REST API

Zipkin UI

Span Span Span

Architecturediscoveryservice

Span

MySQL Storage

Page 39: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

Prototypical Implementation

Implementation: Zipkin Server Extension

© sebis 39171108 Schäfer, Patrick - Master's Thesis final presentation

Collektor

REST Collektor Kafka Collektor …

MySQL DB

REST API

Architecture Discovery Storage (Storage-Proxy)

MySQL Storage

Zipkin UI

Span Span Span

Architecturediscoveryservice

REST API StreamMySQL DB

Webapplication

Datamodel

Architecturediscoveryalgorithm

Span

Page 40: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 40

Page 41: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 41

Page 42: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 42

Page 43: A prototypical tool to discover architecture changes based ...€¦ · A prototypical tool to discover architecture changes based on multiple monitoring data sources for a distributed

© sebis171108 Schäfer, Patrick - Master's Thesis final presentation 43