apache tomcat 8 previewmarkt/presentations/2013-02-apache-tom… · java ee 7 final due spring 2013...

24
© 2012 SpringSource, by VMware. All rights reserved Apache Tomcat 8 Preview Mark Thomas, Staff Engineer

Upload: others

Post on 16-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

© 2012 SpringSource, by VMware. All rights reserved

Apache Tomcat 8 Preview

Mark Thomas, Staff Engineer

Page 2: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

2

Agenda

Introductions

Java EE 7

Tomcat specific changes

Timescales

Final thoughts

Questions

Page 3: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

3

Introductions

Page 4: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

4

Introductions

Mark Thomas

Apache Tomcat committer (markt)

Other ASF

• Infrastructure team

• Security

• Commons

• Member

Staff Engineer at VMware

• Tomcat

• Security

• tc Server

• support

Page 5: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

5

Java EE 7

Page 6: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

6

Java EE 7

Servlet 3.1

JSP 2.3

Expression Language 3.0

WebSockets 1.0

Little / no demand for other Java EE 7 components in Tomcat

• Java Authentication SPI for Containers (JASPIC JSR 196) Servlet profile

Web container – Apache TomEE

J2EE container – Apache Geronimo

Page 7: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

7

Servlet 3.1

I am part of the Expert Group

Latest draft: January 2013 (public draft)

New features

• Non-blocking IO

• HTTP upgrade

• Change session ID on authentication

Improvements

• Clarified some ambiguities

• Fixes some typos

Page 8: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

8

Servlet 3.1

TBD features

• Protection for uncovered HTTP methods in security constraints

• Almost certainly will be included

Dropped features

• Overlays

Page 9: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

9

JSP 2.3

There is no JSP expert group

JSP 2.3 will be a maintenance release

JSP 2.2 arrived very late in the Java EE 6 cycle

• Expect JSP 2.3 to be the same

Little to do in the JSP specification

• Updates in light of EL specification changes

Possible changes / clarifications

• Should JSPs respond to all HTTP methods?

• Just HEAD, GET, POST

Page 10: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

10

EL 3.0

I am part of the Expert Group

Significant change

Access to static methods and fields

Lambda expressions

• ((x,y)->x+y)(3,4) evaluates to 7

• fact = n -> n==0? 1: n*fact(n-1); fact(5) evaluates to 120

Page 11: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

11

EL 3.0

Collection operators

• Construction of Sets, Lists, Maps

• Was going to provide Language INtegrated Query (LINQ) support

• Will now align with Java SE 8

Other new operators

• String concatenation +=

• Assignment =

• Semicolon ;

A;B -> evaluate A & discard; evaluate B and return

• Class T(classname)

Page 12: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

12

WebSocket 1.0

I am part of the Expert Group

Tomcat 7 already supports WebSocket

• Uses own API

Tomcat 8 will support new API

• Tomcat 7 will probably support new API

• Tomcat 7’s current API likely to be deprecated and excluded from Tomcat 8

WebSocket 1.0 is for clients and servers

• Will implement both

Page 13: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

13

WebSocket 1.0

Additional features

• Encoding / decoding (lots of debate here)

• Annotations

Differences

• Tomcat 7’s implementation is blocking within a Frame

• WebSocket 1.0 is non-blocking although some writes do block

Non-blocking

• Works with the BIO connector but obviously is not really non-blocking

• Fundamentally changes the API

Page 14: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

14

Tomcat specific changes

Page 15: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

15

Tomcat specific changes

Resources

• Aliases

• VirtualDirContext / VirtualWepappLoader

• External repositories for the WebappClassLoader

• Servlet 3.0 resource JARS

Tomcat 7 implements each of these slightly differently

• Very fragile

• Servlet 3.1 overlays were going to be difficult

New resources implementation

• Much cleaner implementation

• Overlays now simple to implement (but have been dropped from Servlet 3.1)

Page 16: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

16

Tomcat specific changes

NIO connector is now the default

Additional diagnostic information in the Manager

• SSL ciphers

• May be back-ported to Tomcat 7

• Ideas for additional features

API changing clean-up

• Remove duplicated functionality

• Move Manager, Loader and Resources from Container to Context

• Move Mapper from Connector to Service

Page 17: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

17

Tomcat specific changes

Code clean-up

• Reduce warnings

• IDE, FindBugs, Javadoc, Checkstyle, etc

Page 18: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

18

Timescales

Page 19: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

19

Timescales

Java EE 7 final due Spring 2013

• unlikely to slip

• features may be removed

Tomcat 8

• 8.0.0 release will be after Java EE 7 is final

• no firm plan for how long after

• need to implement all the features

• need to pass the TCKs

• 8.0.0 may be preceded by some milestone releases

Page 20: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

20

Progress to date

Servlet 3.1

• Non-blocking IO

• Partially implemented by Filip Hanik (NIO only)

• Some low level connector prerequisites implemented

• Refactoring looking likely

• HTTP upgrade

• Done

• Overlays

• Hard part (refactoring) done but not required

• Change session ID

• Done

• Protection for uncovered HTTP methods

• Not started

• Reasonable amount of work left to do

Page 21: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

21

Progress to date

WebSocket

• Mostly complete

• Passes Autobahn test suite (BIO, NIO and APR/native)

• Encoding/Decoding largest block of functionality left

• Should be fairly quick

EL 3.0

• Not implemented

• Significant effort required

JSP

• Not implemented

• Should be very quick

Page 22: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

22

Final thoughts

Page 23: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

23

Final thoughts

Java EE 7

• not final

• still a moving target

Tomcat 8

• depends on volunteer development effort

• needs community agreement, particularly for big changes

Help wanted

• Coding (new features, bug fixes, clean-up, de-duplication, more tests)

• documentation

• testing

Page 24: Apache Tomcat 8 Previewmarkt/presentations/2013-02-Apache-Tom… · Java EE 7 final due Spring 2013 •unlikely to slip •features may be removed Tomcat 8 •8.0.0 release will be

24

Questions