SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Java EE Microservices
with WildFly Swarm
Heiko Braun <hbraun@redhat.com>
Feb 2016
Organised by the Lightweight Java User Group Munich,
hosted at ComSysto. Thanks to both.
This evening
• The Context: Microservices and Java EE
• WildFly Swarm: Concepts, Ideas & Mechanics
• Code and Demo
• Outlook, Discussions and (hopefully) beer
What are
Microservices anyway?
Like SOA, but different …
• Microservices are different

primarily due to innovations like:
• Linux containers,
• automated, elastic infrastructure, you know, the
cloud
• plus wide adoption of CI, continuous integration
• and the growing adoption of DevOps principles &
practices
“In short, the microservice architectural style is
an approach to developing a single application
as a suite of small services, each running in its
own process and communicating with
lightweight mechanisms, often an HTTP
resource API. These services are built around
business capabilities and independently
deployable by fully automated deployment
machinery. There is a bare minimum of
centralized management of these services,
which may be written in different programming
languages and use different data storage
technologies.”
– Martin Fowler, ThoughtWorks
What is Java EE
anyway?
Perspectives on Java EE
• It’s different things to different people:
• A collection of (useful) API’s
• Technical capabilities of a system
• A love/hate relationship (of the past)
• (Existing) knowledge and expertise
Hello WildFly Swarm
WildFly Swarm
• OSS Project sponsored by Red Hat
• Sidekick of Wildfly Application Server
• Small, but ambitious and friendly community
• Part of a bigger system of interrelated projects
under the JBoss / Red Hat umbrella
Just Enough App Server
• Use the API’s you
want
• Include the
capabilities you need
• Wrap it up for
deployment
Uberjar
• A single .jar file containing
your application,
• the portions of WildFly
required to support it,
• an internal Maven repository
of dependencies,
• plus a shim to bootstrap it
all
Fractions
• A well-defined collection of application capabilities.
• May map directly to a WildFly subsystem,
• or bring in external capabilities such as Netflix
Ribbon.
What Fractions can do
• Enable WildFly subsystems (JAX-RS, Infinispan)
• Integrate additional system capabilities (Topology)
• Provide deployments (ribbon-webapp, jolokia)
• Alter deployments (keycloak)
Example Fractions
Datasources Keycloak (SSO) Undertow (Http/Web)
EJB Messaging Clustering
JAX-RS JPA Infinispan
Transactions CDI Management
Convert Java EE App
to use WildFly Swarm
pom.xml
Adding Fractions to your build
pom.xml
Adding the WildFly Swarm Plugin to your build
Running a WildFly Swarm App
$ java -jar target/javaee7-simple-sample-swarm.jar
$ mvn wildfly-swarm:run
Building a WildFly Swarm App
$ mvn package
$ ls -l target/javaee7-simple-sample-swarm.jar
Going beyond simple
(and Java EE)
Custom Configuration
(alternatively use standalone.xml)
Advertising Services
(supports different service registries)
Load Balancing & Circuit Breaking
(Integration of Ribbon with Topology. Supports Hystrix)
Securing Access to Services
(provided by Keycloak: OpenID, SAML, Social Login, OAuth, LDAP, Active Directory)
Publishing Service Interface Descriptions
(provided by Swagger)
$ curl http://localhost:8080/swagger.json
Other Noteworthy Features
• Testing:
• Arquillian (in container, web driver)
• Consumer-Driven Contracts 

(expressing and asserting expectations of a provider contract)
• Logging & Monitoring
• Simple REST interface on each node
• Centralised Logging with Logstash
• Push Runtime Data to Hawkular,Influx,etc
• Remote Management
• CLI (full access to the server config and runtime state)
Booker Demo
• Booker! is an electronic bookstore that demonstrates how
many WildFly Swarm-based microservices can play together.
• https://github.com/wildfly-swarm/booker
The Road Ahead
• API Gateway 

(integration with APIMan)
• Integration with Kubernetes / OpenShift V3

(i.e. Service Discovery)
• Environment Abstractions (Local, CI, Cloud)
• Tooling (Forge, Eclipse, IntelliJ)
• Spring Support
Get Involved
• Project Home: http://wildfly-swarm.io
• GitHub: https://github.com/wildfly-swarm
• Twitter: @wildflyswarm
• Freenode: @wildfly-swarm
• Issues: https://issues.jboss.org/projects/SWARM

(see ‘getting-started’ labels)
Resources
• Keycloak: http://keycloak.jboss.org/
• Hawkular: http://www.hawkular.org/
• OpenShift V3: https://blog.openshift.com/openshift-v3-deep-
dive-docker-kubernetes/
• APIMan: http://www.apiman.io/latest/
• Arquillian: http://arquillian.org/
• WildFly: http://wildfly.org
• Consul: https://www.consul.io/

Weitere ähnliche Inhalte

Was ist angesagt?

Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
Markus Eisele
 

Was ist angesagt? (20)

High performance java ee with j cache and cdi
High performance java ee with j cache and cdiHigh performance java ee with j cache and cdi
High performance java ee with j cache and cdi
 
Java on Azure
Java on AzureJava on Azure
Java on Azure
 
JavaEE Microservices -the Payara Way
JavaEE Microservices -the Payara WayJavaEE Microservices -the Payara Way
JavaEE Microservices -the Payara Way
 
Web application I have always dreamt of
Web application I have always dreamt ofWeb application I have always dreamt of
Web application I have always dreamt of
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Monitoring and Tuning GlassFish
Monitoring and Tuning GlassFishMonitoring and Tuning GlassFish
Monitoring and Tuning GlassFish
 
Modernizing Applications with Microservices
Modernizing Applications with MicroservicesModernizing Applications with Microservices
Modernizing Applications with Microservices
 
Microservices with Spring Cloud
Microservices with Spring CloudMicroservices with Spring Cloud
Microservices with Spring Cloud
 
Streaming to a New Jakarta EE
Streaming to a New Jakarta EEStreaming to a New Jakarta EE
Streaming to a New Jakarta EE
 
Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?
 
Taking the friction out of microservice frameworks with Lagom
Taking the friction out of microservice frameworks with LagomTaking the friction out of microservice frameworks with Lagom
Taking the friction out of microservice frameworks with Lagom
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
 
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019
 
Building 12-factor Cloud Native Microservices
Building 12-factor Cloud Native MicroservicesBuilding 12-factor Cloud Native Microservices
Building 12-factor Cloud Native Microservices
 
ARCHITECTING LARGE ENTERPRISE JAVA PROJECTS - vJUG
ARCHITECTING LARGE ENTERPRISE JAVA PROJECTS - vJUGARCHITECTING LARGE ENTERPRISE JAVA PROJECTS - vJUG
ARCHITECTING LARGE ENTERPRISE JAVA PROJECTS - vJUG
 
Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019Introduction to Micronaut - JBCNConf 2019
Introduction to Micronaut - JBCNConf 2019
 
Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019Micronaut Deep Dive - Devoxx Belgium 2019
Micronaut Deep Dive - Devoxx Belgium 2019
 
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
How Class Data Sharing Can Speed up Your Jakarta EE Application StartupHow Class Data Sharing Can Speed up Your Jakarta EE Application Startup
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
 
Node and Micro-Services at IBM
Node and Micro-Services at IBMNode and Micro-Services at IBM
Node and Micro-Services at IBM
 
JavaCro'15 - Service Discovery in OSGi Beyond the JVM using Docker and Consul...
JavaCro'15 - Service Discovery in OSGi Beyond the JVM using Docker and Consul...JavaCro'15 - Service Discovery in OSGi Beyond the JVM using Docker and Consul...
JavaCro'15 - Service Discovery in OSGi Beyond the JVM using Docker and Consul...
 

Ähnlich wie Writing Java EE microservices using WildFly Swarm

TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
Java Microservices HJUG
Java Microservices HJUGJava Microservices HJUG
Java Microservices HJUG
Lana Kalashnyk
 
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud ComputingOSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
Mark Hinkle
 

Ähnlich wie Writing Java EE microservices using WildFly Swarm (20)

FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0 FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
 
The twelve factor app
The twelve factor appThe twelve factor app
The twelve factor app
 
Intro to spring cloud &microservices by Eugene Hanikblum
Intro to spring cloud &microservices by Eugene HanikblumIntro to spring cloud &microservices by Eugene Hanikblum
Intro to spring cloud &microservices by Eugene Hanikblum
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
 
Java Microservices HJUG
Java Microservices HJUGJava Microservices HJUG
Java Microservices HJUG
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018
 
The elegant way of implementing microservices with istio
The elegant way of implementing microservices with istioThe elegant way of implementing microservices with istio
The elegant way of implementing microservices with istio
 
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
12월 16일 Meetup [Deep Dive] Microservice 트래픽 관리를 위한 Istio 알아보기 | 강인호 컨설턴트, 오라클
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonEclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – Helidon
 
Java EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolithJava EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolith
 
Azure Service Fabric Overview
Azure Service Fabric OverviewAzure Service Fabric Overview
Azure Service Fabric Overview
 
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud ComputingOSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
 
Architecting for Scale
Architecting for ScaleArchitecting for Scale
Architecting for Scale
 
Ohio LinuxFest: Crash Course in Open Source Cloud Computing
Ohio LinuxFest:  Crash Course in Open Source Cloud ComputingOhio LinuxFest:  Crash Course in Open Source Cloud Computing
Ohio LinuxFest: Crash Course in Open Source Cloud Computing
 
Chicago Microservices Integration Talk
Chicago Microservices Integration TalkChicago Microservices Integration Talk
Chicago Microservices Integration Talk
 
DevOps and Microservice
DevOps and MicroserviceDevOps and Microservice
DevOps and Microservice
 
@@@Resume2016 11 11_v001
@@@Resume2016 11 11_v001@@@Resume2016 11 11_v001
@@@Resume2016 11 11_v001
 
Delivering IaaS with Open Source Software
Delivering IaaS with Open Source SoftwareDelivering IaaS with Open Source Software
Delivering IaaS with Open Source Software
 

Mehr von Comsysto Reply GmbH

MicroFrontends für Microservices
MicroFrontends für MicroservicesMicroFrontends für Microservices
MicroFrontends für Microservices
Comsysto Reply GmbH
 

Mehr von Comsysto Reply GmbH (20)

Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
ljug-meetup-2023-03-hexagonal-architecture.pdf
ljug-meetup-2023-03-hexagonal-architecture.pdfljug-meetup-2023-03-hexagonal-architecture.pdf
ljug-meetup-2023-03-hexagonal-architecture.pdf
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
 
Invited-Talk_PredAnalytics_München (2).pdf
Invited-Talk_PredAnalytics_München (2).pdfInvited-Talk_PredAnalytics_München (2).pdf
Invited-Talk_PredAnalytics_München (2).pdf
 
MicroFrontends für Microservices
MicroFrontends für MicroservicesMicroFrontends für Microservices
MicroFrontends für Microservices
 
Alles offen = gut(ai)
Alles offen = gut(ai)Alles offen = gut(ai)
Alles offen = gut(ai)
 
Bable on Smart City Munich Meetup: How cities are leveraging innovative partn...
Bable on Smart City Munich Meetup: How cities are leveraging innovative partn...Bable on Smart City Munich Meetup: How cities are leveraging innovative partn...
Bable on Smart City Munich Meetup: How cities are leveraging innovative partn...
 
Smart City Munich Kickoff Meetup
Smart City Munich Kickoff Meetup Smart City Munich Kickoff Meetup
Smart City Munich Kickoff Meetup
 
Data Reliability Challenges with Spark by Henning Kropp (Spark & Hadoop User ...
Data Reliability Challenges with Spark by Henning Kropp (Spark & Hadoop User ...Data Reliability Challenges with Spark by Henning Kropp (Spark & Hadoop User ...
Data Reliability Challenges with Spark by Henning Kropp (Spark & Hadoop User ...
 
"Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wo...
"Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wo..."Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wo...
"Hadoop Data Lake vs classical Data Warehouse: How to utilize best of both wo...
 
Data lake vs Data Warehouse: Hybrid Architectures
Data lake vs Data Warehouse: Hybrid ArchitecturesData lake vs Data Warehouse: Hybrid Architectures
Data lake vs Data Warehouse: Hybrid Architectures
 
Java 9 Modularity and Project Jigsaw
Java 9 Modularity and Project JigsawJava 9 Modularity and Project Jigsaw
Java 9 Modularity and Project Jigsaw
 
Distributed Computing and Caching in the Cloud: Hazelcast and Microsoft
Distributed Computing and Caching in the Cloud: Hazelcast and MicrosoftDistributed Computing and Caching in the Cloud: Hazelcast and Microsoft
Distributed Computing and Caching in the Cloud: Hazelcast and Microsoft
 
Grundlegende Konzepte von Elm, React und AngularDart 2 im Vergleich
Grundlegende Konzepte von Elm, React und AngularDart 2 im VergleichGrundlegende Konzepte von Elm, React und AngularDart 2 im Vergleich
Grundlegende Konzepte von Elm, React und AngularDart 2 im Vergleich
 
Building a fully-automated Fast Data Platform
Building a fully-automated Fast Data PlatformBuilding a fully-automated Fast Data Platform
Building a fully-automated Fast Data Platform
 
Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications Apache Apex: Stream Processing Architecture and Applications
Apache Apex: Stream Processing Architecture and Applications
 
Ein Prozess lernt laufen: LEGO Mindstorms Steuerung mit BPMN
Ein Prozess lernt laufen: LEGO Mindstorms Steuerung mit BPMNEin Prozess lernt laufen: LEGO Mindstorms Steuerung mit BPMN
Ein Prozess lernt laufen: LEGO Mindstorms Steuerung mit BPMN
 
Geospatial applications created using java script(and nosql)
Geospatial applications created using java script(and nosql)Geospatial applications created using java script(and nosql)
Geospatial applications created using java script(and nosql)
 
Java cro 2016 - From.... to Scrum by Jurica Krizanic
Java cro 2016 - From.... to Scrum by Jurica KrizanicJava cro 2016 - From.... to Scrum by Jurica Krizanic
Java cro 2016 - From.... to Scrum by Jurica Krizanic
 
21.04.2016 Meetup: Spark vs. Flink
21.04.2016 Meetup: Spark vs. Flink21.04.2016 Meetup: Spark vs. Flink
21.04.2016 Meetup: Spark vs. Flink
 

Kürzlich hochgeladen

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 

Kürzlich hochgeladen (20)

kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 

Writing Java EE microservices using WildFly Swarm

  • 1. Java EE Microservices with WildFly Swarm Heiko Braun <hbraun@redhat.com> Feb 2016 Organised by the Lightweight Java User Group Munich, hosted at ComSysto. Thanks to both.
  • 2. This evening • The Context: Microservices and Java EE • WildFly Swarm: Concepts, Ideas & Mechanics • Code and Demo • Outlook, Discussions and (hopefully) beer
  • 4. Like SOA, but different … • Microservices are different
 primarily due to innovations like: • Linux containers, • automated, elastic infrastructure, you know, the cloud • plus wide adoption of CI, continuous integration • and the growing adoption of DevOps principles & practices
  • 5. “In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.” – Martin Fowler, ThoughtWorks
  • 6. What is Java EE anyway?
  • 7. Perspectives on Java EE • It’s different things to different people: • A collection of (useful) API’s • Technical capabilities of a system • A love/hate relationship (of the past) • (Existing) knowledge and expertise
  • 9. WildFly Swarm • OSS Project sponsored by Red Hat • Sidekick of Wildfly Application Server • Small, but ambitious and friendly community • Part of a bigger system of interrelated projects under the JBoss / Red Hat umbrella
  • 10. Just Enough App Server • Use the API’s you want • Include the capabilities you need • Wrap it up for deployment
  • 11. Uberjar • A single .jar file containing your application, • the portions of WildFly required to support it, • an internal Maven repository of dependencies, • plus a shim to bootstrap it all
  • 12. Fractions • A well-defined collection of application capabilities. • May map directly to a WildFly subsystem, • or bring in external capabilities such as Netflix Ribbon.
  • 13. What Fractions can do • Enable WildFly subsystems (JAX-RS, Infinispan) • Integrate additional system capabilities (Topology) • Provide deployments (ribbon-webapp, jolokia) • Alter deployments (keycloak)
  • 14. Example Fractions Datasources Keycloak (SSO) Undertow (Http/Web) EJB Messaging Clustering JAX-RS JPA Infinispan Transactions CDI Management
  • 15. Convert Java EE App to use WildFly Swarm
  • 16.
  • 18. pom.xml Adding the WildFly Swarm Plugin to your build
  • 19. Running a WildFly Swarm App $ java -jar target/javaee7-simple-sample-swarm.jar $ mvn wildfly-swarm:run Building a WildFly Swarm App $ mvn package $ ls -l target/javaee7-simple-sample-swarm.jar
  • 23. Load Balancing & Circuit Breaking (Integration of Ribbon with Topology. Supports Hystrix)
  • 24. Securing Access to Services (provided by Keycloak: OpenID, SAML, Social Login, OAuth, LDAP, Active Directory)
  • 25. Publishing Service Interface Descriptions (provided by Swagger)
  • 27. Other Noteworthy Features • Testing: • Arquillian (in container, web driver) • Consumer-Driven Contracts 
 (expressing and asserting expectations of a provider contract) • Logging & Monitoring • Simple REST interface on each node • Centralised Logging with Logstash • Push Runtime Data to Hawkular,Influx,etc • Remote Management • CLI (full access to the server config and runtime state)
  • 28. Booker Demo • Booker! is an electronic bookstore that demonstrates how many WildFly Swarm-based microservices can play together. • https://github.com/wildfly-swarm/booker
  • 29. The Road Ahead • API Gateway 
 (integration with APIMan) • Integration with Kubernetes / OpenShift V3
 (i.e. Service Discovery) • Environment Abstractions (Local, CI, Cloud) • Tooling (Forge, Eclipse, IntelliJ) • Spring Support
  • 30. Get Involved • Project Home: http://wildfly-swarm.io • GitHub: https://github.com/wildfly-swarm • Twitter: @wildflyswarm • Freenode: @wildfly-swarm • Issues: https://issues.jboss.org/projects/SWARM
 (see ‘getting-started’ labels)
  • 31. Resources • Keycloak: http://keycloak.jboss.org/ • Hawkular: http://www.hawkular.org/ • OpenShift V3: https://blog.openshift.com/openshift-v3-deep- dive-docker-kubernetes/ • APIMan: http://www.apiman.io/latest/ • Arquillian: http://arquillian.org/ • WildFly: http://wildfly.org • Consul: https://www.consul.io/