wildfly swarm - toruń jug...wildfly constituents split into fractions pick what you need and...

29
WildFly Swarm Michał Szynkiewicz, Senior Software Engineer @ Red Hat

Upload: others

Post on 28-May-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

WildFly Swarm

Michał Szynkiewicz, Senior Software Engineer @ Red Hat

Page 2: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Microservices

WildFly Swarm and Microservices

Agenda

Page 3: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Communication is terrible, Jeff Bezos

Microservices

Photo by Steve Jurvetson, CC BY 2.0 license

Page 4: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Microservices

„Two Pizza Rule”

Page 5: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Well defined responsibility

Page 6: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Technology adjusted to the needs

Page 7: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Independent scaling

Page 8: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

It’s easier to replace a service

Page 9: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Faster changes

Page 10: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

The challanges

Martin Fowlerhttps://martinfowler.com/bliki/MicroservicePrerequisites.html

Page 11: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Splitting the system, aka defining service boundaries.

Almost all the successful microservice stories have started with a monolith that got too big and was broken up

Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up

in serious trouble.Martin Fowler

Page 12: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Configuring service dependencies

Page 13: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

More deployments

Page 14: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Logging

Page 15: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Monitoring

Page 16: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

More configuration for CI, etc

Page 17: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Rapid provisioning

Basic Monitoring

Rapid application deployment

Microservices baseline (M. Fowler):

Page 18: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Swarm

Page 19: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Java EE API

Page 20: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

WildFly constituents split into fractions

Pick what you need and package in an uber-jar with your app

Configure in Java or yaml file

Page 21: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Demo, part 1

Page 22: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Beyond Java EE

Logstash Zipkin

Consul Ribbon

Hystrix

Jolokia Flyway

Swagger

Keycloak

OpenshiftTeiid

Infinispan

Page 23: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Consul

● Service discovery & configuration

Page 24: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Zipkin

● Distributed tracing● Optional analysis

(requires a Spark job)

Page 25: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Logstash

● Gather logs from multiple sources● Optionally transform● „stash” it, e.g. in Elsticsearch

Page 26: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Demo, part 2

Page 27: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Transition enablers

Move your code outside Java EE container right away

Reuse your standalone.xml!

Required fractions can be autodetected, no need to know them before you start

Page 28: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Reading, etc

● https://wildfly-swarm.gitbooks.io/wildfly-swarm-users-guide/

● https://github.com/wildfly-swarm/wildfly-swarm-examples

● https://github.com/wildfly-swarm-openshiftio-boosters/

● „Building Microservices”, Sam Newman● Java Microservices in Action [MEAP], Ken

Finnigan

Page 29: WildFly Swarm - Toruń JUG...WildFly constituents split into fractions Pick what you need and package in an uber-jar with your app Configure in Java or yaml file Demo, part 1 Beyond

Questions?

#wildfly-swarm on Freenode