SlideShare a Scribd company logo
1 of 41
Download to read offline
CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE
Embrace 
and 
Get 
Addicted 
to 
the 
Asynchronicity 
of 
EE 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Think 
Async 
Masoud 
Kalali, 
SoEware 
Engineer, 
ORACLE, 
@MasoudKalal
Safe 
Harbor 
Statement 
The 
following 
is 
intended 
to 
outline 
our 
general 
product 
direcNon. 
It 
is 
intended 
for 
informaNon 
purposes 
only, 
and 
may 
not 
be 
incorporated 
into 
any 
contract. 
It 
is 
not 
a 
commitment 
to 
deliver 
any 
material, 
code, 
or 
funcNonality, 
and 
should 
not 
be 
relied 
upon 
in 
making 
purchasing 
decisions. 
The 
development, 
release, 
and 
Nming 
of 
any 
features 
or 
funcNonality 
described 
for 
Oracle’s 
products 
remains 
at 
the 
sole 
discreNon 
of 
Oracle. 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
|
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
IntroducNon 
Why 
to 
think 
Async 
A 
simple 
case 
of 
using 
Async 
JMS 
(2.0) 
Async 
Servlet 
Async 
JAX-­‐RS 
Async 
EJBs 
1 
2 
3 
4 
5 
6 
7
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Speakers 
Masoud 
Kalali 
• SoEware 
engineer, 
author, 
blogger 
• Long 
advocate 
of 
GlassFish 
and 
Java 
EE 
• Tweets 
at 
@MasoudKalali
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Why 
to 
think 
Async? 
• To 
be]er 
model 
what 
we 
develop 
for 
• To 
further 
decouple 
– Ease 
of 
administraNon 
– Ease 
of 
tuning 
– Ease 
of 
maintenance 
• Improve 
consumers 
experience 
– An 
API 
consumer 
– A 
direct 
GUI 
for 
human 
use 
– etc.
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Java 
EE 
And 
ASynchronicity 
• Long 
present 
JMS 
– To 
be 
used 
almost 
everywhere 
• Servlet 
3.0/ 
3.1 
– Asynchronous 
Servlets 
– None 
blocking 
IO 
• JAX-­‐RS 
2.0 
– Server 
side 
– Client 
side 
• Asynchronous 
Session 
Beans 
– Server 
side 
– Client 
side
A 
simple 
asynchronous 
nourished 
use 
case 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Client 
Async 
Servlet 
Cache 
Query 
Processor 
JMS 
Queue 
JMS 
Queue 
MDB 
ID, 
AsyncContext 
Query 
Requests 
in 
JMS 
Chunks 
Consume 
result 
chunks 
and 
of 
Query 
results 
1 
send 
it 
back 
via 
AsyncContext 
1 
2.1 
3 
2 
4…. 
8…. 
7…. 
6…. 
5…. 
No 
HA/Fault 
tolerance 
considered, 
This 
Is 
a 
very 
basic 
block 
diagram 
to 
help 
with 
the 
presentaNon
A 
simple 
asynchronous 
nourished 
use 
case 
More 
details 
of 
the 
Messaging 
components 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• One 
JMS 
queue 
for 
sending 
the 
query 
requests 
• One 
JMS 
queue 
which 
will 
get 
chunks 
of 
query 
results 
• An 
MDB 
which 
will 
consume 
the 
query 
result 
messages 
– Uses 
the 
cache 
and 
the 
id 
in 
the 
message 
to 
pick 
up 
the 
right 
AsyncContext 
– As 
long 
as 
the 
message 
does 
not 
say 
it 
is 
done 
it 
will 
not 
conclude 
the 
response 
• Complete 
the 
response 
when 
JMS 
message 
implies
A 
simple 
asynchronous 
nourished 
use 
case 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
More 
details 
of 
the 
Servlet 
components 
• Asynchronous 
Servlet 
receiving 
the 
requests 
• Caching 
the 
AsynContext 
and 
a 
query 
Id 
• Sending 
the 
Query 
message 
to 
the 
JMS 
queue 
– Including 
the 
query 
Id 
• Leave 
it 
to 
the 
MDB 
to 
update 
the 
response 
• Have 
a 
AsyncListener 
to 
send 
proper 
response 
if 
Nmeouts
A 
simple 
asynchronous 
nourished 
use 
case 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Some 
basics 
on 
the 
client 
side 
• A 
browser 
• Can 
be 
– A 
SSE 
client 
– A 
COMET, 
Long 
Polling 
request
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
JMS 
(2.0) 
A 
brief 
overview
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
JMS: 
A 
brief 
overview 
I 
• Broker 
• Message 
• Queue 
– Producers 
– Consumers 
• Topic 
– Publishers 
– Subscribers 
• Accessible 
from 
inside 
or 
outside 
a 
Java 
EE
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
JMS 
2.0: 
A 
brief 
overview: 
• MulNple 
Consumers 
Allowed 
on 
the 
Same 
Topic 
SubscripNon 
• Delivery 
Delay 
• Sending 
Messages 
Asynchronously 
– Send 
the 
message 
and 
get 
callback 
when 
it 
is 
acknowledged 
by 
broker 
• JMSXDeliveryCount 
message 
property 
No 
longer 
opNonal 
• Standard 
MDB 
ConfiguraNon 
ProperNes 
as 
part 
of 
@MessageDriven 
– desNnaNonType 
– subscripNonDurability 
– acknowledgeMode 
– subscripNonName 
– ...
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Servlet 
3.0 
Asynchronous 
servlet
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Servlet 
3.0 
Asynchronicity 
• Why 
we 
want 
it 
– More 
throughput 
– Be]er 
architecture 
mapping 
• How 
it 
works 
– @WebServlet.asyncSupported, 
async-­‐supported 
in 
XML 
config! 
– AsyncContext 
– AsyncListener
Servlet 
3.0 
Asynchronicity 
: 
AsyncContext 
• Adding 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
listeners 
• Doing 
request 
dispatching 
• Accessing 
ServletRequest 
• Accessing 
ServletResponse 
• Concluding 
the 
request/response 
• Semng, 
gemng 
Nmeouts
Servlet 
3.0 
Asynchronicity 
: 
AsyncListener 
• Get 
callback 
on 
important 
events 
on 
an 
async 
request 
processing 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• onComplete(AsyncEvent 
asyncEvent) 
• onError(AsyncEvent 
asyncEvent) 
• onStartAsync(AsyncEvent 
asyncEvent) 
• onTimeout(AsyncEvent 
asyncEvent)
Servlet 
3.0 
Asynchronicity 
: 
A 
li]le 
bit 
of 
code 
@WebServlet(asyncSupported 
= 
true, 
value 
= 
”/query-­‐servlet") 
public 
class 
QueryServlet 
extends 
H]pServlet 
{ 
protected 
void 
doGet(H]pServletRequest 
request, 
H]pServletResponse 
response) 
throws 
ServletExcepNon, 
IOExcepNon 
{ 
String 
id=...; 
cache.put(id,request.startAsync()); 
sendQueryMessage(id, 
request); 
} 
} 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
|
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Servlet 
3.1 
Non-­‐blocking 
IO
Servlet 
3.1: 
Non-­‐Blocking 
IO 
• Why 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
do 
we 
want 
it? 
• How 
does 
it 
work? 
– ReadListener: 
To 
read 
inbound 
data 
when 
available 
– WriteListener: 
To 
write 
data 
when 
possible 
– Changes 
in 
ServletOutputStream 
• isReady() 
• setWriteListener(…) 
– Changes 
in 
ServletInputStream 
• isFinished() 
• isReady() 
• setReadListener(…)
Servlet 
3.1: 
Non-­‐Blocking 
IO: 
ReadListener 
• To 
get 
callbacks 
on 
ServletInputStream 
events 
– onDataAvailable 
– OnAllDataRead 
– onError 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
|
Servlet 
3.1: 
Non-­‐Blocking 
IO: 
WriteListener 
• To 
get 
noNfied 
on 
ServletOutputStream 
events 
– onError 
– onWritePossible 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
|
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Asyncronicity 
in 
JAX-­‐RS 
2.0 
• Why 
would 
we 
need 
it? 
• How 
does 
it 
work? 
– @Asynchronous 
– ExecuNonContext 
for 
programmaNc 
decision 
to 
do 
or 
not 
to 
do 
async 
– AsyncResponse 
– @Suspended 
– CompleNonCallback 
– ConnecNonCallbck
Asyncronicity 
in 
JAX-­‐RS 
2.0: 
Server-­‐side 
I 
How 
to 
mark 
a 
resource 
as 
Asynchronous 
• On 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
the 
serverside: 
– @Asynchronous: 
Annotate 
a 
sub-­‐resource 
as 
Asynchronous 
– AsyncResponse: 
Provides 
results 
an 
acNons 
on 
the 
running 
request 
• semng 
Nmeout 
• registering 
callbacks 
• resume, 
cancel 
suspended 
request 
processing 
• updaNng 
the 
response 
– @Suspended: 
To 
inject 
a 
suspended 
AsyncResponse 
into 
a 
sub-­‐resource 
parameter
Asyncronicity 
in 
JAX-­‐RS 
2.0: 
Server-­‐side 
simple 
code 
Server 
Code: 
@Path("/api/query") 
public 
class 
MyResource 
{ 
@Context 
private 
ExecuUonContext 
ctx; 
@GET 
@Produce(“applicaUon/json”) 
@Asynchronous 
@Path(“api/matching-­‐query”) 
public 
void 
prepMatchingQueryResult(@Suspended 
AsyncResponse 
ar, 
@QueryParam 
String 
p1… 
) 
{ 
executor.submit( 
new 
Runnable() 
{ 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
public 
void 
run() 
{ 
JsonObject 
response 
= 
getQueryResult(p1…); 
ctx.resume(response); 
//container 
thread 
picks 
up 
and 
conUnue 
} 
}); 
ctx.suspend(); 
// 
Suspend 
connecUon 
and 
return 
} 
… 
}
Asyncronicity 
in 
JAX-­‐RS 
2.0: 
client-­‐side 
simple 
code 
Future<JsonObject> 
future 
= 
client. 
target(“/api/query/matching-­‐ 
query”).queryParam(...).request().async().get(JsonObject.class); 
try 
{ 
JsonObject 
queryResult 
= 
future.get(30, 
TimeUnit.SECONDS); 
} 
catch 
(TimeoutExcepNon 
ex) 
{ 
// 
} 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Client-­‐Side 
with 
future
Asyncronicity 
in 
JAX-­‐RS 
2.0: 
client-­‐side 
simple 
code 
Client-­‐Side 
with 
callback 
Future<JsonObject> 
future 
= 
client. 
target(“/api/query/matching-­‐query”). 
queryParam(...).request().async().get(new 
InvocaNonCallback<JsonObject>() 
{ 
@Override 
public 
void 
completed(JsonObject 
response) 
{ 
//InvocaNon 
happens 
and 
some 
response 
is 
back 
(404, 
200, 
etc.) 
} 
@Override 
public 
void 
failed(Throwable 
throwable) 
{ 
//InvocaNon 
fails 
(client 
side) 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
} 
});
Asyncronicity 
in 
JAX-­‐RS 
2.0: 
Server-­‐side 
II 
• Single 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
CompleUonCallback 
method 
interface 
• void 
onComplete(Throwable 
t) 
• signal 
compleNon 
of 
serving 
a 
request
Asyncronicity 
in 
JAX-­‐RS 
2.0: 
Server-­‐side 
III 
• Single 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
ConnecUonCallback 
method 
interface 
• void 
onDisconnect(AsyncResponse 
disconnected) 
• signals 
interrupNon 
in 
client 
connecNon 
before 
compleNon
Asynchronous 
And 
long 
running 
jobs 
in 
REST 
Don’t 
keep 
unnecessary 
resources 
for 
where 
not 
needed! 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• MulN-­‐step 
long 
running 
jobs 
not 
suitable 
with 
JAX-­‐RS 
Async 
• Send 
202 
where 
response 
is 
not 
ready 
with 
LocaNon 
header 
– Intelligent 
enough 
client 
can 
query 
the 
resource 
LocaUon 
with 
the 
given 
Retry-­‐Ader 
header
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
EJB 
3.1 
Asynchronicity 
in 
Session 
Beans
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Asynchronicity 
in 
EJB 
3.1 
• Works 
on 
session 
beans 
– fire 
and 
forget 
– Using 
Future<V> 
to 
decide 
on 
compleNon 
• AsyncResult 
as 
container 
specific 
vehicle 
– Passes 
the 
result 
to 
Future<V> 
• As 
simple 
as 
using 
@Asynchronous 
on 
method/bean 
• Method 
should 
return 
Future<V> 
• Client 
can 
poll 
the 
future 
for 
CompleNon
Asynchronicity 
in 
EJB 
3.1: 
Simple 
code 
sample 
Server-­‐side 
code 
@Stateless 
public 
class 
QueryProcessor 
{ 
@Asynchronous 
public 
Future<QueryResult> 
processQuery(QueryCrit 
crit){ 
try{ 
QueryResult 
result= 
prepQueryResult(crit); 
return 
new 
AsyncResult(result); 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
}catch(ExcepNon 
e){ 
//handle 
return 
new 
AsyncResult(FAILURE_RESULT); 
} 
}}
Asynchronicity 
in 
EJB 
3.1: 
Simple 
code 
sample 
@Inject 
QueryProcessor 
queryProcessor; 
private 
JsonObject 
prepareQueryResult(String... 
params){ 
QueryCrit 
crit 
= 
new 
QueryCrit(params) 
Future<QueryResult> 
result=queryProcessor.prepQueryResult(crit); 
//poll 
the 
Future.. 
There 
is 
no 
callback 
here... 
} 
} 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
cliet-­‐side 
code
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Java 
EE 
7 
and 
SSE 
Asynchronicity 
in 
SSE
Server-­‐Sent 
Events 
§ HTML 
5 
component 
§ Client 
subscribe 
to 
event 
source 
§ UnidirecNonal 
channel 
between 
server 
and 
client 
§ Events 
can 
be 
streamed 
from 
server 
to 
client 
when 
happens 
§ ConnecNon 
stays 
open 
§ event 
handling 
on 
client 
side 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
§ onMessage 
§ onError 
§ etc. 
§ SubscripNon 
resuming
Server-­‐Sent 
Events 
§ Can 
be 
developed 
using 
a 
plain 
Servlet 
§ use 
the 
right 
media 
type 
§ use 
the 
correct 
message 
format 
§ Jersey 
provides 
support 
not 
JAX-­‐RS 
yet 
§ Server 
side 
to 
turn 
a 
JAX-­‐RS 
endpoint 
to 
SSE 
broadcaster 
§ Client 
side 
to 
subscribe 
and 
consume 
SS 
events 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
|
Comments, 
QuesNons? 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
|
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Resources 
• RESTful 
Services 
Patterns 
and 
best 
practices 
By 
Bhakti 
Mehta 
• Bhakti’s 
blog: 
https://www.java.net/blog/bhaktimehta 
• Book’s 
sample 
codes: 
• CCL 
photos 
used 
in 
slides: 
• https://www.flickr.com/photos/treehouse1977/2892417805/ 
• https://www.flickr.com/photos/treehouse1977/2892417805/ 
• https://www.flickr.com/photos/essjay/165928100/ 
• https://www.flickr.com/photos/jforth/4413370462/ 
• https://www.flickr.com/photos/sakalak/8737872379/ 
• https://www.flickr.com/photos/jbparrott/8980026600 
• https://www.flickr.com/photos/pentadact/36593493/ 
• https://www.flickr.com/photos/jasohill/4442279347/ 
• https://www.flickr.com/photos/mdsharpe/5075953655 
• https://www.flickr.com/photos/chuqvr/8329512894/
CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE

More Related Content

What's hot

Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...jeckels
 
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]Accumulo Summit
 
Accumulo Summit 2015: Ambari and Accumulo: HDP 2.3 Upcoming Features [Sponsored]
Accumulo Summit 2015: Ambari and Accumulo: HDP 2.3 Upcoming Features [Sponsored]Accumulo Summit 2015: Ambari and Accumulo: HDP 2.3 Upcoming Features [Sponsored]
Accumulo Summit 2015: Ambari and Accumulo: HDP 2.3 Upcoming Features [Sponsored]Accumulo Summit
 
Reference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to KubernetesReference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to KubernetesRakesh Gujjarlapudi
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Edward Burns
 
Some Oracle AWR observations
Some Oracle AWR observationsSome Oracle AWR observations
Some Oracle AWR observationsConnor McDonald
 
Apache Ambari - What's New in 1.7.0
Apache Ambari - What's New in 1.7.0Apache Ambari - What's New in 1.7.0
Apache Ambari - What's New in 1.7.0Hortonworks
 
Java EE 8: What Servlet 4.0 and HTTP/2 mean to you
Java EE 8: What Servlet 4.0 and HTTP/2 mean to youJava EE 8: What Servlet 4.0 and HTTP/2 mean to you
Java EE 8: What Servlet 4.0 and HTTP/2 mean to youAlex Theedom
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015Edward Burns
 
HTTP/2 in the Java Platform -- Java Champions call February 2016
HTTP/2 in the Java Platform -- Java Champions call February 2016HTTP/2 in the Java Platform -- Java Champions call February 2016
HTTP/2 in the Java Platform -- Java Champions call February 2016Ed Burns
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperJeff Smith
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...Edward Burns
 
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to YouHTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to YouDavid Delabassee
 
Database Core performance principles
Database Core performance principlesDatabase Core performance principles
Database Core performance principlesKoppelaars
 
SmartDB Office Hours: Connection Pool Sizing Concepts
SmartDB Office Hours: Connection Pool Sizing ConceptsSmartDB Office Hours: Connection Pool Sizing Concepts
SmartDB Office Hours: Connection Pool Sizing ConceptsKoppelaars
 
Kellyn Pot'Vin-Gorman - Power awr warehouse2
Kellyn Pot'Vin-Gorman - Power awr warehouse2Kellyn Pot'Vin-Gorman - Power awr warehouse2
Kellyn Pot'Vin-Gorman - Power awr warehouse2gaougorg
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7Vijay Nair
 

What's hot (20)

Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
 
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
Accumulo Summit 2015: Alternatives to Apache Accumulo's Java API [API]
 
Accumulo Summit 2015: Ambari and Accumulo: HDP 2.3 Upcoming Features [Sponsored]
Accumulo Summit 2015: Ambari and Accumulo: HDP 2.3 Upcoming Features [Sponsored]Accumulo Summit 2015: Ambari and Accumulo: HDP 2.3 Upcoming Features [Sponsored]
Accumulo Summit 2015: Ambari and Accumulo: HDP 2.3 Upcoming Features [Sponsored]
 
Reference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to KubernetesReference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to Kubernetes
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015
 
Some Oracle AWR observations
Some Oracle AWR observationsSome Oracle AWR observations
Some Oracle AWR observations
 
Apache Ambari - What's New in 1.7.0
Apache Ambari - What's New in 1.7.0Apache Ambari - What's New in 1.7.0
Apache Ambari - What's New in 1.7.0
 
Java EE 8: What Servlet 4.0 and HTTP/2 mean to you
Java EE 8: What Servlet 4.0 and HTTP/2 mean to youJava EE 8: What Servlet 4.0 and HTTP/2 mean to you
Java EE 8: What Servlet 4.0 and HTTP/2 mean to you
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
 
HTTP/2 in the Java Platform -- Java Champions call February 2016
HTTP/2 in the Java Platform -- Java Champions call February 2016HTTP/2 in the Java Platform -- Java Champions call February 2016
HTTP/2 in the Java Platform -- Java Champions call February 2016
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
 
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to YouHTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
 
Database Core performance principles
Database Core performance principlesDatabase Core performance principles
Database Core performance principles
 
SmartDB Office Hours: Connection Pool Sizing Concepts
SmartDB Office Hours: Connection Pool Sizing ConceptsSmartDB Office Hours: Connection Pool Sizing Concepts
SmartDB Office Hours: Connection Pool Sizing Concepts
 
Power of the AWR Warehouse
Power of the AWR WarehousePower of the AWR Warehouse
Power of the AWR Warehouse
 
Kellyn Pot'Vin-Gorman - Power awr warehouse2
Kellyn Pot'Vin-Gorman - Power awr warehouse2Kellyn Pot'Vin-Gorman - Power awr warehouse2
Kellyn Pot'Vin-Gorman - Power awr warehouse2
 
Apache Ranger
Apache RangerApache Ranger
Apache Ranger
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
 
An Overview of Ambari
An Overview of AmbariAn Overview of Ambari
An Overview of Ambari
 

Similar to CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE

Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?Orkhan Gasimov
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckEdward Burns
 
What's next for Java API for WebSocket (JSR 356)
What's next for Java API for WebSocket (JSR 356)What's next for Java API for WebSocket (JSR 356)
What's next for Java API for WebSocket (JSR 356)Pavel Bucek
 
Real-World RESTful Service Development Problems and Solutions
Real-World RESTful Service Development Problems and SolutionsReal-World RESTful Service Development Problems and Solutions
Real-World RESTful Service Development Problems and SolutionsMasoud Kalali
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBAOracle SQL Developer for the DBA
Oracle SQL Developer for the DBAJeff Smith
 
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLAndrew Morgan
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementMark Matthews
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Kellyn Pot'Vin-Gorman
 
Kellyn Pot'Vin-Gorman - Awr and Ash
Kellyn Pot'Vin-Gorman - Awr and AshKellyn Pot'Vin-Gorman - Awr and Ash
Kellyn Pot'Vin-Gorman - Awr and Ashgaougorg
 
Netherlands Tech Tour 02 - MySQL Fabric
Netherlands Tech Tour 02 -   MySQL FabricNetherlands Tech Tour 02 -   MySQL Fabric
Netherlands Tech Tour 02 - MySQL FabricMark Swarbrick
 
What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3Bruno Borges
 
Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsBasic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsSveta Smirnova
 
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 insteadErin Schnabel
 
Elastic Scalability in MySQL Fabric Using OpenStack
Elastic Scalability in MySQL Fabric Using OpenStackElastic Scalability in MySQL Fabric Using OpenStack
Elastic Scalability in MySQL Fabric Using OpenStackMats Kindahl
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)Andrew Morgan
 

Similar to CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE (20)

Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?Spring Cloud: Why? How? What?
Spring Cloud: Why? How? What?
 
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
 
What's next for Java API for WebSocket (JSR 356)
What's next for Java API for WebSocket (JSR 356)What's next for Java API for WebSocket (JSR 356)
What's next for Java API for WebSocket (JSR 356)
 
Real-World RESTful Service Development Problems and Solutions
Real-World RESTful Service Development Problems and SolutionsReal-World RESTful Service Development Problems and Solutions
Real-World RESTful Service Development Problems and Solutions
 
Developer day v2
Developer day v2Developer day v2
Developer day v2
 
Oracle SQL Developer for the DBA
Oracle SQL Developer for the DBAOracle SQL Developer for the DBA
Oracle SQL Developer for the DBA
 
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
 
Using MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance ImprovementUsing MySQL Enterprise Monitor for Continuous Performance Improvement
Using MySQL Enterprise Monitor for Continuous Performance Improvement
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
 
AWR and ASH in an EM12c World
AWR and ASH in an EM12c WorldAWR and ASH in an EM12c World
AWR and ASH in an EM12c World
 
AWR and ASH Deep Dive
AWR and ASH Deep DiveAWR and ASH Deep Dive
AWR and ASH Deep Dive
 
Kellyn Pot'Vin-Gorman - Awr and Ash
Kellyn Pot'Vin-Gorman - Awr and AshKellyn Pot'Vin-Gorman - Awr and Ash
Kellyn Pot'Vin-Gorman - Awr and Ash
 
Netherlands Tech Tour 02 - MySQL Fabric
Netherlands Tech Tour 02 -   MySQL FabricNetherlands Tech Tour 02 -   MySQL Fabric
Netherlands Tech Tour 02 - MySQL Fabric
 
What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3What's New and Noteworthy on Oracle CAF 12.1.3
What's New and Noteworthy on Oracle CAF 12.1.3
 
Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsBasic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAs
 
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
 
Elastic Scalability in MySQL Fabric Using OpenStack
Elastic Scalability in MySQL Fabric Using OpenStackElastic Scalability in MySQL Fabric Using OpenStack
Elastic Scalability in MySQL Fabric Using OpenStack
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
 

More from Masoud Kalali

Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsReal world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsMasoud Kalali
 
BOF 2193 - How to work from home effectively
BOF 2193 - How to work from home effectivelyBOF 2193 - How to work from home effectively
BOF 2193 - How to work from home effectivelyMasoud Kalali
 
How to avoid top 10 security risks in Java EE applications and how to avoid them
How to avoid top 10 security risks in Java EE applications and how to avoid themHow to avoid top 10 security risks in Java EE applications and how to avoid them
How to avoid top 10 security risks in Java EE applications and how to avoid themMasoud Kalali
 
Confess 2013: OWASP Top 10 and Java EE security in practice
Confess 2013: OWASP Top 10 and Java EE security in practiceConfess 2013: OWASP Top 10 and Java EE security in practice
Confess 2013: OWASP Top 10 and Java EE security in practiceMasoud Kalali
 
Utilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityUtilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityMasoud Kalali
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Masoud Kalali
 
Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881Masoud Kalali
 
Security in java ee platform: what is included, what is missing
Security in java ee platform: what is included, what is missingSecurity in java ee platform: what is included, what is missing
Security in java ee platform: what is included, what is missingMasoud Kalali
 
An Overview of RUP methodology
An Overview of RUP methodologyAn Overview of RUP methodology
An Overview of RUP methodologyMasoud Kalali
 
An overview of software development methodologies.
An overview of software development methodologies.An overview of software development methodologies.
An overview of software development methodologies.Masoud Kalali
 
NIO.2, the I/O API for the future
NIO.2, the I/O API for the futureNIO.2, the I/O API for the future
NIO.2, the I/O API for the futureMasoud Kalali
 

More from Masoud Kalali (12)

Real world RESTful service development problems and solutions
Real world RESTful service development problems and solutionsReal world RESTful service development problems and solutions
Real world RESTful service development problems and solutions
 
BOF 2193 - How to work from home effectively
BOF 2193 - How to work from home effectivelyBOF 2193 - How to work from home effectively
BOF 2193 - How to work from home effectively
 
How to avoid top 10 security risks in Java EE applications and how to avoid them
How to avoid top 10 security risks in Java EE applications and how to avoid themHow to avoid top 10 security risks in Java EE applications and how to avoid them
How to avoid top 10 security risks in Java EE applications and how to avoid them
 
Java EE 7 overview
Java EE 7 overviewJava EE 7 overview
Java EE 7 overview
 
Confess 2013: OWASP Top 10 and Java EE security in practice
Confess 2013: OWASP Top 10 and Java EE security in practiceConfess 2013: OWASP Top 10 and Java EE security in practice
Confess 2013: OWASP Top 10 and Java EE security in practice
 
Utilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE SecurityUtilize the Full Power of GlassFish Server and Java EE Security
Utilize the Full Power of GlassFish Server and Java EE Security
 
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
 
Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881Slides for the #JavaOne Session ID: CON11881
Slides for the #JavaOne Session ID: CON11881
 
Security in java ee platform: what is included, what is missing
Security in java ee platform: what is included, what is missingSecurity in java ee platform: what is included, what is missing
Security in java ee platform: what is included, what is missing
 
An Overview of RUP methodology
An Overview of RUP methodologyAn Overview of RUP methodology
An Overview of RUP methodology
 
An overview of software development methodologies.
An overview of software development methodologies.An overview of software development methodologies.
An overview of software development methodologies.
 
NIO.2, the I/O API for the future
NIO.2, the I/O API for the futureNIO.2, the I/O API for the future
NIO.2, the I/O API for the future
 

Recently uploaded

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 

Recently uploaded (20)

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 

CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE

  • 2. Embrace and Get Addicted to the Asynchronicity of EE Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Think Async Masoud Kalali, SoEware Engineer, ORACLE, @MasoudKalal
  • 3. Safe Harbor Statement The following is intended to outline our general product direcNon. It is intended for informaNon purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or funcNonality, and should not be relied upon in making purchasing decisions. The development, release, and Nming of any features or funcNonality described for Oracle’s products remains at the sole discreNon of Oracle. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Program Agenda IntroducNon Why to think Async A simple case of using Async JMS (2.0) Async Servlet Async JAX-­‐RS Async EJBs 1 2 3 4 5 6 7
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Speakers Masoud Kalali • SoEware engineer, author, blogger • Long advocate of GlassFish and Java EE • Tweets at @MasoudKalali
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Why to think Async? • To be]er model what we develop for • To further decouple – Ease of administraNon – Ease of tuning – Ease of maintenance • Improve consumers experience – An API consumer – A direct GUI for human use – etc.
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Java EE And ASynchronicity • Long present JMS – To be used almost everywhere • Servlet 3.0/ 3.1 – Asynchronous Servlets – None blocking IO • JAX-­‐RS 2.0 – Server side – Client side • Asynchronous Session Beans – Server side – Client side
  • 8. A simple asynchronous nourished use case Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Client Async Servlet Cache Query Processor JMS Queue JMS Queue MDB ID, AsyncContext Query Requests in JMS Chunks Consume result chunks and of Query results 1 send it back via AsyncContext 1 2.1 3 2 4…. 8…. 7…. 6…. 5…. No HA/Fault tolerance considered, This Is a very basic block diagram to help with the presentaNon
  • 9. A simple asynchronous nourished use case More details of the Messaging components Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | • One JMS queue for sending the query requests • One JMS queue which will get chunks of query results • An MDB which will consume the query result messages – Uses the cache and the id in the message to pick up the right AsyncContext – As long as the message does not say it is done it will not conclude the response • Complete the response when JMS message implies
  • 10. A simple asynchronous nourished use case Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | More details of the Servlet components • Asynchronous Servlet receiving the requests • Caching the AsynContext and a query Id • Sending the Query message to the JMS queue – Including the query Id • Leave it to the MDB to update the response • Have a AsyncListener to send proper response if Nmeouts
  • 11. A simple asynchronous nourished use case Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Some basics on the client side • A browser • Can be – A SSE client – A COMET, Long Polling request
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | JMS (2.0) A brief overview
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | JMS: A brief overview I • Broker • Message • Queue – Producers – Consumers • Topic – Publishers – Subscribers • Accessible from inside or outside a Java EE
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | JMS 2.0: A brief overview: • MulNple Consumers Allowed on the Same Topic SubscripNon • Delivery Delay • Sending Messages Asynchronously – Send the message and get callback when it is acknowledged by broker • JMSXDeliveryCount message property No longer opNonal • Standard MDB ConfiguraNon ProperNes as part of @MessageDriven – desNnaNonType – subscripNonDurability – acknowledgeMode – subscripNonName – ...
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Servlet 3.0 Asynchronous servlet
  • 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Servlet 3.0 Asynchronicity • Why we want it – More throughput – Be]er architecture mapping • How it works – @WebServlet.asyncSupported, async-­‐supported in XML config! – AsyncContext – AsyncListener
  • 17. Servlet 3.0 Asynchronicity : AsyncContext • Adding Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | listeners • Doing request dispatching • Accessing ServletRequest • Accessing ServletResponse • Concluding the request/response • Semng, gemng Nmeouts
  • 18. Servlet 3.0 Asynchronicity : AsyncListener • Get callback on important events on an async request processing Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | • onComplete(AsyncEvent asyncEvent) • onError(AsyncEvent asyncEvent) • onStartAsync(AsyncEvent asyncEvent) • onTimeout(AsyncEvent asyncEvent)
  • 19. Servlet 3.0 Asynchronicity : A li]le bit of code @WebServlet(asyncSupported = true, value = ”/query-­‐servlet") public class QueryServlet extends H]pServlet { protected void doGet(H]pServletRequest request, H]pServletResponse response) throws ServletExcepNon, IOExcepNon { String id=...; cache.put(id,request.startAsync()); sendQueryMessage(id, request); } } Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Servlet 3.1 Non-­‐blocking IO
  • 21. Servlet 3.1: Non-­‐Blocking IO • Why Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | do we want it? • How does it work? – ReadListener: To read inbound data when available – WriteListener: To write data when possible – Changes in ServletOutputStream • isReady() • setWriteListener(…) – Changes in ServletInputStream • isFinished() • isReady() • setReadListener(…)
  • 22. Servlet 3.1: Non-­‐Blocking IO: ReadListener • To get callbacks on ServletInputStream events – onDataAvailable – OnAllDataRead – onError Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
  • 23. Servlet 3.1: Non-­‐Blocking IO: WriteListener • To get noNfied on ServletOutputStream events – onError – onWritePossible Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Asyncronicity in JAX-­‐RS 2.0 • Why would we need it? • How does it work? – @Asynchronous – ExecuNonContext for programmaNc decision to do or not to do async – AsyncResponse – @Suspended – CompleNonCallback – ConnecNonCallbck
  • 25. Asyncronicity in JAX-­‐RS 2.0: Server-­‐side I How to mark a resource as Asynchronous • On Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | the serverside: – @Asynchronous: Annotate a sub-­‐resource as Asynchronous – AsyncResponse: Provides results an acNons on the running request • semng Nmeout • registering callbacks • resume, cancel suspended request processing • updaNng the response – @Suspended: To inject a suspended AsyncResponse into a sub-­‐resource parameter
  • 26. Asyncronicity in JAX-­‐RS 2.0: Server-­‐side simple code Server Code: @Path("/api/query") public class MyResource { @Context private ExecuUonContext ctx; @GET @Produce(“applicaUon/json”) @Asynchronous @Path(“api/matching-­‐query”) public void prepMatchingQueryResult(@Suspended AsyncResponse ar, @QueryParam String p1… ) { executor.submit( new Runnable() { Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | public void run() { JsonObject response = getQueryResult(p1…); ctx.resume(response); //container thread picks up and conUnue } }); ctx.suspend(); // Suspend connecUon and return } … }
  • 27. Asyncronicity in JAX-­‐RS 2.0: client-­‐side simple code Future<JsonObject> future = client. target(“/api/query/matching-­‐ query”).queryParam(...).request().async().get(JsonObject.class); try { JsonObject queryResult = future.get(30, TimeUnit.SECONDS); } catch (TimeoutExcepNon ex) { // } Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Client-­‐Side with future
  • 28. Asyncronicity in JAX-­‐RS 2.0: client-­‐side simple code Client-­‐Side with callback Future<JsonObject> future = client. target(“/api/query/matching-­‐query”). queryParam(...).request().async().get(new InvocaNonCallback<JsonObject>() { @Override public void completed(JsonObject response) { //InvocaNon happens and some response is back (404, 200, etc.) } @Override public void failed(Throwable throwable) { //InvocaNon fails (client side) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | } });
  • 29. Asyncronicity in JAX-­‐RS 2.0: Server-­‐side II • Single Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | CompleUonCallback method interface • void onComplete(Throwable t) • signal compleNon of serving a request
  • 30. Asyncronicity in JAX-­‐RS 2.0: Server-­‐side III • Single Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | ConnecUonCallback method interface • void onDisconnect(AsyncResponse disconnected) • signals interrupNon in client connecNon before compleNon
  • 31. Asynchronous And long running jobs in REST Don’t keep unnecessary resources for where not needed! Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | • MulN-­‐step long running jobs not suitable with JAX-­‐RS Async • Send 202 where response is not ready with LocaNon header – Intelligent enough client can query the resource LocaUon with the given Retry-­‐Ader header
  • 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | EJB 3.1 Asynchronicity in Session Beans
  • 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Asynchronicity in EJB 3.1 • Works on session beans – fire and forget – Using Future<V> to decide on compleNon • AsyncResult as container specific vehicle – Passes the result to Future<V> • As simple as using @Asynchronous on method/bean • Method should return Future<V> • Client can poll the future for CompleNon
  • 34. Asynchronicity in EJB 3.1: Simple code sample Server-­‐side code @Stateless public class QueryProcessor { @Asynchronous public Future<QueryResult> processQuery(QueryCrit crit){ try{ QueryResult result= prepQueryResult(crit); return new AsyncResult(result); Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | }catch(ExcepNon e){ //handle return new AsyncResult(FAILURE_RESULT); } }}
  • 35. Asynchronicity in EJB 3.1: Simple code sample @Inject QueryProcessor queryProcessor; private JsonObject prepareQueryResult(String... params){ QueryCrit crit = new QueryCrit(params) Future<QueryResult> result=queryProcessor.prepQueryResult(crit); //poll the Future.. There is no callback here... } } Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | cliet-­‐side code
  • 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Java EE 7 and SSE Asynchronicity in SSE
  • 37. Server-­‐Sent Events § HTML 5 component § Client subscribe to event source § UnidirecNonal channel between server and client § Events can be streamed from server to client when happens § ConnecNon stays open § event handling on client side Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | § onMessage § onError § etc. § SubscripNon resuming
  • 38. Server-­‐Sent Events § Can be developed using a plain Servlet § use the right media type § use the correct message format § Jersey provides support not JAX-­‐RS yet § Server side to turn a JAX-­‐RS endpoint to SSE broadcaster § Client side to subscribe and consume SS events Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
  • 39. Comments, QuesNons? Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
  • 40. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Resources • RESTful Services Patterns and best practices By Bhakti Mehta • Bhakti’s blog: https://www.java.net/blog/bhaktimehta • Book’s sample codes: • CCL photos used in slides: • https://www.flickr.com/photos/treehouse1977/2892417805/ • https://www.flickr.com/photos/treehouse1977/2892417805/ • https://www.flickr.com/photos/essjay/165928100/ • https://www.flickr.com/photos/jforth/4413370462/ • https://www.flickr.com/photos/sakalak/8737872379/ • https://www.flickr.com/photos/jbparrott/8980026600 • https://www.flickr.com/photos/pentadact/36593493/ • https://www.flickr.com/photos/jasohill/4442279347/ • https://www.flickr.com/photos/mdsharpe/5075953655 • https://www.flickr.com/photos/chuqvr/8329512894/