Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
1
DeveloperWeek Hackathon:
MicroProfile & Open Liberty Michal Broz – WebSphere UI Architect
2 2
Create your
application/solution using at
least one MicroProfile feature
running on Open Liberty. the challenge
3 3
Microservice the architecture
4
Monolith vs Microservice
5 5
the programming model
7
@Path(“/”) public class RestEE { @GET @Counter @Traced public String hello() { return "Hello MicroProfile!!"; } }
Eclipse MicroProfile
• Builds on Java EE • By the Java EE community • Open Source at Eclipse • Multiple Implementations
8
Eclipse MicroProfile
JSON-B Rest Client JAX-RS CDI JSON-P Integrate
9
Eclipse MicroProfile
Fault
Tolerance Open API Config JWT
JSON-B Rest Client JAX-RS CDI JSON-P
Scale
Integrate
10
Eclipse MicroProfile
Health
Check Metrics
Fault
Tolerance Open API Config
Open Tracing
JWT
JSON-B Rest Client JAX-RS CDI JSON-P
Observe
Scale
Integrate
11
@Path(“/”) public class RestEE { @Inject @ConfigProperty(“name”) private String name; @GET @Counter @Traced public String hello() { return "Hello " + name; } }
Eclipse MicroProfile
• Inject Configuration • Sourced from
• Properties file • Java system properties • Environment • Liberty server configuration
12 12
Open Liberty the runtime
13
Liberty Goals
• Efficient & Lightweight
• Simple to use
• Consistency
• Just enough runtime
• End of migration
• Agile-ready
14
Composable
• Control which features are loaded into each server instance
<feature>microProfile-1.0</feature>
Kernel
jsonp-1.0
cdi-1.2 appmgr
jaxrs-2.0
15
<server> <featureManager> <feature>microProfile-1.2</feature> </featureManager> <webApplication location=“myweb.war” contextRoot=“/” /> </server>
server.xml
-Xmx1g -Dsystem.prop=value
jvm.options
WLP_OUTPUT_DIR=/usr/wlp-out/
server.env
Simple Config
16
Composable Config
<server> <httpEndpoint id=“defaultHttpEndpoint” host=“${host}” httpPort=“${http}” httpsPort=“${https}”/> </server>
configDropins/defaults/common-http.xml
<server> <include location="https://myHost/ports.xml”/> <variable name=“host” value=“${my.host}”/> <variable name=“http” value=“${my.host.http}”/> <variable name=“https” value=“${my.host.https}”/> </server>
configDropins/overrides/ports.xml
17
Feature Rich MicroProfile 3.0 WebProfile 7 Java EE 7 Java EE 7 (cont.) Java EE 8 Security non-API
cdi-2.0 beanValidation-1.1 appClientSupport-1.0 jaxws-2.2 appSecurity-3.0 passwordUtilities-1.0 bells-1.0
jaxrs-2.1 cdi-1.2 appSecurityClient-1.0 jca-1.7 beanValidation-2.0 wsSecurity-1.1 distributedMap-1.0
jsonp-1.1 ejbLite-3.2 batch-1.0 jcaInboundSecurity-1.0 cdi-2.0 wsSecuritySaml-1.0 federatedRegistry-1.0
Jsonb-1.0 el-3.0 concurrent-1.0 jms-2.0 javaeeClient-8.0 audit-1.0 jwt-1.0
mpConfig-1.3 jaxrs-2.0 ejb-3.2 jmsMdb-3.2 javaee-8.0 ldapRegistry-3.0 jwtSso-1.0
mpFaultTolerance-2.0 jaxrsClient-2.0 ejbHome-3.2 mdb-3.2 javaMail-1.6 oauth-2.0 ldapRegistry-3.0
mpHealth-2.0 jdbc-4.2 ejbPersistentTimer-3.2 webProfile-7.0 jaxrs-2.1 openid-2.0 localConnector-1.0
mpJwt-1.1 jndi-1.0 ejbRemote-3.2 wasJmsClient-2.0 jaxrsClient-2.1 openidConnectClient-1.0 monitor-1.0
mpMetrics-2.0 jpa-2.1 j2eeManagement-1.1 wasJmsSecurity-1.0 jpa-2.2 openidConnectServer-1.0 openTracing-1.0
mpOpenAPI-1.1 jpaContainer-2.1 jacc-1.5 wasJmsServer-1.0 jpaContainer-2.2 samlWeb-2.0 osgiConsole-1.0
mpOpenTracing-1.3 jsf-2.2 jaspic-1.1 jsf-2.3 scim-1.0 passwordUtilities-1.0
mpRestClient-1.3 jsfContainer-2.2 javaee-7.0 Extended Models jsfContainer-2.3 socialLogin-1.0 restConnector-2.0
jsonp-1.0 javaeeClient-7.0 couchdb-1.0 jsonb-1.0 spnego-1.0 sessionCache-1.0
jsp-2.3 javaMail-1.5 cloudant-1.0 jsonbContainer-1.0 transportSecurity-1.0 sessionDatabase-1.0
managedBeans-1.0 jaxb-2.2 json-1.0 jsonp-1.1 ssl-1.0
servlet-3.1 mongodb-2.0 servlet-4.0 transportSecurity-1.0
websocket-1.1 springBoot-1.5 webProfile-8.0
springBoot-2.0
18
Zero Migration
• Zero config migration
- Write once, run forever
• Zero migration for apps
- No behavior changes in existing features
- New behaviors in new features
• Choose your Java
- Java 12, 11, 8
- AdoptOpenJDK
- IBM
- OpenJDK
- Oracle
19.0.0.2
19.0.0.4 19.0.0.1
19.0.0.5
19.0.0.3 19.0.0.6
19.0.0.7
19.0.0.8
19.0.0.9
19.0.0.10
19.0.0.11
Jan Dec
• Fixpacks released prior to 2019 still get 2 years of iFix coverage
• Fixpacks released 2019 and later get at least 6 months of iFix coverage
• Fixpacks ending in .3, .6, .9 or .12 get 2 years of iFix coverage
* Security patches automatically for the last two fixpacks ending in one of
.3, .6, .9, .12 and last fixpack
*
* *
2019 iFixes & Security Patches
20
Liberty: First to Deliver/Certify
• First shipped in WAS 8.5 in 2012
o Servlet + JSP + JPA
• Web Profile 6 in 2014
• Java EE 7 in 2016 – first commercial
product to certify
• Java EE 8 in 2018 – first to certify
• Jakarta EE 8 in 2019 – first to certify
• Eclipse MicroProfile – first to
deliver 1.0-1.4, 2.0-2.1, 3.0
21 21
Continuous delivery
Blazing Fast Start-up
• Amost halved startup time due to app server and JVM improvements through 2019
• 2 hyperthreaded cpus on 2 socket system, each socket containing 24 cores. cpu model: Intel Xeon Platinum 8168 CPU @ 2.70 GHz
• Application PingPerf - https://github.com/HotswapProjects/pingperf
0
0.5
1
1.5
2
2.5
December March April July August September
2019 Progression of OpenLiberty+OpenJ9 startup time (seconds)
Seco
nd
s
23
Developer Experience: dev mode
• Boosts developer productivity
• Immediate feedback for code
and config changes
• No re-build necessary
mvn liberty:dev
24 24
The world demands Open Source
25
It really is Open Liberty
• Open Source on Github
• Issue tracking on Github
• EPL License
• Public Gitter for
discussion
openliberty.io
Launched September 2017
27 27
Getting Started
28
Useful Links
• Open Liberty: https://openliberty.io/
• Open Liberty Guides: https://openliberty.io/guides/
• MicroProfile: https://microprofile.io/
• Jakarta EE: https://jakarta.ee/
• Liberty Bikes: https://github.com/OpenLiberty/liberty-bikes
http://libertybikes.mybluemix.net/
https://openliberty.io/guides/?search=microprofile&key=tag
30
https://start.microprofile.io/
32
33 33
Questions?