SlideShare ist ein Scribd-Unternehmen logo
1 von 27
#DevoxxUS
Optimizing Enterprise Java
for a Microservices Architecture
John Clingan, middle-aged Java EE guy and MicroProfile-r
Emily Jiang, totally awesome MicroProfile engineer
Eclipse
#DevoxxUS
Agenda
MicroProfile Overview (~10 Minutes)
Example Specs - From concept to implementation (10 minutes)
Collaborate (Until they kick us out or we want to go for a beer)
#DevoxxUS
Enterprise Java Standards History
#DevoxxUS
What is MicroProfile?
A community of individuals, organizations, and vendors …
… collaborating within an open source (Eclipse) project ….
… to bring microservices to the Enterprise Java
community
#DevoxxUS
Innovation vs Standardization
(Open Source) Project Focused Standard (JSR) focused
(Java EE)(MicroProfile)
#DevoxxUS
Innovation vs Standardization
(Open Source) Project Focused Standard (JSR) focused
(Java EE)
Large multi-feature releasesIncremental feature release
(MicroProfile)
#DevoxxUS
Innovation vs Standardization
Spec Lead controls pace
(Open Source) Project Focused Standard (JSR) focused
(Java EE)
Large multi-feature releasesIncremental feature release
(MicroProfile)
Community controls pace
#DevoxxUS
Accelerating* Adoption of MicroServices
2016 2017 2018 2019
8 9
1.0
1.1
1.2
1.3
1.4
2020
1.5
* 2-4 releases per year
#DevoxxUS
MicroProfile 1.0 (Sep, 2016)
Contexts and Dependency Injection (CDI 1.1)
+
Java API for RESTful Web Services (JAX-RS 2.0)
+
Java API for JSON Processing (JSON-P 1.0)
#DevoxxUS
MicroProfile 1.1 Underway
Security: JWT Token Exchange 1.0
Health Check 1.0
Configuration 1.0
Fault Tolerance 1.0 (Stretch goal)
Second Quarter
2017!
#DevoxxUS
Will MicroProfile Features be in Java EE?
Possibly
#DevoxxUS
MicroProfile Java Programming Model
(In Progress)
● Config
● Fault Tolerance
● Health Checker
● Metrics
● Security
#DevoxxUS
Configuration
● Discussed with a formal proposal in the MicroProfile mailing list
(https://groups.google.com/forum/#!topic/microprofile/VJEEAOsVj
5E[26-50])
● After the proposal was accepted, a repository was created to
draft APIs/SPIs (https://github.com/eclipse/microprofile-config/)
#DevoxxUS
MicroProfile Java Prog. Model - Configuration
#DevoxxUS
MicroProfile Java Prog. Model - Configuration
Using CDI Injection
@Inject Config config; Inject all config properties that the class
can see
@Inject
@ConfigProperty(name=“myProp”
defaultValue=“blah”)
String prop1;
Inject the value of the property called
“myProp”. The value of prop1 will not be
refreshed. Suitable for static properties
and used on the RequestScoped beans.
@Inject
@ConfigProperty(name=“myProp”
defaultValue=“blah”)
Provider<String> prop1
Inject the value of the property called
“myProp” and it picks up the dynamic
changes.
#DevoxxUS
MicroProfile Java Prog. Model - Configuration
Programmatic lookup
ConfigProvider.getConfig(); The config object containing all
properties that the class owner can
see.
ConfigProvider.getBuilder()
.addDefaultSources()
.withSources(…).build();
Create a custom config object
#DevoxxUS
MicroProfile Java Prog. Model - Configuration
● The property file, microprofile-config.properties, packaged in the application can be
overwritten by :
○ System variables (400 as the default priority)
○ Environment variables (300 as the default priority) or
○ a custom property files with a higher priority than microprofile-config.properties
(100 as the default priority).
#DevoxxUS
MicroProfile Java Prog. Model - config
● Plan to finalise the current APIs/SPIs and release the Config 1.0
by mid April
● Then work on the new features of Config 1.1
● Join in the Config discussion
● Join in the Config hangout – on Thursdays
#DevoxxUS
MicroProfile Java Prog model –
Fault Tolerance
● Proposal discussion:
https://groups.google.com/forum/#!topic/microprofile/ESs9L3z08o
A
● Prototype (inspired by Failsafe): https://github.com/Emily-
Jiang/microprofile-faultTolerance-incubation
#DevoxxUS
MicroProfile Java Prog model –
Fault Tolerance
Retry The request should have a retry to recover from temporary
glitches
Fallback The request should have a fallback operation if retry fails
Timeout The request must have a timeout, to prevent from waiting
indefinitely
Circuit Breaker The request must prevent from repeating timeouts
Bulkhead One part of application failure must not bring the whole
application down
#DevoxxUS
Fault Tolerance - Fallback Retry
Set up retry policy and wrap the call with the policy and specify
the fallback operation
FaultToleranceFactory.getFaultToleranceType(RetryPolicy.class);
Duration delay = Duration.ofSeconds(1);
retryPolicy =
retryPolicy.retryOn(Exception.class).withDelay(delay)
.withMaxRetries(3);
Runnable fallbackService = () -> serviceB();
executor.with(retryPolicy).withFallback(fallbackService)
.run(mainService);
#DevoxxUS
Fault Tolerance - Circuit Breaker Timeout
Fail-fast, temporarily disable the running of a service
circuitBreaker =
FaultToleranceFactory.getFaultToleranceType(CircuitBreaker.class);
circuitBreaker =
circuitBreaker.withTimeout(timeout).withFailureThreshold(3)
.withSuccessThreshold(2)
.withDelay(delay);
Callable<Object> mainService = () -> serviceA();
Executor executor =
FaultToleranceFactory.getFaultToleranceType(Executor.class);
executor.with(circuitBreaker).get(mainService);
#DevoxxUS
Fault Tolerance - Bulkhead
Limit the number of concurrent calls to a service
ThreadPoolExecutor tpexecutor = new ThreadPoolExecutor(
poolSize, poolSize, 0,
TimeUnit.SECONDS,
new ArrayBlockingQueue<Runnable>(10));
bulkhead = bulkhead.withThread(tpexecutor);
executor.with(bulkhead) .run(mainService);
#DevoxxUS
MicroProfile Java Prog model –
Fault Tolerance
● Non-CDI approach was left out of the first release but focus on CDI-first
approach
● Discussion the CDI-first approach ongoing
● Use Interceptor to apply policy and use annotation to config policy
#DevoxxUS
Health Check, Metrics, Security
● Health Check – proposal accepted
● Metrics and Security – proposal in discussion
#DevoxxUS
Join the Community!
#DevoxxUS
Resources
MicroProfile.io
MicroProfile Discussion Forum
bit.ly/MicroProfileForum
MicroProfile Examples
https://github.com/microprofile/microprofile-samples

Weitere ähnliche Inhalte

Was ist angesagt?

Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and SpringVMware Tanzu
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 
Introduction maven3 and gwt2.5 rc2 - Lesson 01
Introduction maven3 and gwt2.5 rc2 - Lesson 01Introduction maven3 and gwt2.5 rc2 - Lesson 01
Introduction maven3 and gwt2.5 rc2 - Lesson 01rhemsolutions
 
Devops interview questions 1 www.bigclasses.com
Devops interview questions  1  www.bigclasses.comDevops interview questions  1  www.bigclasses.com
Devops interview questions 1 www.bigclasses.combigclasses.com
 
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Peter Pilgrim
 
Apache DeltaSpike
Apache DeltaSpikeApache DeltaSpike
Apache DeltaSpikeos890
 
OpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheConOpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheConos890
 
Android MvRx Framework 介紹
Android MvRx Framework 介紹Android MvRx Framework 介紹
Android MvRx Framework 介紹Kros Huang
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemAndres Almiray
 
Automated Infrastructure Testing
Automated Infrastructure TestingAutomated Infrastructure Testing
Automated Infrastructure TestingRanjib Dey
 
Java EE Microservices
Java EE MicroservicesJava EE Microservices
Java EE Microservicesjclingan
 
Jenkins Scriptler in 90mins
Jenkins Scriptler in 90minsJenkins Scriptler in 90mins
Jenkins Scriptler in 90minsLarry Cai
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svnAnkur Goyal
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-DurandSOAT
 
RIBs - Fragments which work
RIBs - Fragments which workRIBs - Fragments which work
RIBs - Fragments which workDmitry Zaytsev
 
Developing modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsDeveloping modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsShekhar Gulati
 
Spring Testing, Fight for the Context
Spring Testing, Fight for the ContextSpring Testing, Fight for the Context
Spring Testing, Fight for the ContextGlobalLogic Ukraine
 

Was ist angesagt? (20)

Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and Spring
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Introduction maven3 and gwt2.5 rc2 - Lesson 01
Introduction maven3 and gwt2.5 rc2 - Lesson 01Introduction maven3 and gwt2.5 rc2 - Lesson 01
Introduction maven3 and gwt2.5 rc2 - Lesson 01
 
Devops interview questions 1 www.bigclasses.com
Devops interview questions  1  www.bigclasses.comDevops interview questions  1  www.bigclasses.com
Devops interview questions 1 www.bigclasses.com
 
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
 
Apache DeltaSpike
Apache DeltaSpikeApache DeltaSpike
Apache DeltaSpike
 
OpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheConOpenWebBeans and DeltaSpike at ApacheCon
OpenWebBeans and DeltaSpike at ApacheCon
 
Android MvRx Framework 介紹
Android MvRx Framework 介紹Android MvRx Framework 介紹
Android MvRx Framework 介紹
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
Automated Infrastructure Testing
Automated Infrastructure TestingAutomated Infrastructure Testing
Automated Infrastructure Testing
 
Java EE Microservices
Java EE MicroservicesJava EE Microservices
Java EE Microservices
 
DI with Dagger2
DI with Dagger2DI with Dagger2
DI with Dagger2
 
Jenkins Scriptler in 90mins
Jenkins Scriptler in 90minsJenkins Scriptler in 90mins
Jenkins Scriptler in 90mins
 
Ci jenkins maven svn
Ci jenkins maven svnCi jenkins maven svn
Ci jenkins maven svn
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand
 
What is new in JUnit5
What is new in JUnit5What is new in JUnit5
What is new in JUnit5
 
RIBs - Fragments which work
RIBs - Fragments which workRIBs - Fragments which work
RIBs - Fragments which work
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Developing modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular jsDeveloping modern java web applications with java ee 7 and angular js
Developing modern java web applications with java ee 7 and angular js
 
Spring Testing, Fight for the Context
Spring Testing, Fight for the ContextSpring Testing, Fight for the Context
Spring Testing, Fight for the Context
 

Ähnlich wie Eclipse MicroProfile: Accelerating the adoption of Java Microservices

MicroProfile Devoxx.us
MicroProfile Devoxx.usMicroProfile Devoxx.us
MicroProfile Devoxx.usjclingan
 
Level Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersLevel Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersVMware Tanzu
 
Mutation Testing DevoxxUK 2021
Mutation Testing DevoxxUK 2021Mutation Testing DevoxxUK 2021
Mutation Testing DevoxxUK 2021Paco van Beckhoven
 
Improve unit tests with Mutants!
Improve unit tests with Mutants!Improve unit tests with Mutants!
Improve unit tests with Mutants!Paco van Beckhoven
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedToru Wonyoung Choi
 
Context and Dependency Injection 2.0
Context and Dependency Injection 2.0Context and Dependency Injection 2.0
Context and Dependency Injection 2.0Brian S. Paskin
 
Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...
Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...
Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...Sigma Software
 
Mutation testing Bucharest Tech Week
Mutation testing Bucharest Tech WeekMutation testing Bucharest Tech Week
Mutation testing Bucharest Tech WeekPaco van Beckhoven
 
Javazone 2019 - Mutants to the rescue: How effective are your unit tests?
Javazone 2019 - Mutants to the rescue: How effective are your unit tests?Javazone 2019 - Mutants to the rescue: How effective are your unit tests?
Javazone 2019 - Mutants to the rescue: How effective are your unit tests?Paco van Beckhoven
 
MicroProfile for MicroServices
MicroProfile for MicroServicesMicroProfile for MicroServices
MicroProfile for MicroServicesMert Çalışkan
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Doris Chen
 
What's new in java 9?
What's new in java 9?What's new in java 9?
What's new in java 9?Trayan Iliev
 
Testing with Spring 4.x
Testing with Spring 4.xTesting with Spring 4.x
Testing with Spring 4.xSam Brannen
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSam Brannen
 
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterBoni García
 
Testing your application on Google App Engine
Testing your application on Google App EngineTesting your application on Google App Engine
Testing your application on Google App EngineInphina Technologies
 
JavaFX for Business Application Developers
JavaFX for Business Application DevelopersJavaFX for Business Application Developers
JavaFX for Business Application DevelopersMichael Heinrichs
 
Dynamic Groovy Edges
Dynamic Groovy EdgesDynamic Groovy Edges
Dynamic Groovy EdgesJimmy Ray
 

Ähnlich wie Eclipse MicroProfile: Accelerating the adoption of Java Microservices (20)

MicroProfile Devoxx.us
MicroProfile Devoxx.usMicroProfile Devoxx.us
MicroProfile Devoxx.us
 
Level Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With TestcontainersLevel Up Your Integration Testing With Testcontainers
Level Up Your Integration Testing With Testcontainers
 
Mutation Testing DevoxxUK 2021
Mutation Testing DevoxxUK 2021Mutation Testing DevoxxUK 2021
Mutation Testing DevoxxUK 2021
 
Improve unit tests with Mutants!
Improve unit tests with Mutants!Improve unit tests with Mutants!
Improve unit tests with Mutants!
 
Advanced Java Testing
Advanced Java TestingAdvanced Java Testing
Advanced Java Testing
 
Jetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO ExtendedJetpack, with new features in 2021 GDG Georgetown IO Extended
Jetpack, with new features in 2021 GDG Georgetown IO Extended
 
Context and Dependency Injection 2.0
Context and Dependency Injection 2.0Context and Dependency Injection 2.0
Context and Dependency Injection 2.0
 
Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...
Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...
Android App Architecture with modern libs in practice. Our way in R.I.D., Ser...
 
Mutation testing Bucharest Tech Week
Mutation testing Bucharest Tech WeekMutation testing Bucharest Tech Week
Mutation testing Bucharest Tech Week
 
Javazone 2019 - Mutants to the rescue: How effective are your unit tests?
Javazone 2019 - Mutants to the rescue: How effective are your unit tests?Javazone 2019 - Mutants to the rescue: How effective are your unit tests?
Javazone 2019 - Mutants to the rescue: How effective are your unit tests?
 
MicroProfile for MicroServices
MicroProfile for MicroServicesMicroProfile for MicroServices
MicroProfile for MicroServices
 
Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!Angular or Backbone: Go Mobile!
Angular or Backbone: Go Mobile!
 
What's new in java 9?
What's new in java 9?What's new in java 9?
What's new in java 9?
 
Testing with Spring 4.x
Testing with Spring 4.xTesting with Spring 4.x
Testing with Spring 4.x
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing Support
 
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
 
Testing your application on Google App Engine
Testing your application on Google App EngineTesting your application on Google App Engine
Testing your application on Google App Engine
 
JavaFX for Business Application Developers
JavaFX for Business Application DevelopersJavaFX for Business Application Developers
JavaFX for Business Application Developers
 
Junit_.pptx
Junit_.pptxJunit_.pptx
Junit_.pptx
 
Dynamic Groovy Edges
Dynamic Groovy EdgesDynamic Groovy Edges
Dynamic Groovy Edges
 

Mehr von Dev_Events

Eclipse OMR: a modern, open-source toolkit for building language runtimes
Eclipse OMR: a modern, open-source toolkit for building language runtimesEclipse OMR: a modern, open-source toolkit for building language runtimes
Eclipse OMR: a modern, open-source toolkit for building language runtimesDev_Events
 
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...Dev_Events
 
Blockchain Hyperledger Lab
Blockchain Hyperledger LabBlockchain Hyperledger Lab
Blockchain Hyperledger LabDev_Events
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerDev_Events
 
Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Dev_Events
 
Lean and Easy IoT Applications with OSGi and Eclipse Concierge
Lean and Easy IoT Applications with OSGi and Eclipse ConciergeLean and Easy IoT Applications with OSGi and Eclipse Concierge
Lean and Easy IoT Applications with OSGi and Eclipse ConciergeDev_Events
 
Eclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewEclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewDev_Events
 
Node.js – ask us anything!
Node.js – ask us anything! Node.js – ask us anything!
Node.js – ask us anything! Dev_Events
 
Swift on the Server
Swift on the Server Swift on the Server
Swift on the Server Dev_Events
 
Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed? Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed? Dev_Events
 
Secrets of building a debuggable runtime: Learn how language implementors sol...
Secrets of building a debuggable runtime: Learn how language implementors sol...Secrets of building a debuggable runtime: Learn how language implementors sol...
Secrets of building a debuggable runtime: Learn how language implementors sol...Dev_Events
 
Tools in Action: Transforming everyday objects with the power of deeplearning...
Tools in Action: Transforming everyday objects with the power of deeplearning...Tools in Action: Transforming everyday objects with the power of deeplearning...
Tools in Action: Transforming everyday objects with the power of deeplearning...Dev_Events
 
Microservices without Servers
Microservices without ServersMicroservices without Servers
Microservices without ServersDev_Events
 
The App Evolution
The App EvolutionThe App Evolution
The App EvolutionDev_Events
 
Building Next Generation Applications and Microservices
Building Next Generation Applications and Microservices Building Next Generation Applications and Microservices
Building Next Generation Applications and Microservices Dev_Events
 
Create and Manage APIs with API Connect, Swagger and Bluemix
Create and Manage APIs with API Connect, Swagger and BluemixCreate and Manage APIs with API Connect, Swagger and Bluemix
Create and Manage APIs with API Connect, Swagger and BluemixDev_Events
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture Dev_Events
 
Add Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.jsAdd Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.jsDev_Events
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.jsDev_Events
 
Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson Dev_Events
 

Mehr von Dev_Events (20)

Eclipse OMR: a modern, open-source toolkit for building language runtimes
Eclipse OMR: a modern, open-source toolkit for building language runtimesEclipse OMR: a modern, open-source toolkit for building language runtimes
Eclipse OMR: a modern, open-source toolkit for building language runtimes
 
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...
 
Blockchain Hyperledger Lab
Blockchain Hyperledger LabBlockchain Hyperledger Lab
Blockchain Hyperledger Lab
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and Hyperledger
 
Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8Using GPUs to Achieve Massive Parallelism in Java 8
Using GPUs to Achieve Massive Parallelism in Java 8
 
Lean and Easy IoT Applications with OSGi and Eclipse Concierge
Lean and Easy IoT Applications with OSGi and Eclipse ConciergeLean and Easy IoT Applications with OSGi and Eclipse Concierge
Lean and Easy IoT Applications with OSGi and Eclipse Concierge
 
Eclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewEclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s View
 
Node.js – ask us anything!
Node.js – ask us anything! Node.js – ask us anything!
Node.js – ask us anything!
 
Swift on the Server
Swift on the Server Swift on the Server
Swift on the Server
 
Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed? Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed?
 
Secrets of building a debuggable runtime: Learn how language implementors sol...
Secrets of building a debuggable runtime: Learn how language implementors sol...Secrets of building a debuggable runtime: Learn how language implementors sol...
Secrets of building a debuggable runtime: Learn how language implementors sol...
 
Tools in Action: Transforming everyday objects with the power of deeplearning...
Tools in Action: Transforming everyday objects with the power of deeplearning...Tools in Action: Transforming everyday objects with the power of deeplearning...
Tools in Action: Transforming everyday objects with the power of deeplearning...
 
Microservices without Servers
Microservices without ServersMicroservices without Servers
Microservices without Servers
 
The App Evolution
The App EvolutionThe App Evolution
The App Evolution
 
Building Next Generation Applications and Microservices
Building Next Generation Applications and Microservices Building Next Generation Applications and Microservices
Building Next Generation Applications and Microservices
 
Create and Manage APIs with API Connect, Swagger and Bluemix
Create and Manage APIs with API Connect, Swagger and BluemixCreate and Manage APIs with API Connect, Swagger and Bluemix
Create and Manage APIs with API Connect, Swagger and Bluemix
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture
 
Add Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.jsAdd Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.js
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.js
 
Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson
 

Kürzlich hochgeladen

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 

Kürzlich hochgeladen (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Eclipse MicroProfile: Accelerating the adoption of Java Microservices

  • 1. #DevoxxUS Optimizing Enterprise Java for a Microservices Architecture John Clingan, middle-aged Java EE guy and MicroProfile-r Emily Jiang, totally awesome MicroProfile engineer Eclipse
  • 2. #DevoxxUS Agenda MicroProfile Overview (~10 Minutes) Example Specs - From concept to implementation (10 minutes) Collaborate (Until they kick us out or we want to go for a beer)
  • 4. #DevoxxUS What is MicroProfile? A community of individuals, organizations, and vendors … … collaborating within an open source (Eclipse) project …. … to bring microservices to the Enterprise Java community
  • 5. #DevoxxUS Innovation vs Standardization (Open Source) Project Focused Standard (JSR) focused (Java EE)(MicroProfile)
  • 6. #DevoxxUS Innovation vs Standardization (Open Source) Project Focused Standard (JSR) focused (Java EE) Large multi-feature releasesIncremental feature release (MicroProfile)
  • 7. #DevoxxUS Innovation vs Standardization Spec Lead controls pace (Open Source) Project Focused Standard (JSR) focused (Java EE) Large multi-feature releasesIncremental feature release (MicroProfile) Community controls pace
  • 8. #DevoxxUS Accelerating* Adoption of MicroServices 2016 2017 2018 2019 8 9 1.0 1.1 1.2 1.3 1.4 2020 1.5 * 2-4 releases per year
  • 9. #DevoxxUS MicroProfile 1.0 (Sep, 2016) Contexts and Dependency Injection (CDI 1.1) + Java API for RESTful Web Services (JAX-RS 2.0) + Java API for JSON Processing (JSON-P 1.0)
  • 10. #DevoxxUS MicroProfile 1.1 Underway Security: JWT Token Exchange 1.0 Health Check 1.0 Configuration 1.0 Fault Tolerance 1.0 (Stretch goal) Second Quarter 2017!
  • 11. #DevoxxUS Will MicroProfile Features be in Java EE? Possibly
  • 12. #DevoxxUS MicroProfile Java Programming Model (In Progress) ● Config ● Fault Tolerance ● Health Checker ● Metrics ● Security
  • 13. #DevoxxUS Configuration ● Discussed with a formal proposal in the MicroProfile mailing list (https://groups.google.com/forum/#!topic/microprofile/VJEEAOsVj 5E[26-50]) ● After the proposal was accepted, a repository was created to draft APIs/SPIs (https://github.com/eclipse/microprofile-config/)
  • 14. #DevoxxUS MicroProfile Java Prog. Model - Configuration
  • 15. #DevoxxUS MicroProfile Java Prog. Model - Configuration Using CDI Injection @Inject Config config; Inject all config properties that the class can see @Inject @ConfigProperty(name=“myProp” defaultValue=“blah”) String prop1; Inject the value of the property called “myProp”. The value of prop1 will not be refreshed. Suitable for static properties and used on the RequestScoped beans. @Inject @ConfigProperty(name=“myProp” defaultValue=“blah”) Provider<String> prop1 Inject the value of the property called “myProp” and it picks up the dynamic changes.
  • 16. #DevoxxUS MicroProfile Java Prog. Model - Configuration Programmatic lookup ConfigProvider.getConfig(); The config object containing all properties that the class owner can see. ConfigProvider.getBuilder() .addDefaultSources() .withSources(…).build(); Create a custom config object
  • 17. #DevoxxUS MicroProfile Java Prog. Model - Configuration ● The property file, microprofile-config.properties, packaged in the application can be overwritten by : ○ System variables (400 as the default priority) ○ Environment variables (300 as the default priority) or ○ a custom property files with a higher priority than microprofile-config.properties (100 as the default priority).
  • 18. #DevoxxUS MicroProfile Java Prog. Model - config ● Plan to finalise the current APIs/SPIs and release the Config 1.0 by mid April ● Then work on the new features of Config 1.1 ● Join in the Config discussion ● Join in the Config hangout – on Thursdays
  • 19. #DevoxxUS MicroProfile Java Prog model – Fault Tolerance ● Proposal discussion: https://groups.google.com/forum/#!topic/microprofile/ESs9L3z08o A ● Prototype (inspired by Failsafe): https://github.com/Emily- Jiang/microprofile-faultTolerance-incubation
  • 20. #DevoxxUS MicroProfile Java Prog model – Fault Tolerance Retry The request should have a retry to recover from temporary glitches Fallback The request should have a fallback operation if retry fails Timeout The request must have a timeout, to prevent from waiting indefinitely Circuit Breaker The request must prevent from repeating timeouts Bulkhead One part of application failure must not bring the whole application down
  • 21. #DevoxxUS Fault Tolerance - Fallback Retry Set up retry policy and wrap the call with the policy and specify the fallback operation FaultToleranceFactory.getFaultToleranceType(RetryPolicy.class); Duration delay = Duration.ofSeconds(1); retryPolicy = retryPolicy.retryOn(Exception.class).withDelay(delay) .withMaxRetries(3); Runnable fallbackService = () -> serviceB(); executor.with(retryPolicy).withFallback(fallbackService) .run(mainService);
  • 22. #DevoxxUS Fault Tolerance - Circuit Breaker Timeout Fail-fast, temporarily disable the running of a service circuitBreaker = FaultToleranceFactory.getFaultToleranceType(CircuitBreaker.class); circuitBreaker = circuitBreaker.withTimeout(timeout).withFailureThreshold(3) .withSuccessThreshold(2) .withDelay(delay); Callable<Object> mainService = () -> serviceA(); Executor executor = FaultToleranceFactory.getFaultToleranceType(Executor.class); executor.with(circuitBreaker).get(mainService);
  • 23. #DevoxxUS Fault Tolerance - Bulkhead Limit the number of concurrent calls to a service ThreadPoolExecutor tpexecutor = new ThreadPoolExecutor( poolSize, poolSize, 0, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(10)); bulkhead = bulkhead.withThread(tpexecutor); executor.with(bulkhead) .run(mainService);
  • 24. #DevoxxUS MicroProfile Java Prog model – Fault Tolerance ● Non-CDI approach was left out of the first release but focus on CDI-first approach ● Discussion the CDI-first approach ongoing ● Use Interceptor to apply policy and use annotation to config policy
  • 25. #DevoxxUS Health Check, Metrics, Security ● Health Check – proposal accepted ● Metrics and Security – proposal in discussion

Hinweis der Redaktion

  1. Java EE has been an extremely successful platform. The JCP has been the steward of over 20 compatible implementations over its nearly 20 year history, resulting in a $4B industry. These are just some of the Java EE compatible implementations that exist. In its early stages, J2EE grew somewhat quickly (perhaps too quickly) as the platform needed to address the immediate needs of the enterprise. Beginning with Java EE 5 in 2006, the pace began to slow as the platform began to mature. Java EE is now following the slower release cadence that a standards organization typically reflects. A standards-based release cadence by design does not address ew and rapid innovations.
  2. MicroProfile 1.1 is underway, and scheduled for the 2nd quarter of 2017. The community has decided to focus this release on Configuration, Security (JWT Token Exchange), Health Check, and Fault Tolerance. Configuration: Separates (externalizes) a microservice from its configuration. Health Check: Specifies a REST endpoint with service health information. Enables cloud infrastructure to detect the health of a service. If a service is unhealthy, a cloud runtime can restart (or fail and re-create) a service instance Fault Tolerance: APIs that cover popular microservice programming patterns, including Fallback, Circuit Breakers, and Bulkheads