31
CONFIDENTIAL Designator OpenAlt 2019 Eclipse MicroProfile Starter with Quarkus Martin Štefanko @xstefank Software Engineer, Red Hat MicroProfile committer, Microservices enthusiast JBoss EAP sustaining engineer JBoss Enterprise Application Platform - application server WildFly application server - upstream community version of JBoss EAP Java EE / Jakarta EE specifications (e.g. JAX-RS, CDI, JPA) 1 Michal Karm Babacek @_karm Principal Quality Engineer, Red Hat C/Java/Go programmer focused on Apache HTTP Server, Tomcat, load-balancing, high-availability, containers and MicroProfile by day; Coding fluorescence microscopy data processing and DNS malware protection toys by night. Avid user of Wildfly and Infinispan clustering. Considers 1MB being plenty of memory and 16ms plenty of time. 1/65535

JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

CONFIDENTIAL Designator

OpenAlt 2019

Eclipse MicroProfile Starter with Quarkus

Martin Štefanko @xstefankSoftware Engineer, Red Hat

MicroProfile committer, Microservices enthusiastJBoss EAP sustaining engineerJBoss Enterprise Application Platform - application serverWildFly application server - upstream community version of JBoss EAPJava EE / Jakarta EE specifications (e.g. JAX-RS, CDI, JPA)

1

Michal Karm Babacek @_karmPrincipal Quality Engineer, Red Hat

C/Java/Go programmer focused on Apache HTTP Server, Tomcat, load-balancing, high-availability, containers and MicroProfile by day; Coding fluorescence microscopy data processing and DNS malware protection toys by night. Avid user of Wildfly and Infinispan clustering. Considers 1MB being plenty of memory and 16ms plenty of time.

1/65535

Page 2: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

CONFIDENTIAL Designator

2

Agenda● High-level intro to MicroProfile (15 minutes) (Martin)● High-level intro to Quarkus (5 minutes) (Karm)● Demo of MP Starter: (15 minutes) (Karm)● Demo of MP Starter REST API (5 minutes) (Karm)● More MicroProfile specs and Q&A (Martin, Karm)

Page 3: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

Enterprise Java in past 20 years● Java EE (currently Jakarta EE)

○ Java EE 5 - May 11, 2006

○ Java EE 6 - December 10, 2009

○ Java EE 7 - June 12, 2013

○ Java EE 8 - August 31, 2017

3

Page 4: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

MicroProfile● Eclipse MicroProfile is an open-source community specification for Enterprise

Java microservices

● A community of individuals, organizations, and vendors collaborating within an open source (Eclipse) project to bring microservices to the Enterprise Java community

4

Page 5: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

MicroProfile

5

Page 6: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

+Under discussion● Long Running Actions (LRA)

● Service mesh

● GraphQL

● Logging

● ...

6

Page 7: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

Community - individuals, organizations, vendors

7

Page 9: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

Differences from Java EE● open source and open community

● code first approach

● release cadence

○ MP 1.0 - Sep 2016○ MP 1.1 - Aug 2017○ MP 1.2 - Sep 2017○ MP 1.3 - Jan 2018○ MP 1.4 / MP 2.0 - Jun 2018○ MP 2.1 - Oct 2018

9

Page 10: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

Differences from Java EE● 3 releases per year (Feb, Jun, Oct)

○ MP 2.2 - Feb 2019○ MP 3.0 - Jun 2019○ MP 3.1 - Oct 2019○ ...

10

Page 11: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

11

MicroProfile 3.2

Page 12: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

12microprofile.io

Page 13: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

What is MicroProfile Starter● MicroProfile Starter generates working sample code for MicroProfile specifications:

○ To lower the learning curve for using MicroProfile specifications○ To increase developer productivity○ To deliver solutions faster to the business

● A starter/generator had been discussed by the community many times before○ Earliest whisper by James Strachan back at Devoxx BE 2016

● An independent community member, Rudy De Busscher, on Aug 21, 2018, attended the bi-weekly MicroProfile community Hangout call and demoed a prototype that he had developed - (Rudy was hired by Payara subsequently)

● Starter team was assembled soon after. Starter Beta released on Feb 6, 2019.● Current team members are from many organizations and communities: Rudy, Karm, YK, Ryan,

etc.● If you’d like to participate and help us develop the Starter, please post your desire to help us at

[email protected] to get you looped in○ Need help developing extensions for IntelliJ IDEA, Eclipse IDE, Netbeans, Eclipse Che

13

Page 14: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

start.microprofile.io

14

● Examples generator for a variety of runtimes

● This is NOT just a pom.xml generator

● Sports REST API for easier integration

● Best for your first contact with MicroProfile, using your favourite runtime you are used to

Page 15: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

❤ How to contribute ❤

15

● Runtimes implementations○ Adding your MP implementation - ensure it passes the MP

TCKs for the umbrella release and is added to the MP implementations page

○ Improving current runtimes implementations. Are you a Launcher or KumuluzEE fan? Helidon expert? Take a look...

● Contribute to develop more code examples for MP specs○ Follow these instructions○ Do a Pull Request on the Starter project○ Add your implementation or new code examples○ Test your additions to the MicroProfile starter project○ Community review, requires 2 acks○ Merge

Page 16: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

What is Quarkus?● A Kubernetes Native Java stack tailored for GraalVM & OpenJDK HotSpot,

crafted from the best of breed Java libraries and standards

● Great interoperability with containers, small memory footprint

● Toolchain for building Java applications with a lot of heavy lifting done at build time instead of runtime

16

Page 17: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

17

Eclipse Vert.x Hibernate RESTEasy Apache Camel Eclipse MicroProfile Netty

Kubernetes OpenShift Jaeger Prometheus Apache Kafka Infinispan

Best of breed frameworks and standards

For a complete list of supported extensions: https://github.com/quarkusio/quarkus/tree/master/extensions

Page 18: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

18

A cohesive platform for optimized developer joy:

● Based on standards, but not limited

● Unified configuration

● Zero config, live reload in the blink of an eye

● Streamlined code for the 80% common

usages, flexible for the 20%

● No hassle native executable generation

Developer joy

Page 19: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

19

RSS (Resident Set Size)

Quarkus + GraalVM13 MB

Quarkus + OpenJDK74 MB

Traditional Cloud-Native Stack140 MB

REST

Supersonic Subatomic Java - Memory footprint

Page 20: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

20Boot + First Response Time (in seconds)

Quarkus + GraalVM 0.014 Seconds

REST

REST + CRUD

Quarkus + OpenJDK 0.75 Seconds

Quarkus + GraalVM 0.055 Seconds

Quarkus + OpenJDK 2.5 Seconds

Traditional Cloud-Native Stack 9.5 Seconds

Traditional Cloud-Native Stack 4.3 Seconds

Time to first response

Supersonic Subatomic Java: Startup time

Page 21: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

21

Supersonic Subatomic JavaJVM mode and Native executable trade-offs

Startup Time...puts Java in FaaS field alongside Go and JS...

Throughput

Packaging Size

Memory Footprint

saves $ with cloud providers...

Page 22: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

22

Build / Dev / Native modes● You can use Quarkus to build a small uberjar

○ https://quarkus.io/guides/maven-tooling.html#uber-jar-maven○ Use HotSpot or GraalVM to to run it

● You can work in Dev mode○ where Quarkus monitors your changed files, quickly recompiles○ enables hot deployment with background compilation○ https://quarkus.io/guides/maven-tooling.html#development-mode

● You can use Quarkus to easily create a single statically linked executable○ Leverages SubstrateVM and Native image from GraalVM toolchain○ Single executable for particular architecture○ https://quarkus.io/guides/building-native-image-guide

Page 23: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

And now, on to the demos!

23

1. Starter web page, examples

https://starter.karms.biz/ 2. Downloading Quarkus3. Your generated examples4. Other runtimes, Payara, Helidon…5. REST API

Page 25: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

To get the instructions for the demos you have seen today, go to:

bit.ly/MPOpenAlt

Page 27: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

Known implementations

27

In Progress to pass TCK:

Page 28: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

Eclipse MicroProfile 3.1 Oct 2019 <dependency> <groupId>org.eclipse.microprofile</groupId> <artifactId>microprofile</artifactId> <version>${microProfile.version}</version> <type>pom</type> </dependency>

28

…or select specs as needed…

Page 29: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

What?! This is the takeaway:

29

● Eclipse MicroProfile, Optimizing Enterprise Java for a Microservices Architecture

https://microprofile.io/ ● Starter to generate your examples projects for selected APIs

https://start.microprofile.io/ https://starter.karms.biz/ (with Quarkus)

● Quarkus runtime for your next Java application

https://quarkus.io/

Page 30: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

Questions?

30

Page 31: JBoss Enterprise Application Platform - application server ... · MP 3.0 - Jun 2019 MP 3.1 - Oct 2019 ... 10. 11 MicroProfile 3.2. microprofile.io 12. ... Toolchain for building

CONFIDENTIAL Designator

Thank you

31