Professional Documents
Culture Documents
Jetty 9 New Features
Jetty 9 New Features
Jetty Versions
2010
2012
2014
WebSocket
Jetty-8
java-6
servlet 3.0
Jetty-9
Jetty-7/8
Except for
End
of
Webtide
Life!
Clients
HTTP/2
servlet 4.0?
Porting to Jetty-9
Only ServerConnector
Connector uses ConnectionFactories
HTTP1
SSL, HTTP1
ALPN, SSL, HTTP1|SPDY|HTTP2
Apache JSP
Recompile precompiled JSPs
Apache JSP!
More actively maintained
Wider usage
Contributed to Apache Project
Async Servlet IO
Servlet 3.1
Synchronous Processing
Server
Client
Requ
Application
est
Proc
ess
lt
Resu
Respons
Asynchronous Processing
Server
Client
Requ
Application
est
Proc
ess
lt
Resu
Respons
Asynchronous Processing
Server
Client
Requ
Application
est
P
Pro rocess
ces
s
Proc
ess Result
lt
Resu
Respons
lt
Resu
Asynchronous Processing
Client
Client
Server
Client
Requ
Requ
est
est
Respons
lt
Resu
lt
Resu
Latency
Respons
Utilization
st
RESOURCES
P
Pro rocess
ces
s
Proc
ess Result
Reque
e
Respons
Application
active methods!
Iterative Servlet IO
Stream
Listener
setWriteListener
onWritePossible
write
Got it!
Thats
easy!?!?!
Iterative
when IO
is fast
isReady?
write
isReady?
write
isReady?
False
onWritePossible
write
New Thread
Dispatched
when IO is
Slow
Async IO Demo
http://webtide.com/http2-test/push
HTTP
GET /index.html
Jetty
CGI
GET /index.html
inde...
GET style.css
GET style.css
...x.html
style.css
GET logo.png
logo.png
GET logo.png
WordPress
HTTP/2
GET /index.html
PUSH style.css
PUSH logo.png
inde...
style.css
...x.html
logo.png
Jetty
FastCGI
GET /index.html
GET style.css
GET lo
go.png
WordPress
Scaling
Footprint
CONS
No so good for
few very busy
connections with
simple requests
Benchmark woes
which often use a
few very busy
connections with
simple requests
Usage is difficult
complex code
tough debug
Benchmarks should
Measure throughput by reporting latency!
Offer the throughput you want and report on QoS
obtained
More subjective - eg long tails?
Jetty Modules
Modularized Configuration of:
Classpath
XML files
Properties
Dependencies
Command line
Jetty Modules
$ java -jar $JETTY_HOME/start.jar --list-modules
...
- Module: jaas
Depend: server
LIB: lib/jetty-jaas-${jetty.version}.jar
XML: etc/jetty-jaas.xml
Enabled: <not enabled in this configuration>
...
$ java -jar $JETTY_HOME/start.jar --add-to-startd=jaas
$ java -jar $JETTY_HOME/start.jar --list-classpath
$ java -jar $JETTY_HOME/start.jar --list-config
$ java -jar $JETTY_HOME/start.jar --help
JAAS Module
$ cat $JETTY_HOME/modules/jaas.mod
# JAAS Module
[depend]
server
[lib]
lib/jetty-jaas-${jetty.version}.jar
[xml]
etc/jetty-jaas.xml
[ini-template]
## JAAS Configuration
jaas.login.conf=etc/login.conf
JAAS INI
$ cat start.d/jaas.ini
#
# Initialize module jaas
#
--module=jaas
## JAAS Configuration
jaas.login.conf=etc/login.conf
To change configuration:
1. edit startd/name.ini
2. edit name.xml
3. create new modules/name2.mod
ALP
N R
FC7
301
ules
libs
etc
mod
TY-
JET
HOM
E
logs
HOM
E
d/*
.ini
libs
etc
star
t
JET
TY-
Additional layers:
--include-jetty-dir
Container
WEB-INF/classes
WEB-INF/lib
web.xml fragments
ServletContainer Initializers
TLD Descriptors
Application Container
Guest Operating System
Hypervisor
Host Operating System
Server
Application
Jetty
Docker Engine
Host Operating System
Server
Questions?
What other features are needed?
What Management Console?
Want HTTP/2 Test Sites!!!!!!
Greg Wilkins <gregw@webtide.com>
http://www.webtide.com