with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and...
Transcript of with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and...
![Page 1: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/1.jpg)
Developing Microservices with WildFly Swarm and MicroProfile
Ken FinniganPrincipal Software Engineer
John ClinganSenior Principal Product Manager
![Page 2: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/2.jpg)
Eclipse MicroProfile
![Page 3: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/3.jpg)
Enterprise Java Standards History
![Page 4: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/4.jpg)
Eclipse MicroProfile Background● Many innovative “microservices” efforts in existing Java EE projects
■ WildFly Swarm■ WebSphere Liberty■ Payara■ TomEE
○ Projects already leveraging both Java EE and non-Java EE technologies○ Creating new features/capabilities to address microservices architectures
● Wanted to avoid splitting into separate communities
● So we are collaborate in one community!
![Page 5: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/5.jpg)
An Eclipse FoundationProject
● Meritocracy; vendor neutrality● MicroProfile leadership can change over
time● Legal and technical infrastructure● Trademark Ownership● Accepts Apache License
![Page 6: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/6.jpg)
The Path to Microservices with MicroProfile
1. Leverage relevant Java EETechnologies
2. Organic Innovation
3. Collaborate in Open Source
![Page 7: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/7.jpg)
Quickly Put Features in Developers Hands
2016 2017 2018 2019
8 9
1.0
1.1
1.2
2.0
2.1
2020
2.2
* 2-4 releases per year
![Page 8: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/8.jpg)
Practical Usage of MicroProfile - Example
3rd Party Frameworks
![Page 9: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/9.jpg)
Join Us Later Today
Optimizing Java EE for a microservices architecture
4:30 PM - 5:15 PM
Room 102B
![Page 10: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/10.jpg)
WildFly Swarm
![Page 11: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/11.jpg)
What is it?
● Begins with WildFly / Java EE
● Extends Java EE with cloud native capabilities
● Package deployment
○ Uber Jar - including deployment
○ Hollow Uber Jar - without deployment
![Page 12: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/12.jpg)
Just enough App Server (JeAS)
● Bundles your deployment (JAR/WAR)
● Fractions define available functionality for deployment
● Internal Maven repository with dependencies
● Bootstrap Code
![Page 13: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/13.jpg)
Fractions...
● Enable WildFly subsystems (e.g. Infinispan)
● Integrate additional frameworks/services (e.g. Topology)
● Provide deployments (e.g. Swagger, Jolokia)
● Add API dependencies (e.g. JAX-RS)
● Alter deployments (e.g. Keycloak)
![Page 14: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/14.jpg)
Fractions...
● Expressed as Maven (GAV) coordinates:○ org.wildfly.swarm:<fraction>:<version>, e.g○ org.wildfly.swarm:undertow:2017.5.0
● 184 fractions currently available○ 158 stable○ 26 experimental
● About 80% wrap WildFly related components (Java EE, WF Camel, internal WF)
● More in the pipeline
![Page 15: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/15.jpg)
Enabling WildFly Swarm
<plugin> <groupId>org.wildfly.swarm</groupId> <artifactId>wildfly-swarm-plugin</artifactId> <version>${version.wildfly.swarm}</version> <executions> <execution> <id>package</id> <goals> <goal>package</goal> </goals> </execution> </executions> </plugin>
![Page 16: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/16.jpg)
AUTO DETECTION DEMO
![Page 17: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/17.jpg)
Enabling specific WildFly Swarm Fractions
<dependency> <groupId>org.wildfly.swarm</groupId> <artifactId>bom</artifactId> <version>${version.wildfly.swarm}</version> <type>pom</type> <scope>import</import> </dependency>
![Page 18: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/18.jpg)
Enabling specific WildFly Swarm Fractions
<dependency> <groupId>org.wildfly.swarm</groupId> <artifactId>jaxrs</artifactId> </dependency>
![Page 19: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/19.jpg)
Build / Run
Build
mvn package
Run
mvn wildly-swarm:run
OR
java -jar <my-app>-swarm.jar
OR
IDE > Run … org.wildfly.swarm.Swarm()
![Page 20: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/20.jpg)
Flexible Configuration● Maven Plugin
… <swarm.http.port>8081</swarm.http.port> …
● Java propertiesjava -Dswarm.http.port=8081 myapp.jar
● JBoss EAP configurationjava myapp.jar -c standalone.xml
● Environment-specific configurationjava myapp.jar -s project-production.yml
![Page 21: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/21.jpg)
MICROPROFILE DEMO
![Page 22: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/22.jpg)
Proposed Eclipse MicroProfile Features
● WildFly Swarm status:
○ Configuration - Implementation being worked on at present
○ Health Check - Align with monitor fraction when released
○ Security - May just require validation with keycloak fraction
![Page 23: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/23.jpg)
Health Checks
● monitor fraction was basis for MicroProfile Health Check specification
● Ability to add /health endpoints to microservice
● Integration with OpenShift Readiness/Liveness Checks
○ via fabric8-maven-plugin
![Page 24: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/24.jpg)
Health Checks
<dependency> <groupId>org.wildfly.swarm</groupId> <artifactId>monitor</artifactId> </dependency>
<enricher> <includes> <include>wildfly-swarm-health-check</include> </includes> </enricher>
![Page 25: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/25.jpg)
HEALTHCHECK DEMO
![Page 26: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/26.jpg)
WildFly Swarm Community
● IRC - #wildfly-swarm on Freenode
● Google Group - https://groups.google.com/forum/#!forum/wildfly-swarm
● JIRA - https://issues.jboss.org/browse/SWARM
● Twitter - @wildflyswarm
![Page 27: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/27.jpg)
Java Microservices Book● Recently released into MEAP
● Uses WildFly Swarm
● 39% discount on all Manning books with code: ctwrhsummit17
https://www.manning.com/books/java-microservices-in-action
![Page 28: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/28.jpg)
QUESTIONS ?
![Page 29: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/29.jpg)
Demo CodeAvailable from:
https://github.com/kenfinnigan/wfswarm-rhsummit2017
![Page 30: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/30.jpg)
THANK YOUplus.google.com/+RedHat
linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
facebook.com/redhatinc
twitter.com/RedHatNews
![Page 31: with WildFly Swarm and MicroProfile Developing …...Developing Microservices with WildFly Swarm and MicroProfile Ken Finnigan Principal Software Engineer John Clingan Senior Principal](https://reader030.fdocuments.us/reader030/viewer/2022041022/5ed3be2fe4e8c10a396faeb0/html5/thumbnails/31.jpg)