SlideShare a Scribd company logo
© 2015 IBM Corporation
Don't Wait!
Develop Responsive Applications
with Java EE7 Instead
Session 3085
Erin Schnabel
Liberty Profile Development Lead, IBM
@ebullientworks
Focus on the server side
• “Responsive” application
• Throughput is king (or queen)
• Should be able to handle as many requests as we can!
• Maximize resource utilization
• Make the best use of allocated resources
• Take advantage of tiered services
• Technologies in EE7 can help
• JAX-RS 2.0 async processing
• Concurrency Utilities (JSR-236)
• WebSocket API (JSR-356)
• Non-blocking I/O added in Servlet 3.1
1
JAX-RS 2.0
Async support
Concurrency Utilities
Rich Client
Native
HTML5
Web SPA
(Javascript)
“Modern Web Application” -- REST
3
REST
API
**
Business
Logic
**
Hybrid
A (very) simple JAX-RS example
@Path(”items")
public class ItemResource {
// various ways to get this guy, play nice and assume we have one
protected ItemService itemService;
@GET
@Produces(MediaType.APPLICATION_JSON)
public Collection<Item> listItems() {
return itemService.listItems();
}
@POST
@Consumes(MediaType.APPLICATION_JSON)
public void addItem(Item item) {
itemService.addItem(item);
}
...
}
4
A (very) simple JAX-RS example
@Path(”items")
public class ItemResource {
// various ways to get this guy, play nice and assume we have one
protected ItemService itemService;
@GET
@Produces(MediaType.APPLICATION_JSON)
public Collection<Item> listItems() {
return itemService.listItems();
}
@POST
@Consumes(MediaType.APPLICATION_JSON)
public void addItem(Item item) {
itemService.addItem(item);
}
...
}
5
What if this is an
encapsulation of a
remote service?
A (very) simple JAX-RS example
@Path(”items")
public class ItemResource {
// various ways to get this guy, play nice and assume we have one
protected ItemService itemService;
@GET
@Produces(MediaType.APPLICATION_JSON)
public Collection<Item> listItems() {
return itemService.listItems();
}
@POST
@Consumes(MediaType.APPLICATION_JSON)
public void addItem(Item item) {
itemService.addItem(item);
}
...
}
6
What if this is an
encapsulation of a
remote service?
Not much changes from
the client point of view:
they will make a
request and wait for the
response either way…
A (very) simple JAX-RS example
@Path(”items")
public class ItemResource {
// various ways to get this guy, play nice and assume we have one
protected ItemService itemService;
@GET
@Produces(MediaType.APPLICATION_JSON)
public Collection<Item> listItems() {
return itemService.listItems();
}
@POST
@Consumes(MediaType.APPLICATION_JSON)
public void addItem(Item item) {
itemService.addItem(item);
}
...
}
7
What if this is an
encapsulation of a
remote service?
Not much changes from
the client point of view:
they will make a
request and wait for the
response either way…
If the remote service
operation takes awhile, this
server thread…
… just sits there…
… waiting…
• AsyncResponse.resume(…) to send the response to the client.
• @Suspended annotation with AsyncResponse parameter
• void return type (to allow this method to return immediately)
• “suspend” the connection -- NOT DISCONNECTED!
@GET
@Produces(MediaType.APPLICATION_JSON)
public void getItems(@Suspended final AsyncResponse ar) {
Collection<Item> result = itemService.listItems();
ar.resume(result );
}
JAX-RS 2.0: Asynchronous processing
8
• AsyncResponse.resume(…) to send the response to the client.
• @Suspended annotation with AsyncResponse parameter
• void return type (to allow this method to return immediately)
• “suspend” the connection -- NOT DISCONNECTED!
@GET
@Produces(MediaType.APPLICATION_JSON)
public void getItems(@Suspended final AsyncResponse ar) {
Collection<Item> result = itemService.listItems();
ar.resume(result );
}
JAX-RS 2.0: Asynchronous processing
9
Hmm…I don’t see any
threading stuff. How is this
asynchronous?
Good catch!
So far, all we’ve achieved is parity
with what we had before… Choices, choices.
How to queue long-running
work onto a different thread?
JAX-RS 2.0 and….
10
@GET
@Produces(MediaType.APPLICATION_JSON)
public void getItems(@Suspended final AsyncResponse ar) {
Executors.newSingleThreadExecutor().submit(new Runnable() {
Collection<Item> result = itemService.listItems();
Response resp = Response.ok(result).build();
ar.resume(resp);
});
}
This would totally work:
The long-running operation is
definitely on a different thread.
Hopefully we also know that this
is a horrible idea!
#notcontainerfriendly
• For an EJB, use the @Asynchronous method annotation.
JAX-RS 2.0 and EJB
11
The EJB Container will
dispatch to a different thread
before invoking the method.
@Stateless
@Path("ejbitems")
public class ItemEJBResource {
...
@GET
@Asynchronous
@Produces(MediaType.APPLICATION_JSON)
public void getItems(@Suspended final AsyncResponse ar) {
Collection<Item> result = itemService.listItems();
Response resp = Response.ok(result).build();
ar.resume(resp);
}
...
}
JAX-RS 2.0 and CDI and Concurrency Utilities
12
• Enable CDI (beans.xml), and have an Executor provided
@Path("cdiexecitems")
public class ItemsCDIExecutorResource {
...
@Resource
ManagedExecutorService executor;
@GET
@Produces(MediaType.APPLICATION_JSON)
public void getItems(@Suspended final AsyncResponse ar) {
executor.submit(new Runnable() {
public void run() {
Collection<Item> result = itemService.listItems();
Response resp = Response.ok(result).build();
ar.resume(resp);
}
});
}
}
@Path("execitems")
public class ItemsExecutorResource {
private ExecutorService getExecutor() throws NamingException {
return (ExecutorService) new InitialContext()
.lookup("java:comp/DefaultManagedExecutorService");
}
@GET
@Produces(MediaType.APPLICATION_JSON)
public void getItems(@Suspended final AsyncResponse ar) {
Runnable r = new Runnable() {...};
try {
ExecutorService executor = getExecutor();
executor.submit(r);
} catch (NamingException e) {
r.run();
}
}
...
}
JAX-RS 2.0 and Concurrency Utilities
13
JNDI lookup for
managed executor
JAX-RS 2.0: Time out!
14
@Path("cdiexecitemsTimeout")
public class ItemsCDIExecutorResourceTimeout {
...
public void getItems(@Suspended final AsyncResponse ar) {
ar.setTimeout(500, TimeUnit.MILLISECONDS);
ar.setTimeoutHandler(new TimeoutHandler() {
public void handleTimeout(AsyncResponse arg0) {
ar.resume(Response.ok("Backup plan!").build());
}
});
executor.submit(new Runnable() {
public void run() {
Collection<Item> result = itemService.listItems();
Response resp = Response.ok(result).build();
ar.resume(resp);
}
});
}
}
• Register callbacks on AsyncResponse:
• ConnectionCallback is optionally supported, YMMV
ar.register(new CompletionCallback() {
@Override
public void onComplete(Throwable t) {
System.out.println("DONE! ");
if ( t != null ) {
t.printStackTrace();
}
}
});
ar.register(new ConnectionCallback() {
@Override
public void onDisconnect(AsyncResponse ar) {
System.out.println("Disconnected: " + ar);
}
});
JAX-RS 2.0: Callbacks
15
Concurrency Utilities
• Extension of java.util.concurrent (familiar API)
• ManagedExecutorService
java:comp/DefaultManagedExecutorService
• ManagedScheduledExecutorService
java:comp/DefaultManagedScheduledExecutorService
• ManagedThreadFactory
java:comp/DefaultManagedThreadFactory
• ContextService
java:comp/DefaultContextService
• Container-friendly mechanisms to queue and manage work
• Java EE Context propagation
– JNDI, classloader, security, etc.
• Allows container to manage async work, too!
16
Non-blocking I/O
Servlet 3.1
Non-blocking I/O in Servlet 3.1
• Builds on Asynchronous processing from Servlet 3.0
• Only works for async-enabled apps
• Enables reading/writing data without blocking a thread
• ReadListener on ServletInputStream
• WriteListener on ServletOutputStream
• Best used with slow clients
• For clients that are slow to read data, use a WriteListener
• For clients that are slow to write data, use a ReadListener
18
Code Samples – Aync Servlet Listener
19
// start async
AsyncContext ac = request.startAsync();
// set up async listener
ac.addListener(new AsyncListener() {
@Override
public void onComplete(AsyncEvent event) throws IOException {
System.out.println("AsyncServlet onComplete() called");
}
@Override
public void onError(AsyncEvent event) {
System.out.println("AsyncServlet onError() " + event.getThrowable());
}
@Override
public void onStartAsync(AsyncEvent event) {
System.out.println("AsyncServlet onStartAsync()");
}
@Override
public void onTimeout(AsyncEvent event) {
System.out.println("AsyncServlet onTimeout()");
}
}, request, response);
Code Samples – Non-Blocking I/O
20
final ServletInputStream is = request.getInputStream();
// Start NIO Mode!! May only be called once…
// Can not use regular servlet input stream read/write after this
is.setReadListener(new AsyncReadListener(...));
public class AsyncReadListener implements ReadListener {
@Override
public void onDataAvailable() throws IOException {
System.out.println("AsyncReadListener: data available ");
}
@Override
public void onAllDataRead() throws IOException {
System.out.println("AsyncReadListener: All data read.. ");
}
@Override
public void onError(Throwable t) {
System.out.println("AsyncReadListener onError() " + t);
t.printStackTrace();
ac.complete();
}
}
Code Samples – Non-Blocking I/O
21
final ServletOutputStream os = response.getOutputStream();
// Start NIO Mode!! May only be called once…
// Can not use regular servlet input stream read/write after this
os.setWriteListener(new AsyncWriteListener(...));
public class AsyncWriteListener implements WriteListener {
@Override
public void onWritePossible() throws IOException {
System.out.println("AsyncWriteListener: onWritePossible.. ");
// At some point, you know you’re all done..
ac.complete();
}
@Override
public void onError(Throwable t) {
System.out.println("AsyncWriteListener onError() " + t);
t.printStackTrace();
ac.complete();
}
}
WebSocket API
Server Endpoint: Annotated
• Simple POJO with @ServerEndpoint annotation
• value is the URI relative to your app’s context root,
e.g. ws://localhost/myapp/SimpleAnnotated
• Annotations for notifications: lifecycle and messages
23
@ServerEndpoint(value = "/SimpleAnnotated")
public class SimpleEndpoint {
@OnOpen
public void onOpen(Session session, EndpointConfig ec) {
}
@OnClose
public void onClose(Session session, CloseReason reason) {
}
@OnMessage
public void receiveMessage(String message, Session session) {
}
@OnError
public void onError(Throwable t) {
}
}
Server Endpoint: Programmatic
• Class extends Endpoint
• Callback methods for lifecycle event notifications
• Message notifications require a MessageHandler
24
public class ExtendedEndpoint extends Endpoint {
@Override
public void onOpen(Session session, EndpointConfig ec) {
session.addMessageHandler(new MessageHandler.Whole<String>() {
@Override
public void onMessage(String message) {
}
});
}
@Override
public void onClose(Session session, CloseReason reason) {
}
@Override
public void onError(Session session, Throwable t) {
}
}
• @OnMessage method is called when a message is received
• If message is ‘stop’: close the session
• Otherwise, echo the message along with a hit count
• Broadcast – iterate over open sessions
int count = 0;
@OnMessage
public void receiveMessage(String message, Session session) throws IOException {
if ( "stop".equals(message) ) {
session.close();
} else {
int id = count++;
for (Session s : session.getOpenSessions() ) {
s.getBasicRemote().sendText("Echo " + id + ": " + message);
}
}
}
Simple echo + server provided data (using annotations)
25
@OnMessage
public void receiveMessage(final String message, final Session session)
throws IOException {
if ( "stop".equals(message) ) {
session.close();
} else {
System.out.println(message + ", " + executor);
final int id = count++;
broadcast(session, "Echo " + id + ": " + message);
executor.submit(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
}
broadcast(session, "Delayed " + id + ": " + message);
System.out.println("executor -- send " + message);
}
});
}
}
Simple echo + delay…
26
Notices and Disclaimers
Copyright © 2015 by International Business Machines Corporation (IBM). No part of this document may be reproduced or
transmitted in any form without written permission from IBM.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with
IBM.
Information in these presentations (including information relating to products that have not yet been announced by IBM) has been
reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM
shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY,
EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF
THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT
OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the
agreements under which they are provided.
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without
notice.
Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are
presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual
performance, cost, savings or other results in other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to make such products,
programs or services available in all countries in which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not
necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither
intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation.
It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal
counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s
business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or
represent or warrant that its services or products will ensure that the customer is in compliance with any law.
Notices and Disclaimers (con’t)
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products in connection with this
publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to
interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any
IBM patents, copyrights, trademarks or other intellectual property right.
• IBM, the IBM logo, ibm.com, Bluemix, Blueworks Live, CICS, Clearcase, DOORS®, Enterprise Document
Management System™, Global Business Services ®, Global Technology Services ®, Information on Demand,
ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™,
PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®,
pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, SoDA, SPSS, StoredIQ, Tivoli®, Trusteer®,
urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of
International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and
service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on
the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
Thank You
Your Feedback is
Important!
Access the InterConnect 2015
Conference CONNECT Attendee
Portal to complete your session
surveys from your smartphone,
laptop or conference kiosk.

More Related Content

What's hot

Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsi krishna
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
Joshua Long
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
Ryan Cuprak
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJS
Gunnar Hillert
 
Learn Oracle WebLogic Server 12c Administration
Learn Oracle WebLogic Server 12c AdministrationLearn Oracle WebLogic Server 12c Administration
Learn Oracle WebLogic Server 12c Administration
Revelation Technologies
 
Java servlets
Java servletsJava servlets
Java servletslopjuan
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
BG Java EE Course
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
sourabh aggarwal
 
The Spring Update
The Spring UpdateThe Spring Update
The Spring Update
Gunnar Hillert
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
Bruno Borges
 
Servlet
Servlet Servlet
Servlet
Dhara Joshi
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)
Ryan Cuprak
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
Fahmi Jafar
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
Emprovise
 
Gradle - Build System
Gradle - Build SystemGradle - Build System
Gradle - Build System
Jeevesh Pandey
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-web
C2B2 Consulting
 
Ajug - The Spring Update
Ajug - The Spring UpdateAjug - The Spring Update
Ajug - The Spring Update
Gunnar Hillert
 
Oracle WebLogic Server: Remote Monitoring and Management
Oracle WebLogic Server: Remote Monitoring and ManagementOracle WebLogic Server: Remote Monitoring and Management
Oracle WebLogic Server: Remote Monitoring and Management
Revelation Technologies
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1vikram singh
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
rajdeep
 

What's hot (20)

Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJS
 
Learn Oracle WebLogic Server 12c Administration
Learn Oracle WebLogic Server 12c AdministrationLearn Oracle WebLogic Server 12c Administration
Learn Oracle WebLogic Server 12c Administration
 
Java servlets
Java servletsJava servlets
Java servlets
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
 
The Spring Update
The Spring UpdateThe Spring Update
The Spring Update
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
 
Servlet
Servlet Servlet
Servlet
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Gradle - Build System
Gradle - Build SystemGradle - Build System
Gradle - Build System
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-web
 
Ajug - The Spring Update
Ajug - The Spring UpdateAjug - The Spring Update
Ajug - The Spring Update
 
Oracle WebLogic Server: Remote Monitoring and Management
Oracle WebLogic Server: Remote Monitoring and ManagementOracle WebLogic Server: Remote Monitoring and Management
Oracle WebLogic Server: Remote Monitoring and Management
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 

Viewers also liked

IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
ibmwebspheresoftware
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Arun Gupta
 
Liberty management
Liberty managementLiberty management
Liberty management
WASdev Community
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
WASdev Community
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs TomcatWebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
WASdev Community
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
HanoiJUG
 
WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)
Roman Kharkovski
 
Liberty Deep Dive
Liberty Deep DiveLiberty Deep Dive
Liberty Deep Dive
WASdev Community
 

Viewers also liked (8)

IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
IBM WebSphere Application Foundation Sessions at IBM InterConnect 2015
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
 
Liberty management
Liberty managementLiberty management
Liberty management
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs TomcatWebSphere App Server vs JBoss vs WebLogic vs Tomcat
WebSphere App Server vs JBoss vs WebLogic vs Tomcat
 
Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)WAS vs JBoss, WebLogic, Tomcat (year 2015)
WAS vs JBoss, WebLogic, Tomcat (year 2015)
 
Liberty Deep Dive
Liberty Deep DiveLiberty Deep Dive
Liberty Deep Dive
 

Similar to Don't Wait! Develop Responsive Applications with Java EE7 Instead

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
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
Tomáš Kypta
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
Tomáš Kypta
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
Rick Warren
 
Arquitecturas de microservicios - Medianet Software
Arquitecturas de microservicios   -  Medianet SoftwareArquitecturas de microservicios   -  Medianet Software
Arquitecturas de microservicios - Medianet Software
Ernesto Hernández Rodríguez
 
RESTEasy
RESTEasyRESTEasy
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
JBug Italy
 
ASP.Net 5 and C# 6
ASP.Net 5 and C# 6ASP.Net 5 and C# 6
ASP.Net 5 and C# 6
Andy Butland
 
Durable functions 2.0 (2019-10-10)
Durable functions 2.0 (2019-10-10)Durable functions 2.0 (2019-10-10)
Durable functions 2.0 (2019-10-10)
Paco de la Cruz
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Codemotion
 
Azure Durable Functions (2019-03-30)
Azure Durable Functions (2019-03-30) Azure Durable Functions (2019-03-30)
Azure Durable Functions (2019-03-30)
Paco de la Cruz
 
Introduction tomcat7 servlet3
Introduction tomcat7 servlet3Introduction tomcat7 servlet3
Introduction tomcat7 servlet3
JavaEE Trainers
 
Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
Sam Brannen
 
Async servers and clients in Rest.li
Async servers and clients in Rest.liAsync servers and clients in Rest.li
Async servers and clients in Rest.li
Karan Parikh
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
javatwo2011
 
Non Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaNon Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJava
Frank Lyaruu
 
Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2
JollyRogers5
 
Cloud native programming model comparison
Cloud native programming model comparisonCloud native programming model comparison
Cloud native programming model comparison
Emily Jiang
 

Similar to Don't Wait! Develop Responsive Applications with Java EE7 Instead (20)

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
 
Modern Android app library stack
Modern Android app library stackModern Android app library stack
Modern Android app library stack
 
Reactive programming on Android
Reactive programming on AndroidReactive programming on Android
Reactive programming on Android
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
Arquitecturas de microservicios - Medianet Software
Arquitecturas de microservicios   -  Medianet SoftwareArquitecturas de microservicios   -  Medianet Software
Arquitecturas de microservicios - Medianet Software
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
 
ASP.Net 5 and C# 6
ASP.Net 5 and C# 6ASP.Net 5 and C# 6
ASP.Net 5 and C# 6
 
Durable functions 2.0 (2019-10-10)
Durable functions 2.0 (2019-10-10)Durable functions 2.0 (2019-10-10)
Durable functions 2.0 (2019-10-10)
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
Going fullstack React(ive) - Paulo Lopes - Codemotion Amsterdam 2017
 
Azure Durable Functions (2019-03-30)
Azure Durable Functions (2019-03-30) Azure Durable Functions (2019-03-30)
Azure Durable Functions (2019-03-30)
 
Introduction tomcat7 servlet3
Introduction tomcat7 servlet3Introduction tomcat7 servlet3
Introduction tomcat7 servlet3
 
Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6Tamir Dresher - What’s new in ASP.NET Core 6
Tamir Dresher - What’s new in ASP.NET Core 6
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Async servers and clients in Rest.li
Async servers and clients in Rest.liAsync servers and clients in Rest.li
Async servers and clients in Rest.li
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
Non Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJavaNon Blocking I/O for Everyone with RxJava
Non Blocking I/O for Everyone with RxJava
 
Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2
 
Cloud native programming model comparison
Cloud native programming model comparisonCloud native programming model comparison
Cloud native programming model comparison
 

More from WASdev Community

AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
WASdev Community
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
WASdev Community
 
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudAAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
WASdev Community
 
ASZ-3034 Build a WebSphere Linux Cloud on System z: From Roll-Your-Own to Pre...
ASZ-3034 Build a WebSphere Linux Cloud on System z: From Roll-Your-Own to Pre...ASZ-3034 Build a WebSphere Linux Cloud on System z: From Roll-Your-Own to Pre...
ASZ-3034 Build a WebSphere Linux Cloud on System z: From Roll-Your-Own to Pre...
WASdev Community
 
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
WASdev Community
 
AAI-2236 Using the new Java Concurrency Utilities with IBM WebSphere
AAI-2236 Using the new Java Concurrency Utilities with IBM WebSphereAAI-2236 Using the new Java Concurrency Utilities with IBM WebSphere
AAI-2236 Using the new Java Concurrency Utilities with IBM WebSphere
WASdev Community
 
AAI-2235 Open JPA and EclipseLink Usage Scenarios Explained
AAI-2235 Open JPA and EclipseLink Usage Scenarios ExplainedAAI-2235 Open JPA and EclipseLink Usage Scenarios Explained
AAI-2235 Open JPA and EclipseLink Usage Scenarios Explained
WASdev Community
 
AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7
WASdev Community
 
Deploy, Monitor and Manage in Style with WebSphere Liberty Admin Center
Deploy, Monitor and Manage in Style with WebSphere Liberty Admin CenterDeploy, Monitor and Manage in Style with WebSphere Liberty Admin Center
Deploy, Monitor and Manage in Style with WebSphere Liberty Admin Center
WASdev Community
 
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaAAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
WASdev Community
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
WASdev Community
 
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
WASdev Community
 
AAI-1305 Choosing WebSphere Liberty for Java EE Deployments
AAI-1305 Choosing WebSphere Liberty for Java EE DeploymentsAAI-1305 Choosing WebSphere Liberty for Java EE Deployments
AAI-1305 Choosing WebSphere Liberty for Java EE Deployments
WASdev Community
 
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
AAI-1304 Technical Deep-Dive into IBM WebSphere LibertyAAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
WASdev Community
 
Planning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMPlanning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMWASdev Community
 
Arduinos, application servers, and me: Adventures in and out of the cloud
Arduinos, application servers, and me: Adventures in and out of the cloudArduinos, application servers, and me: Adventures in and out of the cloud
Arduinos, application servers, and me: Adventures in and out of the cloud
WASdev Community
 

More from WASdev Community (16)

AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
 
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudAAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
 
ASZ-3034 Build a WebSphere Linux Cloud on System z: From Roll-Your-Own to Pre...
ASZ-3034 Build a WebSphere Linux Cloud on System z: From Roll-Your-Own to Pre...ASZ-3034 Build a WebSphere Linux Cloud on System z: From Roll-Your-Own to Pre...
ASZ-3034 Build a WebSphere Linux Cloud on System z: From Roll-Your-Own to Pre...
 
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
 
AAI-2236 Using the new Java Concurrency Utilities with IBM WebSphere
AAI-2236 Using the new Java Concurrency Utilities with IBM WebSphereAAI-2236 Using the new Java Concurrency Utilities with IBM WebSphere
AAI-2236 Using the new Java Concurrency Utilities with IBM WebSphere
 
AAI-2235 Open JPA and EclipseLink Usage Scenarios Explained
AAI-2235 Open JPA and EclipseLink Usage Scenarios ExplainedAAI-2235 Open JPA and EclipseLink Usage Scenarios Explained
AAI-2235 Open JPA and EclipseLink Usage Scenarios Explained
 
AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7AAI-1713 Introduction to Java EE 7
AAI-1713 Introduction to Java EE 7
 
Deploy, Monitor and Manage in Style with WebSphere Liberty Admin Center
Deploy, Monitor and Manage in Style with WebSphere Liberty Admin CenterDeploy, Monitor and Manage in Style with WebSphere Liberty Admin Center
Deploy, Monitor and Manage in Style with WebSphere Liberty Admin Center
 
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing WorkloaAAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
AAI-2075 Evolving an IBM WebSphere Topology to Manage a Changing Workloa
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
 
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
AAI-2013 Preparing to Fail: Practical WebSphere Application Server High Avail...
 
AAI-1305 Choosing WebSphere Liberty for Java EE Deployments
AAI-1305 Choosing WebSphere Liberty for Java EE DeploymentsAAI-1305 Choosing WebSphere Liberty for Java EE Deployments
AAI-1305 Choosing WebSphere Liberty for Java EE Deployments
 
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
AAI-1304 Technical Deep-Dive into IBM WebSphere LibertyAAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
 
Planning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMPlanning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPM
 
Arduinos, application servers, and me: Adventures in and out of the cloud
Arduinos, application servers, and me: Adventures in and out of the cloudArduinos, application servers, and me: Adventures in and out of the cloud
Arduinos, application servers, and me: Adventures in and out of the cloud
 

Recently uploaded

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 

Recently uploaded (20)

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 

Don't Wait! Develop Responsive Applications with Java EE7 Instead

  • 1. © 2015 IBM Corporation Don't Wait! Develop Responsive Applications with Java EE7 Instead Session 3085 Erin Schnabel Liberty Profile Development Lead, IBM @ebullientworks
  • 2. Focus on the server side • “Responsive” application • Throughput is king (or queen) • Should be able to handle as many requests as we can! • Maximize resource utilization • Make the best use of allocated resources • Take advantage of tiered services • Technologies in EE7 can help • JAX-RS 2.0 async processing • Concurrency Utilities (JSR-236) • WebSocket API (JSR-356) • Non-blocking I/O added in Servlet 3.1 1
  • 4. Rich Client Native HTML5 Web SPA (Javascript) “Modern Web Application” -- REST 3 REST API ** Business Logic ** Hybrid
  • 5. A (very) simple JAX-RS example @Path(”items") public class ItemResource { // various ways to get this guy, play nice and assume we have one protected ItemService itemService; @GET @Produces(MediaType.APPLICATION_JSON) public Collection<Item> listItems() { return itemService.listItems(); } @POST @Consumes(MediaType.APPLICATION_JSON) public void addItem(Item item) { itemService.addItem(item); } ... } 4
  • 6. A (very) simple JAX-RS example @Path(”items") public class ItemResource { // various ways to get this guy, play nice and assume we have one protected ItemService itemService; @GET @Produces(MediaType.APPLICATION_JSON) public Collection<Item> listItems() { return itemService.listItems(); } @POST @Consumes(MediaType.APPLICATION_JSON) public void addItem(Item item) { itemService.addItem(item); } ... } 5 What if this is an encapsulation of a remote service?
  • 7. A (very) simple JAX-RS example @Path(”items") public class ItemResource { // various ways to get this guy, play nice and assume we have one protected ItemService itemService; @GET @Produces(MediaType.APPLICATION_JSON) public Collection<Item> listItems() { return itemService.listItems(); } @POST @Consumes(MediaType.APPLICATION_JSON) public void addItem(Item item) { itemService.addItem(item); } ... } 6 What if this is an encapsulation of a remote service? Not much changes from the client point of view: they will make a request and wait for the response either way…
  • 8. A (very) simple JAX-RS example @Path(”items") public class ItemResource { // various ways to get this guy, play nice and assume we have one protected ItemService itemService; @GET @Produces(MediaType.APPLICATION_JSON) public Collection<Item> listItems() { return itemService.listItems(); } @POST @Consumes(MediaType.APPLICATION_JSON) public void addItem(Item item) { itemService.addItem(item); } ... } 7 What if this is an encapsulation of a remote service? Not much changes from the client point of view: they will make a request and wait for the response either way… If the remote service operation takes awhile, this server thread… … just sits there… … waiting…
  • 9. • AsyncResponse.resume(…) to send the response to the client. • @Suspended annotation with AsyncResponse parameter • void return type (to allow this method to return immediately) • “suspend” the connection -- NOT DISCONNECTED! @GET @Produces(MediaType.APPLICATION_JSON) public void getItems(@Suspended final AsyncResponse ar) { Collection<Item> result = itemService.listItems(); ar.resume(result ); } JAX-RS 2.0: Asynchronous processing 8
  • 10. • AsyncResponse.resume(…) to send the response to the client. • @Suspended annotation with AsyncResponse parameter • void return type (to allow this method to return immediately) • “suspend” the connection -- NOT DISCONNECTED! @GET @Produces(MediaType.APPLICATION_JSON) public void getItems(@Suspended final AsyncResponse ar) { Collection<Item> result = itemService.listItems(); ar.resume(result ); } JAX-RS 2.0: Asynchronous processing 9 Hmm…I don’t see any threading stuff. How is this asynchronous? Good catch! So far, all we’ve achieved is parity with what we had before… Choices, choices. How to queue long-running work onto a different thread?
  • 11. JAX-RS 2.0 and…. 10 @GET @Produces(MediaType.APPLICATION_JSON) public void getItems(@Suspended final AsyncResponse ar) { Executors.newSingleThreadExecutor().submit(new Runnable() { Collection<Item> result = itemService.listItems(); Response resp = Response.ok(result).build(); ar.resume(resp); }); } This would totally work: The long-running operation is definitely on a different thread. Hopefully we also know that this is a horrible idea! #notcontainerfriendly
  • 12. • For an EJB, use the @Asynchronous method annotation. JAX-RS 2.0 and EJB 11 The EJB Container will dispatch to a different thread before invoking the method. @Stateless @Path("ejbitems") public class ItemEJBResource { ... @GET @Asynchronous @Produces(MediaType.APPLICATION_JSON) public void getItems(@Suspended final AsyncResponse ar) { Collection<Item> result = itemService.listItems(); Response resp = Response.ok(result).build(); ar.resume(resp); } ... }
  • 13. JAX-RS 2.0 and CDI and Concurrency Utilities 12 • Enable CDI (beans.xml), and have an Executor provided @Path("cdiexecitems") public class ItemsCDIExecutorResource { ... @Resource ManagedExecutorService executor; @GET @Produces(MediaType.APPLICATION_JSON) public void getItems(@Suspended final AsyncResponse ar) { executor.submit(new Runnable() { public void run() { Collection<Item> result = itemService.listItems(); Response resp = Response.ok(result).build(); ar.resume(resp); } }); } }
  • 14. @Path("execitems") public class ItemsExecutorResource { private ExecutorService getExecutor() throws NamingException { return (ExecutorService) new InitialContext() .lookup("java:comp/DefaultManagedExecutorService"); } @GET @Produces(MediaType.APPLICATION_JSON) public void getItems(@Suspended final AsyncResponse ar) { Runnable r = new Runnable() {...}; try { ExecutorService executor = getExecutor(); executor.submit(r); } catch (NamingException e) { r.run(); } } ... } JAX-RS 2.0 and Concurrency Utilities 13 JNDI lookup for managed executor
  • 15. JAX-RS 2.0: Time out! 14 @Path("cdiexecitemsTimeout") public class ItemsCDIExecutorResourceTimeout { ... public void getItems(@Suspended final AsyncResponse ar) { ar.setTimeout(500, TimeUnit.MILLISECONDS); ar.setTimeoutHandler(new TimeoutHandler() { public void handleTimeout(AsyncResponse arg0) { ar.resume(Response.ok("Backup plan!").build()); } }); executor.submit(new Runnable() { public void run() { Collection<Item> result = itemService.listItems(); Response resp = Response.ok(result).build(); ar.resume(resp); } }); } }
  • 16. • Register callbacks on AsyncResponse: • ConnectionCallback is optionally supported, YMMV ar.register(new CompletionCallback() { @Override public void onComplete(Throwable t) { System.out.println("DONE! "); if ( t != null ) { t.printStackTrace(); } } }); ar.register(new ConnectionCallback() { @Override public void onDisconnect(AsyncResponse ar) { System.out.println("Disconnected: " + ar); } }); JAX-RS 2.0: Callbacks 15
  • 17. Concurrency Utilities • Extension of java.util.concurrent (familiar API) • ManagedExecutorService java:comp/DefaultManagedExecutorService • ManagedScheduledExecutorService java:comp/DefaultManagedScheduledExecutorService • ManagedThreadFactory java:comp/DefaultManagedThreadFactory • ContextService java:comp/DefaultContextService • Container-friendly mechanisms to queue and manage work • Java EE Context propagation – JNDI, classloader, security, etc. • Allows container to manage async work, too! 16
  • 19. Non-blocking I/O in Servlet 3.1 • Builds on Asynchronous processing from Servlet 3.0 • Only works for async-enabled apps • Enables reading/writing data without blocking a thread • ReadListener on ServletInputStream • WriteListener on ServletOutputStream • Best used with slow clients • For clients that are slow to read data, use a WriteListener • For clients that are slow to write data, use a ReadListener 18
  • 20. Code Samples – Aync Servlet Listener 19 // start async AsyncContext ac = request.startAsync(); // set up async listener ac.addListener(new AsyncListener() { @Override public void onComplete(AsyncEvent event) throws IOException { System.out.println("AsyncServlet onComplete() called"); } @Override public void onError(AsyncEvent event) { System.out.println("AsyncServlet onError() " + event.getThrowable()); } @Override public void onStartAsync(AsyncEvent event) { System.out.println("AsyncServlet onStartAsync()"); } @Override public void onTimeout(AsyncEvent event) { System.out.println("AsyncServlet onTimeout()"); } }, request, response);
  • 21. Code Samples – Non-Blocking I/O 20 final ServletInputStream is = request.getInputStream(); // Start NIO Mode!! May only be called once… // Can not use regular servlet input stream read/write after this is.setReadListener(new AsyncReadListener(...)); public class AsyncReadListener implements ReadListener { @Override public void onDataAvailable() throws IOException { System.out.println("AsyncReadListener: data available "); } @Override public void onAllDataRead() throws IOException { System.out.println("AsyncReadListener: All data read.. "); } @Override public void onError(Throwable t) { System.out.println("AsyncReadListener onError() " + t); t.printStackTrace(); ac.complete(); } }
  • 22. Code Samples – Non-Blocking I/O 21 final ServletOutputStream os = response.getOutputStream(); // Start NIO Mode!! May only be called once… // Can not use regular servlet input stream read/write after this os.setWriteListener(new AsyncWriteListener(...)); public class AsyncWriteListener implements WriteListener { @Override public void onWritePossible() throws IOException { System.out.println("AsyncWriteListener: onWritePossible.. "); // At some point, you know you’re all done.. ac.complete(); } @Override public void onError(Throwable t) { System.out.println("AsyncWriteListener onError() " + t); t.printStackTrace(); ac.complete(); } }
  • 24. Server Endpoint: Annotated • Simple POJO with @ServerEndpoint annotation • value is the URI relative to your app’s context root, e.g. ws://localhost/myapp/SimpleAnnotated • Annotations for notifications: lifecycle and messages 23 @ServerEndpoint(value = "/SimpleAnnotated") public class SimpleEndpoint { @OnOpen public void onOpen(Session session, EndpointConfig ec) { } @OnClose public void onClose(Session session, CloseReason reason) { } @OnMessage public void receiveMessage(String message, Session session) { } @OnError public void onError(Throwable t) { } }
  • 25. Server Endpoint: Programmatic • Class extends Endpoint • Callback methods for lifecycle event notifications • Message notifications require a MessageHandler 24 public class ExtendedEndpoint extends Endpoint { @Override public void onOpen(Session session, EndpointConfig ec) { session.addMessageHandler(new MessageHandler.Whole<String>() { @Override public void onMessage(String message) { } }); } @Override public void onClose(Session session, CloseReason reason) { } @Override public void onError(Session session, Throwable t) { } }
  • 26. • @OnMessage method is called when a message is received • If message is ‘stop’: close the session • Otherwise, echo the message along with a hit count • Broadcast – iterate over open sessions int count = 0; @OnMessage public void receiveMessage(String message, Session session) throws IOException { if ( "stop".equals(message) ) { session.close(); } else { int id = count++; for (Session s : session.getOpenSessions() ) { s.getBasicRemote().sendText("Echo " + id + ": " + message); } } } Simple echo + server provided data (using annotations) 25
  • 27. @OnMessage public void receiveMessage(final String message, final Session session) throws IOException { if ( "stop".equals(message) ) { session.close(); } else { System.out.println(message + ", " + executor); final int id = count++; broadcast(session, "Echo " + id + ": " + message); executor.submit(new Runnable() { @Override public void run() { try { Thread.sleep(500); } catch (InterruptedException e) { } broadcast(session, "Delayed " + id + ": " + message); System.out.println("executor -- send " + message); } }); } } Simple echo + delay… 26
  • 28. Notices and Disclaimers Copyright © 2015 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM. Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided. Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice. Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary. References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business. Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation. It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law.
  • 29. Notices and Disclaimers (con’t) Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right. • IBM, the IBM logo, ibm.com, Bluemix, Blueworks Live, CICS, Clearcase, DOORS®, Enterprise Document Management System™, Global Business Services ®, Global Technology Services ®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, SoDA, SPSS, StoredIQ, Tivoli®, Trusteer®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
  • 30. Thank You Your Feedback is Important! Access the InterConnect 2015 Conference CONNECT Attendee Portal to complete your session surveys from your smartphone, laptop or conference kiosk.

Editor's Notes

  1. The “modern web application” has several possible front-ends: Rich-client applications written for use on the desktop (still around!) Single Page Applications enabled by Javascript frameworks like Angular, Backbone, Knockout, Meteor, etc., Native applications for smartphones and tablets, and Hybrid applications which bridge the two (often native stubs for HTML5 SPA) All of these possible front-end clients make REST over HTTP requests to the common backend…  CRUD operations  Reasonable approach for most resource (CRUD)-oriented applications Of course, the backend is where the interesting stuff (at least with respect to this session) happens.
  2. If you are submitting the async work via an executor, you can set a timeout, and optionally register a timeout handler. If a handler isn’t present, a ServiceUnavailableException will be thrown with status code 503. The TimeoutHandler is given the AsyncResponse as a parameter, which must still be resumed to send a response back to the client. The AsyncResponse can also be cancelled, with an accompanying indication of how long a client should wait before retrying. A cancelled AsyncResponse sends a 503 / Service Unvaliable response to the client.
  3. If you are submitting the async work via an executor, you can set a timeout, and optionally register a timeout handler. If a handler isn’t present, a ServiceUnavailableException will be thrown with status code 503. The TimeoutHandler is given the AsyncResponse as a parameter, which must still be resumed to send a response back to the client.
  4. Unmanaged threads and timers can cause problems for containers: they inhibit an app server’s ability to track and manage resources. Concurrency Utilities provided in EE7 extend the mechanisms java.util.concurrent to provide a familiar API to applications that allows easy creation of container-managed resources to support async activities. Java EE Concurrency utilities provide context propagation, so that new threads inherit the container thread context of the originating application component thread (which is important for referencing other EE).
  5. By default, a new instance of server endpoint is instantiated for each client connection (section 3.1.7 of JSR 356 specification). In other words, by default, WebSocket is "Single Thread Model".
  6. The API includes a MessageHandler for Whole and Partial messages Each web socket session uses no more than one thread at a time to call its MessageHandlers. This means that, provided each message handler instance is used to handle messages for one web socket session, at most one thread at a time can be calling any of its methods. A single handler can be shared between sessions: it would then have to deal with concurrency
  7. @OnMessage methods are single threaded for an endpoint… Note the broadcast! Easy as pie to send the same data around to different sessions. Also note that each connection will have it’s own Endpoint instance, but that instances can see each other through sessions: Endpoints are not thread safe, but Sessions are.
  8. @OnMessage methods are single threaded for an endpoint… Note the broadcast! Easy as pie to send the same data around to different sessions. Also note that each connection will have it’s own Endpoint instance, but that instances can see each other through sessions: Endpoints are not thread safe, but Sessions are.