Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF •...
-
Upload
truongnhan -
Category
Documents
-
view
235 -
download
0
Transcript of Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF •...
![Page 1: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/1.jpg)
Apache Tomcat 8 Preview
Mark Thomas, Staff Engineer
© 2012 SpringSource, by VMware. All rights reserved
![Page 2: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/2.jpg)
Agenda
� Introductions
� Java EE 7
� Tomcat specific changes
2
� Timescales
� Final thoughts
� Questions
![Page 3: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/3.jpg)
Introductions
3
![Page 4: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/4.jpg)
Introductions
� Mark Thomas
� Apache Tomcat committer (markt)
� Other ASF• Infrastructure team
• Security
• Commons
• Member
4
• Member
� Staff Engineer at VMware• Tomcat
• Security
• tc Server
• support
![Page 5: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/5.jpg)
Java EE 7
5
![Page 6: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/6.jpg)
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 i n Tomcat
6
� Web container – Apache TomEE
� J2EE container – Apache Geronimo
![Page 7: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/7.jpg)
Servlet 3.1
� I am part of the Expert Group
� Latest draft: June 2012
� New features• Non-blocking IO
• HTTP upgrade
7
• HTTP upgrade
• Change session ID on authentication
� Improvements• Clarified some ambiguities
• Fixes some typos
![Page 8: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/8.jpg)
Servlet 3.1
� TBD features• Protection for uncovered HTTP methods in security constraints
� Dropped features• Overlays
8
![Page 9: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/9.jpg)
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
9
• Updates in light of EL specification changes
� Possible changes / clarifications• Should JSPs respond to all HTTP methods?
![Page 10: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/10.jpg)
EL 3.0
� I am part of the Expert Group
� Significant change
� Access to static methods and fields
� Lambda expressions
10
� 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 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/11.jpg)
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 { + , cat }
11
• String concatenation { + , cat }
• Assignment =
• Semicolon ;A;B -> evaluate A & discard; evaluate B and return
• Class T(classname)
![Page 12: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/12.jpg)
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 be changed to use new API
12
• Tomcat 7 will probably be changed to use new API
• Current API is marked as subject to change
� WebSocket 1.0 is for clients and servers• Definitely implement the server side
• Client side implementation TBD
![Page 13: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/13.jpg)
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 will be non-blocking
13
• WebSocket 1.0 will be non-blocking
� Non-blocking• Sort of works with the BIO connector but not really
• Fundamentally changes the API
![Page 14: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/14.jpg)
Tomcat specific changes
14
![Page 15: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/15.jpg)
Tomcat specific changes
� Resources• Aliases
• VirtualDirContext / VirtualWepappLoader
• External repositories for the WebappClassLoader
• Servlet 3.0 resource JARS
� Tomcat 7 implements each of these slightly differen tly• Very fragile
15
• Servlet 3.1 overlays were going to be difficult
� New resources implementation• Probably not needed for overlays
• Much cleaner implementation
� Recently moved from sandbox to trunk
![Page 16: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/16.jpg)
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
16
� 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 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/17.jpg)
Tomcat specific changes
� Code clean-up• Reduce warnings
• IDE, FindBugs, Javadoc, Checkstyle, etc
17
![Page 18: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/18.jpg)
Timescales
18
![Page 19: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/19.jpg)
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
19
• need to pass the TCKs
• 8.0.0 may be preceded by some milestone releases
![Page 20: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/20.jpg)
Progress to date
� Non-blocking IO• Partially implemented by Filip Hanik
� HTTP upgrade• Implemented but not using Servlet specification API
• Servlet API implementation in progress (very early stages)
� Overlays• Resource handling refactoring complete to support this
20
• Resource handling refactoring complete to support this
� WebSocket• Implemented but not using specification API
• Currently blocking within a WebSocket frame and needs to be non-blocking
� EL 3.0• Not implemented
![Page 21: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/21.jpg)
Final thoughts
21
![Page 22: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/22.jpg)
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
22
• needs community agreement, particularly for big changes
� Help wanted• Coding (new features, bug fixes, clean-up, de-duplication, more tests)
• documentation
• testing
![Page 23: Apache Tomcat 8 Preview · Introductions Mark Thomas Apache Tomcat committer (markt) Other ASF • Infrastructure team • Security • Commons • Member 4 Staff Engineer at VMware](https://reader036.fdocuments.in/reader036/viewer/2022062402/5b21876c7f8b9ae21a8b45a6/html5/thumbnails/23.jpg)
Questions
23