Documente Academic
Documente Profesional
Documente Cultură
Tour
of Logos
It is sunny today.
___________________________________________
Therefore, you should wear sunscreen.
Come on.
What could
possibly go
wrong?
WHAT?
Some examples:
John Keats
Poem
Agenda
Mostly this:
Agenda
And this:
Agenda
And this:
stackoverflow.com/users/402053/
What Frog?
What Frog?
What Frog?
What Frog?
Requirements
1. No traceable license
2. No website or docs
3. No traceable sources
4. Its an app, not a lib
Java.net.urlconnection
1. Async/non-blocking
2. Event callbacks
1. Reactor
2. nio
Original pattern
http://www.dre.vanderbilt.edu/~schmidt/PDF/reactorsiemens.pdf
http://gee.cs.oswego.edu/dl/cpjslides
In Java,
Reactor means
NIO
Selector as a multiplexer
Nio libraries
Apache Mina
Apache HTTP components
asyncclient
Ning http client
Nio libraries
Here it is!
@Override
public void onThrowable(Throwable t) {
t.printStackTrace();
}
});
Response response = future.get();
HAC Concepts
Request producer
Response consumer
}, null);
HttpResponse response = future.get();
void onCompleted();
Head to head
Feature/Library Ning client
Maturity
Good
Download
Easy
cancelation
Progress
hooks
Just use
Events not
granular
enough
onByteReceived()
Minimal
org.apache.httpcompon
ents
Performance?
http://blogs.atlassian.com/2013/07/http-client-performa
Confused?
Question!
What should
be contentlength when
using
compression?
https://github.com/http2/http2-spec/issues/46
Question!
Question!
Question!
Whats
wrong with
the
following
code?
AHC Alternatives
Question!
How do I
close a
socket
correctly?
http://www.safaribooksonline.com/library/view/http-the-
Remember?
Question!
How can I
write file parts
concurrently?
Whats next?
http/2
Mostly standardizing Google's
spdy
Header compression
multiplexing
Prioritization
Server push
Links!
RTFM: RFC 2616
Ultimate book: HTTP: The Definitive Guide
Amazon
Safari
Reactor pattern
Doug Lea on NIO
A Quick Tour
of Logos
It is sunny today.
___________________________________________
Therefore, you should wear sunscreen.
Come on.
What could
possibly go
wrong?
WHAT?
Some examples: