SlideShare a Scribd company logo
How to bake reactive
behavior into your Java EE
applications
Ondrej Mihályi
@OMihalyi
@OMihalyi
AgendaAgenda
➢
What is a reactive app
➢
Support in Java EE 7
➢
Java 8 joins the game
➢
Payara Micro additions
➢
Live demo
➢
Common pitfalls
@OMihalyi
Ondrej
Mihályi
Web:
itblog.inginea.eu
Twitter:
Ondrej
Mihályi
Web:
itblog.inginea.eu
Twitter:
Payara suppor
engineer
Java EE developer
Java EE lecturer
Java blogger
Scrummaster
@OMihalyi
Reactive applicationReactive application
@OMihalyi
Possible in Enterprise?Possible in Enterprise?
New tools and frameworks
➔
High risks and costs
Fully reactive approach
➔
High cost of development
➔
Harder to avoid and track bugs
Advice → reactive where it’s worth
→ leave the door open for future
@OMihalyi
Java EE leaves the door openJava EE leaves the door open
Established and wide-spread
– Built with resilience in mind (Transactions)
– Messaging is first-class citizen (JMS)
Continuous improvements
– Asynchronous API, thread-management
– Scalability improvements (JCache)
– Portable CDI extensions
@OMihalyi
Traditional approachTraditional approach
Request started
→ external resource required (DB, WS, files)
→ request external resource
→ external resource is slow
→ what do we do?
We SIMPLY wait…
@OMihalyi
Traditional approachTraditional approach
We SIMPLY wait…
Simple
Thread-safe
Sufficient when waiting time is
negligible
@OMihalyi
Traditional approachTraditional approach
Blocking calls:
JDBC:
ResultSet rs =
stmt.executeQuery(q);
@OMihalyi
Traditional approachTraditional approach
Blocking calls:
JPA:
List r =
query.getResultList();
Servlet:
response.getWriter()
.print(s);
@OMihalyi
Traditional approachTraditional approach
Blocking design:
– Servlet filters
– Interceptors
– JSF lifecycle
@OMihalyi
Spawn a separate threadSpawn a separate thread
Idea:
– Blocking call in a new thread
– Do something while waiting
– Join the thread and retrieve results
– Fail after timeout vs. block infinitely
@OMihalyi
java.util.concurrent.Futurejava.util.concurrent.Future
Solution in Java world (since Java 5)
@Asynchronous methods since Java EE 6
– Solves the problem for fire-and-forget
– Still drawbacks when result needed
●
Complexity – keep asking “Are you ready?”
●
Requires one more thread
– blocked when nothing to do while waiting
@OMihalyi
@Asynchronous@Asynchronous
Any EJB method or all methods of an EJB
Executes in another thread in pool
Fire-and-forget with void result
Return result as a Future
– Future not efficient enough, we’ll improve later
@OMihalyi
@Asynchronous - Fire-and-
forget
@Asynchronous - Fire-and-
forget
@Asynchronous
void fireAndForget
(String message)
{
… // long-running task
}
@OMihalyi
Non-blocking API in Java EE 7Non-blocking API in Java EE 7
AsyncContext in Servlet (since 3.0, Java EE 6)
// get context for another thread
AsyncContext ctx =
req.startAsync();
AsyncContext
.getResponse()
.getOutputStream()…
ctx.complete();
@OMihalyi
Non-blocking API in Java EE 7Non-blocking API in Java EE 7
AsyncContext in Servlet
AsyncContext ctx =
req.startAsync();
AsyncContext // build response (in any thread)
.getResponse()
.getOutputStream()…
// finish (in new thread)
ctx.complete();
@OMihalyi
Non-blocking API in Java EE 7Non-blocking API in Java EE 7
AsyncContext in Servlet
– Requires to turn on async support
●
Using @WebServlet annotation
●
In web.xml descriptor
@WebServlet
(asyncSupported=true)
@OMihalyi
Non-blocking API in Java EE 7Non-blocking API in Java EE 7
Async IO in Servlet 3.1 (Java EE 7)
– Non-blocking reading of multi-part form
– Non-blocking writing of response body
Non-blocking IO in Java (NIO)
– to read HTML from files
@OMihalyi
Non-blocking APINon-blocking API
JAX-RS AsyncResponse
@Suspended@GET
void get(@Suspended
AsyncResponse r)
…
// in another thread
response.resume("OK");
@OMihalyi
Non-blocking APINon-blocking API
JAX-RS AsyncResponse
@Suspendedvoid get(@Suspended
AsyncResponse response)
…
// in another thread
response
.resume("OK");
@OMihalyi
Non-blocking APINon-blocking API
JAX-RS async client
resourceTarget
.request(MediaType.TEXT_PLAIN)
.async()
.get(new
InvocationCallback
() { … });
@OMihalyi
CDI events + @AsynchronousCDI events + @Asynchronous
CDI events decouple components
– one-way communication
– handlers triggered in the same thread
→ emitter is blocked
Handlers are asynchronous EJB methods
– triggered in anyther thread
→ emitter not blocked
@OMihalyi
@Inject
Event<MyEvent> ev;
…
ev.fire(new MyEvent());
…
@Asynchronous
void handle(@Observes
MyEvent ev) { … }
@OMihalyi
Summary of approachesSummary of approaches
Traditional blocking API
– Easy to use, halts execution until finished
→→
@OMihalyi
Summary of approachesSummary of approaches
Traditional blocking API
– Easy to use, halts execution until finished
Asynchronous call with Future
– not blocking, +1 thread
Asynchronous call with callback
– Not blocking, 1 thread at a time, callback hell
@OMihalyi
Java 8Java 8
CompletableFuture (CompletionStage)
– Chain callbacks (like promises)
– Execute in the same or another thread
● thenRun(), thenRunAsync(), …
● thenCompose(),…
– Complete execution in any thread at any time
● completableFuture.complete()
thenComposeAsync()
@OMihalyi
thenComposeAsync()thenComposeAsync()
CompletableFuture<String>
cf = new
CompletableFuture<>();
…
cf.thenComposeAsync( r ->
return callThatReturnsCF(r);
), executor)
…
cf.complete(awaitResult())
@OMihalyi
thenComposeAsync()thenComposeAsync()
…
cf.thenComposeAsync(
r -> returnsCF(r)
), executor)
.thenComposeAsync(…
…
cf.complete(r);
@OMihalyi
Java EE + Java 8Java EE + Java 8
Future → CompletableFuture ?
– No, not compatible
Callbacks → CompletableFuture
– callback triggers cf.complete()
Pass CF as additional parameter
@OMihalyi
Pass CF as additional parameterPass CF as additional parameter
void asyncCall(CompletableFuture cf) {
… cf.complete(result);
}
… cf = new CompletableFuture<String>();
asyncCall(cf);
cf.thenComposeAsync(
result -> … , executor);
@OMihalyi
Use managed executorsUse managed executors
CF async methods use ForkJoinPool
– Not managed by Java EE
Always use a managed executor
@Resource
ManagedExecutorService
executor;
@OMihalyi
Other parts of being ReactiveOther parts of being Reactive
We’ve shown responsive API
The other 3 reactive concepts:
– Resilience
– Messaging
– Elasticity
@OMihalyi
ResilienceResilience
Responsive in the face of failures
Server clusters and transaction isolation
Load balancer in front
Microservices (embedded server)
… reduce single points of failure
@OMihalyi
Payara MicroPayara Micro
Application server as executable JAR
Runs WAR apps from command line
automatic and elastic clustering
→ spawn many micro services dynamically
→ replication using distributed cache
→ shared 60MB runtime, 40MB in heap
www.payara.fish
→ → V
@OMihalyi
Messaging in Java EEMessaging in Java EE
JMS – traditional solution
– Topics, Queues, Persistence,
Transactional, Repeated delivery
– Simplified API in Java EE 7
●
some bioler-plate still necessary
@OMihalyi
Why not make it even simpler?
@Inject @Outbound
Event<MyMsg> ev;
// handle in different JVM
void handle(@Observes
@Inbound MyMsg ev) {
… }
@OMihalyi
Payara Micro event busPayara Micro event bus
events handled by any distributed node
– Asynchronous (reactive) micro services
– No need for service registry
On top of CDI events, just 2 qualifiers
– @Outbound event, @Inbound observer
Uses Hazelcast distributed executor
@OMihalyi
Elasticity in Java EEElasticity in Java EE
Weakest point of Java EE specs
– Clusters do not scale dynamically
Many provider-specific solutions
JCache JSR – targets Java EE 8
@OMihalyi
JCacheJCache
Standard Java API for caching
Distributed
API and CDI binding
Supported by many cache providers
Built in to Payara Server and Payara Micro
@OMihalyi
@Inject MyCache cache;
…
value = cache.get(key);
…
@CacheResult
Object get(
@CacheKey Object key)
JCache CDI bindingJCache CDI binding
@OMihalyi
mycache.put(key, value);
…
@CachePut
void put(
@CacheKey Object key,
@CacheValue Object v)
{ // body can be empty }
JCache CDI bindingJCache CDI binding
@OMihalyi
Dynamic scalingDynamic scaling
Just run repeatedly
– binds to a free port to avoid port collisions
All instances autoconnect to a cluster
– Even across network (multicast)
java -jar payara-micro.java
--deploy app.war
--autoBindHttp
@OMihalyi
Payara Micro examplePayara Micro example
web service on single node, computation
service scaled to multiple nodes
– Web service fires an @Outbound event
– Computation started on a computation node
●
Synchronisation using Jcache API
– An event with result fired
– Observed by web service and returned
@OMihalyi
Fully reactive comes at a greater cost
– Dealing with threads, hard to track origin,
communication overhead
Don’t over-engineer, but leave doors open
Java EE enables gradual improvement
General adviceGeneral advice
@OMihalyi
Questions?Questions?
Thank you

More Related Content

What's hot

Threads and concurrency in Java 1.5
Threads and concurrency in Java 1.5Threads and concurrency in Java 1.5
Threads and concurrency in Java 1.5
Peter Antman
 
Rapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINARapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINA
trustinlee
 
Introduction to Node.js Platform
Introduction to Node.js PlatformIntroduction to Node.js Platform
Introduction to Node.js Platform
Naresh Chintalcheru
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8
javafxpert
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Arun Gupta
 
Modern Java Concurrency
Modern Java ConcurrencyModern Java Concurrency
Modern Java Concurrency
Ben Evans
 
Java concurrency in practice
Java concurrency in practiceJava concurrency in practice
Java concurrency in practice
Mikalai Alimenkou
 
Vert.x vs akka
Vert.x vs akkaVert.x vs akka
Vert.x vs akka
Chang-Hwan Han
 
Java Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and TrendsJava Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and Trends
Carol McDonald
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technology
Minal Maniar
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
Fahmi Jafar
 
Intrinsic Methods in HotSpot VM
Intrinsic Methods in HotSpot VMIntrinsic Methods in HotSpot VM
Intrinsic Methods in HotSpot VM
Kris Mok
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
Mohammad Hossein Rimaz
 
Java Servlet
Java Servlet Java Servlet
Java Servlet
Rajiv Gupta
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1vikram singh
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
Minh Hoang
 
Java EE 7, what's in it for me?
Java EE 7, what's in it for me?Java EE 7, what's in it for me?
Java EE 7, what's in it for me?
Alex Soto
 
Advanced java programming-contents
Advanced java programming-contentsAdvanced java programming-contents
Advanced java programming-contentsSelf-Employed
 

What's hot (19)

Threads and concurrency in Java 1.5
Threads and concurrency in Java 1.5Threads and concurrency in Java 1.5
Threads and concurrency in Java 1.5
 
Rapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINARapid Network Application Development with Apache MINA
Rapid Network Application Development with Apache MINA
 
Introduction to Node.js Platform
Introduction to Node.js PlatformIntroduction to Node.js Platform
Introduction to Node.js Platform
 
What's New in Java 8
What's New in Java 8What's New in Java 8
What's New in Java 8
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
 
Modern Java Concurrency
Modern Java ConcurrencyModern Java Concurrency
Modern Java Concurrency
 
Java concurrency in practice
Java concurrency in practiceJava concurrency in practice
Java concurrency in practice
 
Vert.x vs akka
Vert.x vs akkaVert.x vs akka
Vert.x vs akka
 
Java Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and TrendsJava Concurrency, Memory Model, and Trends
Java Concurrency, Memory Model, and Trends
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technology
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
 
Servlets
ServletsServlets
Servlets
 
Intrinsic Methods in HotSpot VM
Intrinsic Methods in HotSpot VMIntrinsic Methods in HotSpot VM
Intrinsic Methods in HotSpot VM
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
 
Java Servlet
Java Servlet Java Servlet
Java Servlet
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
 
Java EE 7, what's in it for me?
Java EE 7, what's in it for me?Java EE 7, what's in it for me?
Java EE 7, what's in it for me?
 
Advanced java programming-contents
Advanced java programming-contentsAdvanced java programming-contents
Advanced java programming-contents
 

Viewers also liked

Social metadata on the web
Social metadata on the webSocial metadata on the web
Social metadata on the web
Hendrik Dacquin
 
University Talks #2 | Елена Шилова — Свет и безопасность
University Talks #2 | Елена Шилова — Свет и безопасностьUniversity Talks #2 | Елена Шилова — Свет и безопасность
University Talks #2 | Елена Шилова — Свет и безопасность
Amir Abdullaev
 
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16Ioannis Kevrekidis
 
Presentación sobre el hiv
Presentación sobre el hivPresentación sobre el hiv
Presentación sobre el hivluzdelalba82
 
Presentation for Catalyst workshop, with notes
Presentation for Catalyst workshop, with notesPresentation for Catalyst workshop, with notes
Presentation for Catalyst workshop, with notes
Alex Watson
 
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляцииUniversity Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
Amir Abdullaev
 
STORYTELLING
STORYTELLINGSTORYTELLING
STORYTELLING
toap
 
Bozza della Legge di Bilancio 2017
Bozza della Legge di Bilancio 2017 Bozza della Legge di Bilancio 2017
Bozza della Legge di Bilancio 2017
Voci di Palazzo
 
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
Amir Abdullaev
 
Piracy
PiracyPiracy
Social Media Trends 2014
Social Media Trends 2014Social Media Trends 2014
Social Media Trends 2014
NUS-ISS
 
Meilleures photos national geo 2015
Meilleures photos national geo 2015Meilleures photos national geo 2015
Meilleures photos national geo 2015
Balcon60
 
Keynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
Keynote 4: Leadership and Education for Sustainable Development, Philip VaughterKeynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
Keynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
ESD UNU-IAS
 
Media, Technology and Consumer Trends to Watch in 2016
Media, Technology and Consumer Trends to Watch in 2016Media, Technology and Consumer Trends to Watch in 2016
Media, Technology and Consumer Trends to Watch in 2016
The Fisheye Group
 
Proyecto "Song for a change"
Proyecto "Song for a change"Proyecto "Song for a change"
Proyecto "Song for a change"
sandaliasonora
 
Exakat for PHP : smart code reviewing engine
Exakat for PHP : smart code reviewing engineExakat for PHP : smart code reviewing engine
Exakat for PHP : smart code reviewing engine
Damien Seguy
 
University Talks #1 | Никита Булгаков и Алексей Ушаков - Дзен и искусство пои...
University Talks #1 | Никита Булгаков и Алексей Ушаков - Дзен и искусство пои...University Talks #1 | Никита Булгаков и Алексей Ушаков - Дзен и искусство пои...
University Talks #1 | Никита Булгаков и Алексей Ушаков - Дзен и искусство пои...
Amir Abdullaev
 
EyeEM
EyeEMEyeEM
EyeEM
trueter
 

Viewers also liked (20)

Social metadata on the web
Social metadata on the webSocial metadata on the web
Social metadata on the web
 
University Talks #2 | Елена Шилова — Свет и безопасность
University Talks #2 | Елена Шилова — Свет и безопасностьUniversity Talks #2 | Елена Шилова — Свет и безопасность
University Talks #2 | Елена Шилова — Свет и безопасность
 
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
Ημερολόγιο Δραστηριοτήτων Π.Ο. 2015-16
 
Presentación sobre el hiv
Presentación sobre el hivPresentación sobre el hiv
Presentación sobre el hiv
 
Presentation for Catalyst workshop, with notes
Presentation for Catalyst workshop, with notesPresentation for Catalyst workshop, with notes
Presentation for Catalyst workshop, with notes
 
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляцииUniversity Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
University Talks #1 | Екатерина Мамонтова - Счастье не поддается инфляции
 
STORYTELLING
STORYTELLINGSTORYTELLING
STORYTELLING
 
Bozza della Legge di Bilancio 2017
Bozza della Legge di Bilancio 2017 Bozza della Legge di Bilancio 2017
Bozza della Legge di Bilancio 2017
 
Somar com o outono I
Somar com o outono I Somar com o outono I
Somar com o outono I
 
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
University Talks #2 | Анастасия Чекрыжова — Свежий взгляд на современное иску...
 
Piracy
PiracyPiracy
Piracy
 
Social Media Trends 2014
Social Media Trends 2014Social Media Trends 2014
Social Media Trends 2014
 
Becoming a Systematic Entrepreneur?
Becoming a Systematic Entrepreneur?Becoming a Systematic Entrepreneur?
Becoming a Systematic Entrepreneur?
 
Meilleures photos national geo 2015
Meilleures photos national geo 2015Meilleures photos national geo 2015
Meilleures photos national geo 2015
 
Keynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
Keynote 4: Leadership and Education for Sustainable Development, Philip VaughterKeynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
Keynote 4: Leadership and Education for Sustainable Development, Philip Vaughter
 
Media, Technology and Consumer Trends to Watch in 2016
Media, Technology and Consumer Trends to Watch in 2016Media, Technology and Consumer Trends to Watch in 2016
Media, Technology and Consumer Trends to Watch in 2016
 
Proyecto "Song for a change"
Proyecto "Song for a change"Proyecto "Song for a change"
Proyecto "Song for a change"
 
Exakat for PHP : smart code reviewing engine
Exakat for PHP : smart code reviewing engineExakat for PHP : smart code reviewing engine
Exakat for PHP : smart code reviewing engine
 
University Talks #1 | Никита Булгаков и Алексей Ушаков - Дзен и искусство пои...
University Talks #1 | Никита Булгаков и Алексей Ушаков - Дзен и искусство пои...University Talks #1 | Никита Булгаков и Алексей Ушаков - Дзен и искусство пои...
University Talks #1 | Никита Булгаков и Алексей Ушаков - Дзен и искусство пои...
 
EyeEM
EyeEMEyeEM
EyeEM
 

Similar to How to bake reactive behavior into your Java EE applications

How to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applicationsHow to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applications
Ondrej Mihályi
 
How to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applicationsHow to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applications
Ondrej Mihályi
 
JDD 2016 - Ondrej Mihalyi - How to bake reactive behavior into your Java EE ...
JDD 2016 - Ondrej Mihalyi -  How to bake reactive behavior into your Java EE ...JDD 2016 - Ondrej Mihalyi -  How to bake reactive behavior into your Java EE ...
JDD 2016 - Ondrej Mihalyi - How to bake reactive behavior into your Java EE ...
PROIDEA
 
How to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applicationsHow to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applications
Ondrej Mihályi
 
How to bake_reactive_behavior_into_your_java_ee_applications
How to bake_reactive_behavior_into_your_java_ee_applicationsHow to bake_reactive_behavior_into_your_java_ee_applications
How to bake_reactive_behavior_into_your_java_ee_applications
Ondrej Mihályi
 
Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java
Baruch Sadogursky
 
Concurrent Programming in Java
Concurrent Programming in JavaConcurrent Programming in Java
Concurrent Programming in Java
Ruben Inoto Soto
 
Ruby vs Node ShiningRay Shanghai
Ruby vs Node ShiningRay ShanghaiRuby vs Node ShiningRay Shanghai
Ruby vs Node ShiningRay Shanghai
Jackson Tian
 
Async programming and python
Async programming and pythonAsync programming and python
Async programming and python
Chetan Giridhar
 
Here comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdfHere comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdf
Krystian Zybała
 
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
Arun Gupta
 
Play Framework
Play FrameworkPlay Framework
Play Framework
Harinath Krishnamoorthy
 
Don't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 insteadDon't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 instead
Erin Schnabel
 
The art of concurrent programming
The art of concurrent programmingThe art of concurrent programming
The art of concurrent programming
Iskren Chernev
 
Java Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, HibernateJava Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, Hibernate
Anton Keks
 
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
Ilya Grigorik
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrent
Roger Xia
 
Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)
Martijn Verburg
 
"Service Worker: Let Your Web App Feel Like a Native "
"Service Worker: Let Your Web App Feel Like a Native ""Service Worker: Let Your Web App Feel Like a Native "
"Service Worker: Let Your Web App Feel Like a Native "
FDConf
 

Similar to How to bake reactive behavior into your Java EE applications (20)

How to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applicationsHow to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applications
 
How to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applicationsHow to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applications
 
JDD 2016 - Ondrej Mihalyi - How to bake reactive behavior into your Java EE ...
JDD 2016 - Ondrej Mihalyi -  How to bake reactive behavior into your Java EE ...JDD 2016 - Ondrej Mihalyi -  How to bake reactive behavior into your Java EE ...
JDD 2016 - Ondrej Mihalyi - How to bake reactive behavior into your Java EE ...
 
How to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applicationsHow to bake reactive behavior into your Java EE applications
How to bake reactive behavior into your Java EE applications
 
How to bake_reactive_behavior_into_your_java_ee_applications
How to bake_reactive_behavior_into_your_java_ee_applicationsHow to bake_reactive_behavior_into_your_java_ee_applications
How to bake_reactive_behavior_into_your_java_ee_applications
 
Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java Everything you wanted to know about writing async, concurrent http apps in java
Everything you wanted to know about writing async, concurrent http apps in java
 
Concurrent Programming in Java
Concurrent Programming in JavaConcurrent Programming in Java
Concurrent Programming in Java
 
Ruby vs Node ShiningRay Shanghai
Ruby vs Node ShiningRay ShanghaiRuby vs Node ShiningRay Shanghai
Ruby vs Node ShiningRay Shanghai
 
Async programming and python
Async programming and pythonAsync programming and python
Async programming and python
 
Here comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdfHere comes the Loom - Ya!vaConf.pdf
Here comes the Loom - Ya!vaConf.pdf
 
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
S314168 - What's New in Enterprise Java Bean Technology @ JavaOne Brazil 2010
 
Play Framework
Play FrameworkPlay Framework
Play Framework
 
Don't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 insteadDon't Wait! Develop responsive applications with Java EE7 instead
Don't Wait! Develop responsive applications with Java EE7 instead
 
The art of concurrent programming
The art of concurrent programmingThe art of concurrent programming
The art of concurrent programming
 
Java Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, HibernateJava Course 15: Ant, Scripting, Spring, Hibernate
Java Course 15: Ant, Scripting, Spring, Hibernate
 
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9No callbacks, No Threads - Cooperative web servers in Ruby 1.9
No callbacks, No Threads - Cooperative web servers in Ruby 1.9
 
Java util concurrent
Java util concurrentJava util concurrent
Java util concurrent
 
Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)
 
Plack - LPW 2009
Plack - LPW 2009Plack - LPW 2009
Plack - LPW 2009
 
"Service Worker: Let Your Web App Feel Like a Native "
"Service Worker: Let Your Web App Feel Like a Native ""Service Worker: Let Your Web App Feel Like a Native "
"Service Worker: Let Your Web App Feel Like a Native "
 

More from Ondrej Mihályi

Easily scale enterprise applications using distributed data grids
Easily scale enterprise applications using distributed data gridsEasily scale enterprise applications using distributed data grids
Easily scale enterprise applications using distributed data grids
Ondrej Mihályi
 
Elastic and Cloud-ready Applications with Payara Micro
Elastic and Cloud-ready Applications with Payara MicroElastic and Cloud-ready Applications with Payara Micro
Elastic and Cloud-ready Applications with Payara Micro
Ondrej Mihályi
 
Bed con - MicroProfile: A Quest for a lightweight and reactive Enterprise Ja...
Bed con - MicroProfile:  A Quest for a lightweight and reactive Enterprise Ja...Bed con - MicroProfile:  A Quest for a lightweight and reactive Enterprise Ja...
Bed con - MicroProfile: A Quest for a lightweight and reactive Enterprise Ja...
Ondrej Mihályi
 
Easily scale enterprise applications using distributed data grids
Easily scale enterprise applications using distributed data gridsEasily scale enterprise applications using distributed data grids
Easily scale enterprise applications using distributed data grids
Ondrej Mihályi
 
Business layer and transactions
Business layer and transactionsBusiness layer and transactions
Business layer and transactions
Ondrej Mihályi
 
Working with jpa
Working with jpaWorking with jpa
Working with jpa
Ondrej Mihályi
 
Maven in Java EE project
Maven in Java EE projectMaven in Java EE project
Maven in Java EE project
Ondrej Mihályi
 
Java EE web project introduction
Java EE web project introductionJava EE web project introduction
Java EE web project introduction
Ondrej Mihályi
 

More from Ondrej Mihályi (8)

Easily scale enterprise applications using distributed data grids
Easily scale enterprise applications using distributed data gridsEasily scale enterprise applications using distributed data grids
Easily scale enterprise applications using distributed data grids
 
Elastic and Cloud-ready Applications with Payara Micro
Elastic and Cloud-ready Applications with Payara MicroElastic and Cloud-ready Applications with Payara Micro
Elastic and Cloud-ready Applications with Payara Micro
 
Bed con - MicroProfile: A Quest for a lightweight and reactive Enterprise Ja...
Bed con - MicroProfile:  A Quest for a lightweight and reactive Enterprise Ja...Bed con - MicroProfile:  A Quest for a lightweight and reactive Enterprise Ja...
Bed con - MicroProfile: A Quest for a lightweight and reactive Enterprise Ja...
 
Easily scale enterprise applications using distributed data grids
Easily scale enterprise applications using distributed data gridsEasily scale enterprise applications using distributed data grids
Easily scale enterprise applications using distributed data grids
 
Business layer and transactions
Business layer and transactionsBusiness layer and transactions
Business layer and transactions
 
Working with jpa
Working with jpaWorking with jpa
Working with jpa
 
Maven in Java EE project
Maven in Java EE projectMaven in Java EE project
Maven in Java EE project
 
Java EE web project introduction
Java EE web project introductionJava EE web project introduction
Java EE web project introduction
 

Recently uploaded

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 

Recently uploaded (20)

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 

How to bake reactive behavior into your Java EE applications

Editor's Notes

  1. dfds
  2. Why apps are not inherently like this? - because of traditionally blocking API and monolithic architectures - because it is hard (for programmers) Solutions - Completely new frameworks (Vert.x) - learn everything from scratch - not easy to reuse knowledge - Improve existing approaches - add non-blocking API - continuous improvements where it adds most value
  3. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0 simplified API, managed executor)
  4. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  5. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  6. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  7. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  8. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  9. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  10. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  11. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  12. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  13. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  14. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  15. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  16. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  17. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  18. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  19. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  20. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  21. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  22. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  23. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  24. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  25. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  26. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  27. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  28. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  29. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  30. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  31. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  32. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  33. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  34. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  35. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  36. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  37. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  38. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  39. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  40. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  41. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)
  42. Established → small costs of upgrade or redesign Improvements → simplifications (EJB3, CDI, JMS 2.0, managed executor)