SlideShare a Scribd company logo
1 of 60
Download to read offline
@radcortez | #TomEE
Lightweight Enterprise Java
with
MicroProfile
Roberto Cortez
@radcortez
@radcortez | #TomEE
Who am I?
Passionate Developer, Blogger, Youtuber, Speaker, JUG Leader, Java
Champion
twi@er:
@radcortez
blog:
h@p://www.radcortez.com
youtube:
h@p://youtube.com/radcortez
mail:
radcortez@yahoo.com
@radcortez | #TomEE
Questions?
Ask as soon as you have them!
@radcortez | #TomEE
Agenda
• Microservices!
• What is MicroProfile?
• Specs Overview
• Demos
• MicroProfile Future
Microservices Anyone?
@radcortez | #TomEE
Microservices
• Have you heard about Microservices?
• How big is a micro?
• Who develops Microservices?
• Who deploys Microservices?
• Who likes Microservices?
@radcortez | #TomEE
What do others think?
@radcortez | #TomEE
What do others think?
@radcortez | #TomEE
What do others think?
@radcortez | #TomEE
What do others think?
@radcortez | #TomEE
What do others think?
@radcortez | #TomEE
What do others think?
@radcortez | #TomEE
Why Microservices?
• Deliver new features quicker
• Smaller, agile teams
• Scale services independently
• Cloud
@radcortez | #TomEE
What is MicroProfile?
• http://microprofile.io/
• Enterprise Java for Microservices
• Open Source (Eclipse)
@radcortez | #TomEE
What is MicroProfile?
• Initial version 1.0 with CDI, JAX-RS, JSON-P
• Application portability across runtimes
@radcortez | #TomEE
What is MicroProfile?
• Currently at version 1.3
• Configuration, Fault Tolerance, JWT Propagation,
Health Check, Metrics, Open Tracing, Open API and
REST Client
• A version 2.0 is planned
@radcortez | #TomEE
Who is involved in MicroProfile?
@radcortez | #TomEE
Why MicroProfile?
@radcortez | #TomEE
0
10
20
30
40
EE 5 Specs (2006) EE 6 Specs (2009) EE 7 Specs (2013) EE 8 Specs (2017)
39
37
30
24
Why MicroProfile?
• A set of “standards” were required to offer guidance in
building MicroServices in Java
• These need to evolve very quickly to adjust to the fast
moving MicroServices world
@radcortez | #TomEE
MicroProfile Implementations
• Apache TomEE
• WebSphere Liberty
• WildFly Swarm
• Payara Micro
• KumuluzEE
@radcortez | #TomEE
What is TomEE?
• Tomcat + Java EE = TomEE
• Built within the OpenEJB community to offer a lightweight
alternative with Tomcat being the top dog.
• TomEE 7 is a MicroProfile implementation, including JAX-RS, CDI,
JSON-P and other specifications from Java EE.
• Currently working on MicroProfile 1.3.
@radcortez | #TomEE
My first MicroProfile App
@radcortez | #TomEE
CDI
• Contexts and Dependency Injection
• Bean Lifecycle and Typesafe Injection
• Producers
• Interceptors
• Observers
@radcortez | #TomEE
JAX-RS
• RESTful Web Services
• Annotation based
• HTTP Centric
@radcortez | #TomEE
JSON-P
• Parse, Generate Transform and Query JSON
• Streaming API
• Object Model API
@radcortez | #TomEE
Putting it all together
@ApplicationScoped

@Path("books")

public class BookResource {

@Inject

private BookBean bookBean;



@GET

@Path("{id}")

public Response find(@PathParam("id") final Long id) {

final Book book = bookBean.find(id);

final JsonObjectBuilder builder = Json.createObjectBuilder();

builder.add("id", book.getId())

.add("name", book.getTitle());

return Response.ok(builder.build().toString()).build();

}

}
@radcortez | #TomEE
Show me the code!
@radcortez | #TomEE
https://github.com/radcortez/microprofile-samples
Deploy
• Raspberry PI running Hypriot OS.
• Package everything with Docker
• Local Docker Registry
• Push Docker Images with Ansible
@radcortez | #TomEE
Raspberry PI
• Raspberry V3
• HypriotOS is a minimal Debian dist
• Optimized to run Docker on a Raspberry PI
@radcortez | #TomEE
Docker
• Use Maven Fabric8 Plugin
• Docker Hub too slow
• Use a Local Docker Registry
• Speed up Deployment
@radcortez | #TomEE
Ansible
• Automate Tasks
• Ping PIs
• Deploy Docker Images, Start, Stop
• Ansible Playbooks
• List of tasks to perform
@radcortez | #TomEE
Evolving your MicroProfile App
@radcortez | #TomEE
Configuration
• Applications need configuration based on their running
environment
• It must be possible to change configuration without
repacking the application
• Based on DeltaSpike Config, Apache Tamaya and Sabot
@radcortez | #TomEE
Configuration
• META-INF/microprofile-config.properties
• Environment properties
• System properties
• Pluggable to allow custom config sources and providers
through the ServiceLoader mechanism
@radcortez | #TomEE
public class MoviesRest {
@Inject
@ConfigProperty(name="connection.url")
private String setting;
@Inject
@ConfigProperty(name="connection.port")
private Optional<Integer> port;
public void execute() {
Config config = ConfigProvider.getConfig();
String url = config.getValue("connection.url", String.class);
}
}
@radcortez | #TomEE
Metrics
• Monitor essential System Parameters
• Ensure reliable operation of software
• Monitoring endpoints to collect data
@radcortez | #TomEE
Metrics
• Accessible via REST interface
• /metrics/base for MP compliant servers
• /metrics/application for Application specific Metrics
• /metrics/vendor for Server specific metrics
• OPTIONS provides metadata, such as Unit of measure
@radcortez | #TomEE
{
"thread.count" : 33,
"thread.max.count" : 47,
"memory.maxHeap" : 3817863211,
"memory.usedHeap" : 16859081,
"memory.committedHeap" : 64703546
}
GET /metrics/base
@radcortez | #TomEE
{
"fooVal": {
"unit": "milliseconds",
"type": "gauge",
"description": "The average duration of foo
requests during last 5 minutes",
"displayName": "Duration of foo",
"tags": "app=webshop"
},
"barVal": {
"unit": "megabytes",
"type": "gauge",
"tags": "component=backend,app=webshop"
}
}
OPTIONS /metrics/base
@radcortez | #TomEE
Healthchecks
• Probe the state of a computer node
• Primary target cloud infrastructure
• Automated processes to maintain the state of nodes
@radcortez | #TomEE
Healthchecks
• Simple API to specify health status
• /health JAX-RS endpoint reporting server health
• Response status indicates if the health check passed
• Payload can include more detail
@radcortez | #TomEE
Healthchecks
@Health
@ApplicationScoped
public class CheckDiskSpace implements HealthCheck {
public HealthCheckResponse call() {
}
}
@radcortez | #TomEE
@radcortez | #TomEE
{
"outcome": "UP",
"checks": [{
"name": "diskspace",
"state": "UP",
"data": {
"key": "freebytes",
"freebytes": "126000000000"
}
}]
}
GET /health
Fault Tolerance
• Different strategies to guide the execution and result
of some logic
• TimeOut, RetryPolicy, Fallback, Bulkhead and Circuit
Breaker
• Inspired by Hystrix and Failsafe
@radcortez | #TomEE
@CircuitBreaker
@Fallback(NumberFallbackHandler.class)
public String getNumber() {
final Response response = numberApi.request().get();
if (OK.getStatusCode() == response.getStatus()) {
return response.readEntity(String.class);
}
throw new WebApplicationException(INTERNAL_SERVER_ERROR);
}
public class NumberFallbackHandler implements FallbackHandler<String> {
@Override
public String handle(final ExecutionContext context) {
return "FALLBACK_NUMBER";
}
}
@radcortez | #TomEE
JWT Propagation
• Security Tokens
• Most common: OAuth2, OpenID Connect JWT
• Lightweight way to propagate identities across
different services
@radcortez | #TomEE
OpenTracing
• Trace the flow of a request across services
• OpenTracing is a distributed tracing standard for
applications
• Java Binding to OpenTracing Implementation
@radcortez | #TomEE
@Trace
@GET
@Path(“/findByStatus")
public Response findPetsByStatus() { }
@Inject
private Tracer tracer;
tracer.activeSpan().setTag(…);
tracer.activeSpan().log(...);
tracer.activeSpan().setBaggage(...);
@radcortez | #TomEE
Open API
• Java API for the OpenAPI v3 specification
• OpenAPI v3 is based on Swagger v2
• Annotations should be similar
@radcortez | #TomEE
@GET
@Path(“/findByStatus")
@Operation(
summary = "Finds Pets by status",
description = "Multiple status values can be
provided with comma separated strings")
public Response findPetsByStatus() { }
GET /openapi
/pet/findByStatus:
get:
summary: Finds Pets by status
description: Multiple status values can be provided with comma separated
strings
operationId: findPetsByStatus
@radcortez | #TomEE
REST Client
• Microservices typically talk REST to other services
• Several JAX-RS implementations already support
interface definition
• Consistent and easy to reuse
@radcortez | #TomEE
REST Client
• Type safe REST Service over HTTP
• Extends JAX-RS 2.0 API’s
• More natural code style
• Similar to Feign
@radcortez | #TomEE
@RegisterRestClient
public interface MyServiceClient {
@GET
@Path("/greet")
Response greet();
}
@ApplicationScoped
public class MyService {
@Inject
@RestClient
private MyServiceClient client;
}
@radcortez | #TomEE
Future
@radcortez | #TomEE
MicroProfile Roadmap
• MicroProfile 1.4
• Improve Developer Documentation
• Incremental specification updates
@radcortez | #TomEE
MicroProfile Roadmap
• MicroProfile 1.4
• Improve Developer Documentation
• Incremental specification updates
@radcortez | #TomEE
MicroProfile Roadmap
• MicroProfile 2.0
• Update to latest shared Java EE (EE4J) specifications
• CDI 2.0, JAX-RS 2.1, JSON-P 1.1
• Add JSON-B 1.0
@radcortez | #TomEE
Get Involved
• https://groups.google.com/forum/#!forum/
microprofile
@radcortez | #TomEE
Resources
• http://microprofile.io/
• http://tomee.apache.org
• https://github.com/radcortez/microprofile-samples
@radcortez | #TomEE
Thank you for attending!
@radcortez | #TomEE
https://tribestream.io/join-beta-devnexus/
QA

More Related Content

What's hot

Jenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesJenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesBrent Laster
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)Alexandre Gouaillard
 
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)Balazs Bucsay
 
Trick or XFLTReaT a.k.a. Tunnel All The Things
Trick or XFLTReaT a.k.a. Tunnel All The ThingsTrick or XFLTReaT a.k.a. Tunnel All The Things
Trick or XFLTReaT a.k.a. Tunnel All The ThingsBalazs Bucsay
 
Oliot epcis at a glance
Oliot epcis at a glanceOliot epcis at a glance
Oliot epcis at a glanceJaewook Byun
 
Monitoring at Cloud Scale
Monitoring at Cloud ScaleMonitoring at Cloud Scale
Monitoring at Cloud ScaleJulien Pivotto
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)p3castro
 
Your first patch to open stack
Your first patch to open stackYour first patch to open stack
Your first patch to open stackAkanksha Agrawal
 
TDC2018SP | Trilha Java - Computacao [Concorrente | Paralela | Distribuida] e...
TDC2018SP | Trilha Java - Computacao [Concorrente | Paralela | Distribuida] e...TDC2018SP | Trilha Java - Computacao [Concorrente | Paralela | Distribuida] e...
TDC2018SP | Trilha Java - Computacao [Concorrente | Paralela | Distribuida] e...tdc-globalcode
 
From ZERO to REST in an hour
From ZERO to REST in an hour From ZERO to REST in an hour
From ZERO to REST in an hour Cisco DevNet
 
Reactive Programming in Java and Spring Framework 5
Reactive Programming in Java and Spring Framework 5Reactive Programming in Java and Spring Framework 5
Reactive Programming in Java and Spring Framework 5Richard Langlois P. Eng.
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egitmatz_twt
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)Steve Upton
 
Approaches to Building Media Streaming Applications
Approaches to Building Media Streaming ApplicationsApproaches to Building Media Streaming Applications
Approaches to Building Media Streaming ApplicationsGlobalLogic Ukraine
 
Postgresql 9.0 HA at RMLL 2012
Postgresql 9.0 HA at RMLL 2012Postgresql 9.0 HA at RMLL 2012
Postgresql 9.0 HA at RMLL 2012Julien Pivotto
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microserviceGiulio De Donato
 
WebRTC Browsers n Stacks Implementation differences
WebRTC Browsers n Stacks Implementation differencesWebRTC Browsers n Stacks Implementation differences
WebRTC Browsers n Stacks Implementation differencesAlexandre Gouaillard
 

What's hot (20)

Jenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery PipelinesJenkins2 - Coding Continuous Delivery Pipelines
Jenkins2 - Coding Continuous Delivery Pipelines
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
 
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
 
Trick or XFLTReaT a.k.a. Tunnel All The Things
Trick or XFLTReaT a.k.a. Tunnel All The ThingsTrick or XFLTReaT a.k.a. Tunnel All The Things
Trick or XFLTReaT a.k.a. Tunnel All The Things
 
Oliot epcis at a glance
Oliot epcis at a glanceOliot epcis at a glance
Oliot epcis at a glance
 
Monitoring at Cloud Scale
Monitoring at Cloud ScaleMonitoring at Cloud Scale
Monitoring at Cloud Scale
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
Your first patch to open stack
Your first patch to open stackYour first patch to open stack
Your first patch to open stack
 
TDC2018SP | Trilha Java - Computacao [Concorrente | Paralela | Distribuida] e...
TDC2018SP | Trilha Java - Computacao [Concorrente | Paralela | Distribuida] e...TDC2018SP | Trilha Java - Computacao [Concorrente | Paralela | Distribuida] e...
TDC2018SP | Trilha Java - Computacao [Concorrente | Paralela | Distribuida] e...
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
From ZERO to REST in an hour
From ZERO to REST in an hour From ZERO to REST in an hour
From ZERO to REST in an hour
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
 
Reactive Programming in Java and Spring Framework 5
Reactive Programming in Java and Spring Framework 5Reactive Programming in Java and Spring Framework 5
Reactive Programming in Java and Spring Framework 5
 
Introduction to github using Egit
Introduction to github using EgitIntroduction to github using Egit
Introduction to github using Egit
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)
 
Approaches to Building Media Streaming Applications
Approaches to Building Media Streaming ApplicationsApproaches to Building Media Streaming Applications
Approaches to Building Media Streaming Applications
 
Git training v10
Git training v10Git training v10
Git training v10
 
Postgresql 9.0 HA at RMLL 2012
Postgresql 9.0 HA at RMLL 2012Postgresql 9.0 HA at RMLL 2012
Postgresql 9.0 HA at RMLL 2012
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microservice
 
WebRTC Browsers n Stacks Implementation differences
WebRTC Browsers n Stacks Implementation differencesWebRTC Browsers n Stacks Implementation differences
WebRTC Browsers n Stacks Implementation differences
 

Similar to Lightweight Enterprise Java With Microprofile

GraalVM and MicroProfile - A Polyglot Microservices Solution
GraalVM and MicroProfile - A Polyglot Microservices SolutionGraalVM and MicroProfile - A Polyglot Microservices Solution
GraalVM and MicroProfile - A Polyglot Microservices SolutionRoberto Cortez
 
2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...
2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...
2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...César Hernández
 
MicroProfile: A Quest for a Lightweight and Modern Enterprise Java Platform
MicroProfile: A Quest for a Lightweight and Modern Enterprise Java PlatformMicroProfile: A Quest for a Lightweight and Modern Enterprise Java Platform
MicroProfile: A Quest for a Lightweight and Modern Enterprise Java PlatformMike Croft
 
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayPaving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayCésar Hernández
 
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0César Hernández
 
Pavimentando el camino con Jakarta EE 9 y Apache TomEE
Pavimentando el camino con Jakarta EE 9 y Apache TomEE Pavimentando el camino con Jakarta EE 9 y Apache TomEE
Pavimentando el camino con Jakarta EE 9 y Apache TomEE César Hernández
 
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...NETWAYS
 
Collector Web Services
Collector Web ServicesCollector Web Services
Collector Web Servicespublisyst
 
Monitoring in a fast-changing world with Prometheus
Monitoring in a fast-changing world with PrometheusMonitoring in a fast-changing world with Prometheus
Monitoring in a fast-changing world with PrometheusJulien Pivotto
 
How to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScalePhil Leggetter
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentalsAgileDenver
 
Building Awesome APIs with Lumen
Building Awesome APIs with LumenBuilding Awesome APIs with Lumen
Building Awesome APIs with LumenKit Brennan
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017JoEllen Carter
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web FrameworkDaniel Woods
 
Observability beyond logging for Java Microservices
Observability beyond logging for Java MicroservicesObservability beyond logging for Java Microservices
Observability beyond logging for Java MicroservicesLuke Marsden
 
Kubernetes and AWS Lambda can play nicely together
Kubernetes and AWS Lambda can play nicely togetherKubernetes and AWS Lambda can play nicely together
Kubernetes and AWS Lambda can play nicely togetherEdward Wilde
 

Similar to Lightweight Enterprise Java With Microprofile (20)

GraalVM and MicroProfile - A Polyglot Microservices Solution
GraalVM and MicroProfile - A Polyglot Microservices SolutionGraalVM and MicroProfile - A Polyglot Microservices Solution
GraalVM and MicroProfile - A Polyglot Microservices Solution
 
2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...
2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...
2018 (codeone) Graal VM and MicroProfile a polyglot microservices solution [d...
 
MicroProfile: A Quest for a Lightweight and Modern Enterprise Java Platform
MicroProfile: A Quest for a Lightweight and Modern Enterprise Java PlatformMicroProfile: A Quest for a Lightweight and Modern Enterprise Java Platform
MicroProfile: A Quest for a Lightweight and Modern Enterprise Java Platform
 
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayPaving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
 
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
Pavimentando el Camino con Jakarta EE 9 y Apache TomEE 9.0.0
 
Pavimentando el camino con Jakarta EE 9 y Apache TomEE
Pavimentando el camino con Jakarta EE 9 y Apache TomEE Pavimentando el camino con Jakarta EE 9 y Apache TomEE
Pavimentando el camino con Jakarta EE 9 y Apache TomEE
 
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
OSDC 2015: Tudor Golubenco | Application Performance Management with Packetbe...
 
Collector Web Services
Collector Web ServicesCollector Web Services
Collector Web Services
 
Stackato v2
Stackato v2Stackato v2
Stackato v2
 
Monitoring in a fast-changing world with Prometheus
Monitoring in a fast-changing world with PrometheusMonitoring in a fast-changing world with Prometheus
Monitoring in a fast-changing world with Prometheus
 
CATzure Azure Functions
CATzure Azure FunctionsCATzure Azure Functions
CATzure Azure Functions
 
How to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that ScaleHow to Build Single Page HTML5 Apps that Scale
How to Build Single Page HTML5 Apps that Scale
 
Api fundamentals
Api fundamentalsApi fundamentals
Api fundamentals
 
Building Awesome APIs with Lumen
Building Awesome APIs with LumenBuilding Awesome APIs with Lumen
Building Awesome APIs with Lumen
 
Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017Api FUNdamentals #MHA2017
Api FUNdamentals #MHA2017
 
Stackato v3
Stackato v3Stackato v3
Stackato v3
 
Stackato v4
Stackato v4Stackato v4
Stackato v4
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Observability beyond logging for Java Microservices
Observability beyond logging for Java MicroservicesObservability beyond logging for Java Microservices
Observability beyond logging for Java Microservices
 
Kubernetes and AWS Lambda can play nicely together
Kubernetes and AWS Lambda can play nicely togetherKubernetes and AWS Lambda can play nicely together
Kubernetes and AWS Lambda can play nicely together
 

More from Roberto Cortez

Chasing the RESTful Trinity - Client CLI and Documentation
Chasing the RESTful Trinity - Client CLI and DocumentationChasing the RESTful Trinity - Client CLI and Documentation
Chasing the RESTful Trinity - Client CLI and DocumentationRoberto Cortez
 
Baking a Microservice PI(e)
Baking a Microservice PI(e)Baking a Microservice PI(e)
Baking a Microservice PI(e)Roberto Cortez
 
Deconstructing and Evolving REST Security
Deconstructing and Evolving REST SecurityDeconstructing and Evolving REST Security
Deconstructing and Evolving REST SecurityRoberto Cortez
 
Java EE 7 meets Java 8
Java EE 7 meets Java 8Java EE 7 meets Java 8
Java EE 7 meets Java 8Roberto Cortez
 
Maven - Taming the Beast
Maven - Taming the BeastMaven - Taming the Beast
Maven - Taming the BeastRoberto Cortez
 
The First Contact with Java EE 7
The First Contact with Java EE 7The First Contact with Java EE 7
The First Contact with Java EE 7Roberto Cortez
 
Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7Roberto Cortez
 
Development Horror Stories
Development Horror StoriesDevelopment Horror Stories
Development Horror StoriesRoberto Cortez
 
The 5 People in your Organization that grow Legacy Code
The 5 People in your Organization that grow Legacy CodeThe 5 People in your Organization that grow Legacy Code
The 5 People in your Organization that grow Legacy CodeRoberto Cortez
 
Java EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real WorldJava EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real WorldRoberto Cortez
 
Geecon 2014 - Five Ways to Not Suck at Being a Java Freelancer
Geecon 2014 - Five Ways to Not Suck at Being a Java FreelancerGeecon 2014 - Five Ways to Not Suck at Being a Java Freelancer
Geecon 2014 - Five Ways to Not Suck at Being a Java FreelancerRoberto Cortez
 
Coimbra JUG - 2º Encontro - O primeiro contacto com Java EE 7
Coimbra JUG - 2º Encontro - O primeiro contacto com Java EE 7Coimbra JUG - 2º Encontro - O primeiro contacto com Java EE 7
Coimbra JUG - 2º Encontro - O primeiro contacto com Java EE 7Roberto Cortez
 
Coimbra JUG - 1º Encontro - As novidades do Java 8
Coimbra JUG - 1º Encontro - As novidades do Java 8Coimbra JUG - 1º Encontro - As novidades do Java 8
Coimbra JUG - 1º Encontro - As novidades do Java 8Roberto Cortez
 

More from Roberto Cortez (13)

Chasing the RESTful Trinity - Client CLI and Documentation
Chasing the RESTful Trinity - Client CLI and DocumentationChasing the RESTful Trinity - Client CLI and Documentation
Chasing the RESTful Trinity - Client CLI and Documentation
 
Baking a Microservice PI(e)
Baking a Microservice PI(e)Baking a Microservice PI(e)
Baking a Microservice PI(e)
 
Deconstructing and Evolving REST Security
Deconstructing and Evolving REST SecurityDeconstructing and Evolving REST Security
Deconstructing and Evolving REST Security
 
Java EE 7 meets Java 8
Java EE 7 meets Java 8Java EE 7 meets Java 8
Java EE 7 meets Java 8
 
Maven - Taming the Beast
Maven - Taming the BeastMaven - Taming the Beast
Maven - Taming the Beast
 
The First Contact with Java EE 7
The First Contact with Java EE 7The First Contact with Java EE 7
The First Contact with Java EE 7
 
Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7
 
Development Horror Stories
Development Horror StoriesDevelopment Horror Stories
Development Horror Stories
 
The 5 People in your Organization that grow Legacy Code
The 5 People in your Organization that grow Legacy CodeThe 5 People in your Organization that grow Legacy Code
The 5 People in your Organization that grow Legacy Code
 
Java EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real WorldJava EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real World
 
Geecon 2014 - Five Ways to Not Suck at Being a Java Freelancer
Geecon 2014 - Five Ways to Not Suck at Being a Java FreelancerGeecon 2014 - Five Ways to Not Suck at Being a Java Freelancer
Geecon 2014 - Five Ways to Not Suck at Being a Java Freelancer
 
Coimbra JUG - 2º Encontro - O primeiro contacto com Java EE 7
Coimbra JUG - 2º Encontro - O primeiro contacto com Java EE 7Coimbra JUG - 2º Encontro - O primeiro contacto com Java EE 7
Coimbra JUG - 2º Encontro - O primeiro contacto com Java EE 7
 
Coimbra JUG - 1º Encontro - As novidades do Java 8
Coimbra JUG - 1º Encontro - As novidades do Java 8Coimbra JUG - 1º Encontro - As novidades do Java 8
Coimbra JUG - 1º Encontro - As novidades do Java 8
 

Recently uploaded

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Lightweight Enterprise Java With Microprofile

  • 1. @radcortez | #TomEE Lightweight Enterprise Java with MicroProfile Roberto Cortez @radcortez
  • 2. @radcortez | #TomEE Who am I? Passionate Developer, Blogger, Youtuber, Speaker, JUG Leader, Java Champion twi@er: @radcortez blog: h@p://www.radcortez.com youtube: h@p://youtube.com/radcortez mail: radcortez@yahoo.com
  • 3. @radcortez | #TomEE Questions? Ask as soon as you have them!
  • 4. @radcortez | #TomEE Agenda • Microservices! • What is MicroProfile? • Specs Overview • Demos • MicroProfile Future
  • 6. Microservices • Have you heard about Microservices? • How big is a micro? • Who develops Microservices? • Who deploys Microservices? • Who likes Microservices? @radcortez | #TomEE
  • 7. What do others think? @radcortez | #TomEE
  • 8. What do others think? @radcortez | #TomEE
  • 9. What do others think? @radcortez | #TomEE
  • 10. What do others think? @radcortez | #TomEE
  • 11. What do others think? @radcortez | #TomEE
  • 12. What do others think? @radcortez | #TomEE
  • 13. Why Microservices? • Deliver new features quicker • Smaller, agile teams • Scale services independently • Cloud @radcortez | #TomEE
  • 14. What is MicroProfile? • http://microprofile.io/ • Enterprise Java for Microservices • Open Source (Eclipse) @radcortez | #TomEE
  • 15. What is MicroProfile? • Initial version 1.0 with CDI, JAX-RS, JSON-P • Application portability across runtimes @radcortez | #TomEE
  • 16. What is MicroProfile? • Currently at version 1.3 • Configuration, Fault Tolerance, JWT Propagation, Health Check, Metrics, Open Tracing, Open API and REST Client • A version 2.0 is planned @radcortez | #TomEE
  • 17. Who is involved in MicroProfile? @radcortez | #TomEE
  • 18. Why MicroProfile? @radcortez | #TomEE 0 10 20 30 40 EE 5 Specs (2006) EE 6 Specs (2009) EE 7 Specs (2013) EE 8 Specs (2017) 39 37 30 24
  • 19. Why MicroProfile? • A set of “standards” were required to offer guidance in building MicroServices in Java • These need to evolve very quickly to adjust to the fast moving MicroServices world @radcortez | #TomEE
  • 20. MicroProfile Implementations • Apache TomEE • WebSphere Liberty • WildFly Swarm • Payara Micro • KumuluzEE @radcortez | #TomEE
  • 21. What is TomEE? • Tomcat + Java EE = TomEE • Built within the OpenEJB community to offer a lightweight alternative with Tomcat being the top dog. • TomEE 7 is a MicroProfile implementation, including JAX-RS, CDI, JSON-P and other specifications from Java EE. • Currently working on MicroProfile 1.3. @radcortez | #TomEE
  • 22. My first MicroProfile App @radcortez | #TomEE
  • 23. CDI • Contexts and Dependency Injection • Bean Lifecycle and Typesafe Injection • Producers • Interceptors • Observers @radcortez | #TomEE
  • 24. JAX-RS • RESTful Web Services • Annotation based • HTTP Centric @radcortez | #TomEE
  • 25. JSON-P • Parse, Generate Transform and Query JSON • Streaming API • Object Model API @radcortez | #TomEE
  • 26. Putting it all together @ApplicationScoped
 @Path("books")
 public class BookResource {
 @Inject
 private BookBean bookBean;
 
 @GET
 @Path("{id}")
 public Response find(@PathParam("id") final Long id) {
 final Book book = bookBean.find(id);
 final JsonObjectBuilder builder = Json.createObjectBuilder();
 builder.add("id", book.getId())
 .add("name", book.getTitle());
 return Response.ok(builder.build().toString()).build();
 }
 } @radcortez | #TomEE
  • 27. Show me the code! @radcortez | #TomEE https://github.com/radcortez/microprofile-samples
  • 28. Deploy • Raspberry PI running Hypriot OS. • Package everything with Docker • Local Docker Registry • Push Docker Images with Ansible @radcortez | #TomEE
  • 29. Raspberry PI • Raspberry V3 • HypriotOS is a minimal Debian dist • Optimized to run Docker on a Raspberry PI @radcortez | #TomEE
  • 30. Docker • Use Maven Fabric8 Plugin • Docker Hub too slow • Use a Local Docker Registry • Speed up Deployment @radcortez | #TomEE
  • 31. Ansible • Automate Tasks • Ping PIs • Deploy Docker Images, Start, Stop • Ansible Playbooks • List of tasks to perform @radcortez | #TomEE
  • 32. Evolving your MicroProfile App @radcortez | #TomEE
  • 33. Configuration • Applications need configuration based on their running environment • It must be possible to change configuration without repacking the application • Based on DeltaSpike Config, Apache Tamaya and Sabot @radcortez | #TomEE
  • 34. Configuration • META-INF/microprofile-config.properties • Environment properties • System properties • Pluggable to allow custom config sources and providers through the ServiceLoader mechanism @radcortez | #TomEE
  • 35. public class MoviesRest { @Inject @ConfigProperty(name="connection.url") private String setting; @Inject @ConfigProperty(name="connection.port") private Optional<Integer> port; public void execute() { Config config = ConfigProvider.getConfig(); String url = config.getValue("connection.url", String.class); } } @radcortez | #TomEE
  • 36. Metrics • Monitor essential System Parameters • Ensure reliable operation of software • Monitoring endpoints to collect data @radcortez | #TomEE
  • 37. Metrics • Accessible via REST interface • /metrics/base for MP compliant servers • /metrics/application for Application specific Metrics • /metrics/vendor for Server specific metrics • OPTIONS provides metadata, such as Unit of measure @radcortez | #TomEE
  • 38. { "thread.count" : 33, "thread.max.count" : 47, "memory.maxHeap" : 3817863211, "memory.usedHeap" : 16859081, "memory.committedHeap" : 64703546 } GET /metrics/base @radcortez | #TomEE
  • 39. { "fooVal": { "unit": "milliseconds", "type": "gauge", "description": "The average duration of foo requests during last 5 minutes", "displayName": "Duration of foo", "tags": "app=webshop" }, "barVal": { "unit": "megabytes", "type": "gauge", "tags": "component=backend,app=webshop" } } OPTIONS /metrics/base @radcortez | #TomEE
  • 40. Healthchecks • Probe the state of a computer node • Primary target cloud infrastructure • Automated processes to maintain the state of nodes @radcortez | #TomEE
  • 41. Healthchecks • Simple API to specify health status • /health JAX-RS endpoint reporting server health • Response status indicates if the health check passed • Payload can include more detail @radcortez | #TomEE
  • 42. Healthchecks @Health @ApplicationScoped public class CheckDiskSpace implements HealthCheck { public HealthCheckResponse call() { } } @radcortez | #TomEE
  • 43. @radcortez | #TomEE { "outcome": "UP", "checks": [{ "name": "diskspace", "state": "UP", "data": { "key": "freebytes", "freebytes": "126000000000" } }] } GET /health
  • 44. Fault Tolerance • Different strategies to guide the execution and result of some logic • TimeOut, RetryPolicy, Fallback, Bulkhead and Circuit Breaker • Inspired by Hystrix and Failsafe @radcortez | #TomEE
  • 45. @CircuitBreaker @Fallback(NumberFallbackHandler.class) public String getNumber() { final Response response = numberApi.request().get(); if (OK.getStatusCode() == response.getStatus()) { return response.readEntity(String.class); } throw new WebApplicationException(INTERNAL_SERVER_ERROR); } public class NumberFallbackHandler implements FallbackHandler<String> { @Override public String handle(final ExecutionContext context) { return "FALLBACK_NUMBER"; } } @radcortez | #TomEE
  • 46. JWT Propagation • Security Tokens • Most common: OAuth2, OpenID Connect JWT • Lightweight way to propagate identities across different services @radcortez | #TomEE
  • 47. OpenTracing • Trace the flow of a request across services • OpenTracing is a distributed tracing standard for applications • Java Binding to OpenTracing Implementation @radcortez | #TomEE
  • 48. @Trace @GET @Path(“/findByStatus") public Response findPetsByStatus() { } @Inject private Tracer tracer; tracer.activeSpan().setTag(…); tracer.activeSpan().log(...); tracer.activeSpan().setBaggage(...); @radcortez | #TomEE
  • 49. Open API • Java API for the OpenAPI v3 specification • OpenAPI v3 is based on Swagger v2 • Annotations should be similar @radcortez | #TomEE
  • 50. @GET @Path(“/findByStatus") @Operation( summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings") public Response findPetsByStatus() { } GET /openapi /pet/findByStatus: get: summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus @radcortez | #TomEE
  • 51. REST Client • Microservices typically talk REST to other services • Several JAX-RS implementations already support interface definition • Consistent and easy to reuse @radcortez | #TomEE
  • 52. REST Client • Type safe REST Service over HTTP • Extends JAX-RS 2.0 API’s • More natural code style • Similar to Feign @radcortez | #TomEE
  • 53. @RegisterRestClient public interface MyServiceClient { @GET @Path("/greet") Response greet(); } @ApplicationScoped public class MyService { @Inject @RestClient private MyServiceClient client; } @radcortez | #TomEE
  • 55. MicroProfile Roadmap • MicroProfile 1.4 • Improve Developer Documentation • Incremental specification updates @radcortez | #TomEE
  • 56. MicroProfile Roadmap • MicroProfile 1.4 • Improve Developer Documentation • Incremental specification updates @radcortez | #TomEE
  • 57. MicroProfile Roadmap • MicroProfile 2.0 • Update to latest shared Java EE (EE4J) specifications • CDI 2.0, JAX-RS 2.1, JSON-P 1.1 • Add JSON-B 1.0 @radcortez | #TomEE
  • 59. Resources • http://microprofile.io/ • http://tomee.apache.org • https://github.com/radcortez/microprofile-samples @radcortez | #TomEE
  • 60. Thank you for attending! @radcortez | #TomEE https://tribestream.io/join-beta-devnexus/ QA