Reactive Microservices mit Vert.x 3

28
REACTIVE MICROSERVICES mit Vert.x 3 Jochen Mader codecentric AG @codepitbull

Transcript of Reactive Microservices mit Vert.x 3

Page 1: Reactive Microservices mit Vert.x 3

REACTIVE MICROSERVICESmit Vert.x 3

Jochen Mader codecentric AG @codepitbull

Page 2: Reactive Microservices mit Vert.x 3

?

Page 3: Reactive Microservices mit Vert.x 3
Page 4: Reactive Microservices mit Vert.x 3
Page 5: Reactive Microservices mit Vert.x 3
Page 6: Reactive Microservices mit Vert.x 3
Page 7: Reactive Microservices mit Vert.x 3

MICRO SERVICES• klein

• eigene Datenhaltung

• unabhängige Entwicklung

• unabhängiges Deployment

• distributed by default … ?

Page 8: Reactive Microservices mit Vert.x 3

Die Latenzzeit ist gleich Null

Der Datendurchsatz ist unendlich

Das Netzwerk ist sicher

Die Netzwerktopologie wird sich nicht ändern

Es gibt immer nur einen Netzwerkadministrator

Datentransport ist „umsonst“

Das Netzwerk ist homogen

Page 9: Reactive Microservices mit Vert.x 3

REACTIVEAntwortbereit

Elastisch Widerstandsfähig

Nachrichtenorientiert

Page 10: Reactive Microservices mit Vert.x 3

Antwortbereit

Elastisch Widerstandsfähig

Nachrichtenorientiert

Page 11: Reactive Microservices mit Vert.x 3

Object 1 Object 2

Object 1 Object 2Bus

Page 12: Reactive Microservices mit Vert.x 3

Verticle

Handler

Handler

Handler

Handler

Storage

Bus

Verticle

Handler

Handler

Handler

Handler

Storage

Page 13: Reactive Microservices mit Vert.x 3

BROKER

Page 14: Reactive Microservices mit Vert.x 3

Antwortbereit

Elastisch Widerstandsfähig

Nachrichtenorientiert

Page 15: Reactive Microservices mit Vert.x 3

Verticle

Handler

Handler

Handler

Handler

Storage

Bus

Verticle

Handler

Handler

Handler

Handler

Storage

Verticle

Handler

Handler

Handler

Handler

Storage

Bus

Verticle

Handler

Handler

Handler

Handler

Storage

Verticle

Handler

Handler

Handler

Handler

Storage

Bus

Verticle

Handler

Handler

Handler

Handler

Storage

Verticle

Handler

Handler

Handler

Handler

Storage

Bus

Verticle

Handler

Handler

Handler

Handler

Storage

Page 16: Reactive Microservices mit Vert.x 3

Apache ZooKeeper

Page 17: Reactive Microservices mit Vert.x 3

vertx.deployVerticle("maven:com.mycompany:main-services:1.2::my-service", ...)

VerticleVerticle

VerticleVerticle

MAVEN SERVICES

Page 18: Reactive Microservices mit Vert.x 3

Antwortbereit

Elastisch Widerstandsfähig

Nachrichtenorientiert

Page 19: Reactive Microservices mit Vert.x 3

HYSTRIX

CIRCUIT BREAKERCOMMANDS

EVENT STREAM

Page 20: Reactive Microservices mit Vert.x 3

VERT.X

+ ELKREACTIVE STREAMS

ROUND ROBIN / HATIME OUT

Page 21: Reactive Microservices mit Vert.x 3

Antwortbereit

Elastisch Widerstandsfähig

Nachrichtenorientiert

Page 22: Reactive Microservices mit Vert.x 3

MICRO SERVICES

Page 23: Reactive Microservices mit Vert.x 3

FAT JARVerticle

VerticleVerticle

Verticle

io.vertx.core.Starter

lib.jar

lib.jar

lib.jar

lib.jar

mvn clean package

java -jar target/<appname>1.0-SNAPSHOT-fat.jar

Page 24: Reactive Microservices mit Vert.x 3
Page 25: Reactive Microservices mit Vert.x 3

MONOLITHS1

S2

S3

S1 S1

S2

Page 26: Reactive Microservices mit Vert.x 3

S1

S2

S3

S1 S1

S2

S1

S2

S3

S1 S1

S2

Page 27: Reactive Microservices mit Vert.x 3
Page 28: Reactive Microservices mit Vert.x 3