Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
1. Jasoct
AS Project Lead
May 4, 2011
WildFly
State of the Union
Dimitris Andreadis
Sr. Engineering Manager
Red Hat JBoss EAP/WildFly
twitter: @dandreadis
2. Agenda
• JBoss AS History
• WildFly 8 Recap
• WildFly 9 Update
• The Road Ahead
3. JBoss AS Timeline
20072006200520042003
JBossVersions
Time
JBoss AS 4.0.0 – 4.0.5
JBoss AS 4.2.0 – 4.2.3
JBoss AS 5: 5.0.0.GA, 5.0.1.GA
JBoss AS 3.2.0 – 3.2.8
JBoss AS 5.1
20092008
J2EE 1.3, JDK 1.3
JMX MicroKernel Architecture
J2EE 1.4 certification
JTS, JDK 1.4
JEE 5.0 compatible,
not certified (95% pass)
JDK5.0, EAP 4.2 basis
JavaEE 5 certification, JDK5 & 6
MicroContainer Architecture
2010 2011
JBoss AS 6.0, 6.1
JBoss AS 7.0, 7.0.1, 7.0.2
JavaEE 6 Web Profile, JDK6
JavaEE 6 Web Profile, JDK6/JDK7
Modular Service Container Architecture
2012
JBoss AS 7.1, 7.1.1
JavaEE 6 Full Profile, JDK6/JDK7
Complete Clustering Support, EAP6 basis
JSF-Based Console, EAP5 basis
4. Project vs EE spec
• JBoss AS 2 J2EE 1.2
• JBoss AS 3 J2EE 1.3
• JBoss AS 4 J2EE 1.4
• JBoss AS 5 Java EE 5
• JBoss AS 6 , AS7 Java EE 6
• WildFly 8, 9, 10 Java EE 7
5. Project vs EE spec vs Product
• JBoss AS 2 J2EE 1.2
• JBoss AS 3 J2EE 1.3
• JBoss AS 4 J2EE 1.4 EAP 4
• JBoss AS 5 Java EE 5 EAP 5
• JBoss AS 6 , AS7 Java EE 6 EAP 6
• WildFly 8, 9, 10 Java EE 7 EAP 7
*Red Hat JBoss Enterprise Application Platform (EAP)
6. WildFly vs JBoss EAP
https://access.redhat.com/support/policy/updates/jboss_notes/
7. JBoss AS Kernel Taxonomy
• JBoss AS 2.x, 3.x, 4.x
• JBoss JMX MicroKernel
• JBoss AS 5.x, 6.x
• JBoss MC - MicroContainer
• JBoss AS7.x, WildFly 8.x, 9
• JBoss MSC - Modular Service Container
9. WildFly 8 – Features
• 100% Java EE7 certified (Web & Full profiles)
• plus CDI 1.2, WebSockets 1.1
• High Performance Web Server (Undertow)
• Port reduction (8080, 9990)
• Update Infrastructure
• Role Based Administration (RBAC)
• Audit Logging
11. EE7 Highlights – New Techs
JSR-352 Batch Applications for the Java Platform
•Runtime & Artifact API, XML-based Job specification lang.
JSR-236 Concurrency Utilities for JavaEE
•Executor, Scheduled Executor, Thread Factory, Context
JSR-353 Java API for JSON Processing (JSON-P)
•Parse, transform and query JSON data
JSR-356 Web Sockets support
•Annotation driven endpoints and lifecycle callbacks
13. EE7 Highlights – Optional Techs
Removed in WildFly 8
•EJB 2.1 Entity Beans (CMP/BMP)
•JAX-RPC (API for XML-based RPC)
•JAXR (API for XML Registries)
•JSR-88 (Deployment API)
• it has re-surfaced in JSR 373 (JSR-77 successor)
JavaTM EE Management API 2.0
14. New WebServer - Undertow
• Blocking / non-blocking NIO based APIs
• Composition/handler based architecture
• Lightweight & fully embeddable
• Supports WebSockets, including JSR-356
• Supports Servlet 3.1
• HTTP upgrade
http://undertow.io/
16. Port Reduction
• HTTP Upgrade allow us to reduce the number of ports
in the default installation to just 2:
• 8080 – for applications with JNDI and EJB multiplexed
• 9990 – for management, for both HTTP/JON & Native APIs
• The only overhead is the initial HTTP Upgrade
request/response.
17. Updating an installation
• Preserves configuration and deployments
• Can be applied offline or on a running server
./bin/jboss-cli.sh
[disconnected /] patch apply /wildfly-8.2.0.Final.patch
[disconnected /] quit
patch rollback --reset-configuration=true
patch --help
18. Administrative Access Control
• Administrative users can be mapped to Roles
• Role = set of Permissions
• Permission:
• Action (access, read/write config, read/write runtime)
• Set of Constraints (target)
• Sensitive resource type, attribute or operation
• Sensitive data
• Audit Resource
• Application Resource
23. Alpha – Sep/2014
Beta – Mar/2015
CR1 – May/2015
CR2 – May We are Here
• Final touches
Final – May/June!
• Yuppie!
24. New Features in WildFly 9
• Core/Full Split and Servlet-only distribution
• Front-end load balancer with mod_cluster support
• Undertow HTTP/2 & SPDY support
• Graceful shutdown (suspend(timeout)/resume)
• Switching to the JDK ORB from JacORB
• Offline CLI Mode
• etc.
25. WildFly-Core Project/Distro
Why?
• WildFly codebase larger than 1M LOC
• Base testsuite takes +2h to run
• Hard to consume WildFly piecemeal
wildfly/wildfly-core · GitHub
26. WildFly-Core
Base Runtime for WildFly server includes
• Modular class loading
• Modular Service Container
• Unified management, including domain mode
• Basic deployment architecture
• CLI for management
• Logging
• JMX
MSC
JBoss
Modules
DMR Controller Threads
Core Infrastructure
Server Controller Service
Deployers VFS Jandex
Reflect
Cache
Repository
31. Feature Packs
Server extensions
• Modules + Configuration Snippets + other content
• Dependencies on other features and modules
• Build by maven plugin based on configuration file
• With dependencies checking during build
A provisioning tool assembles features packs into a
server, with overrides and config changes.
33. Experimental: wildfly-swarm*
Turn your .war into a fat jar with just enough of the
WildFly Runtime to support your use case
• Include the wildfly-swarm-plugin in your pom.xml
• Declare any dependencies on:
Undertow, JAX-RS, Naming/JNDI, Transactions,
Messaging, Datasources, Logging, Weld/CDI, MSC Security
*http://wildfly.org/news/2015/05/05/WildFly-Swarm-Released/
34. Experimental: wildfly-swarm
[ Write your own main()
to override default
configuration and
reference it in your
MANIFEST.MF ]
Voila!
java –jar myapp-swarm.jar
(boots in < 1sec)
35. WF/Undertow as Load Balancer
• Full Java solution controlled centrally
• Implements mod_cluster
• HTTP, HTTP/2, AJP
http://blog.eisele.net/2015/01/developer-interview-di-11-stuart-douglas-about-wildfly9-undertow.html
37. Undertow HTTP/2 support
HTTP/2 characteristics
• Binary Framing
• Request/Response multiplexing
• Header compression (HPACK)
• Stream prioritization
• Server Push
• HTTP Upgrade or NPN/ALPN*
Undertow implements HTTP/2 (& SPDY)
*requires special JDK8 setup
38. JSR-369 Servlet 4.0
Brings HTTP/2 Support to Java EE8
• Server Push
• Stream Prioritization
• Request/Response Multiplexing
JEP 110: HTTP/2 Client
• Basic Protocol Support in Java SE 9
• new HTTP client API that implements HTTP/2 and
WebSocket, and can replace the legacy
HttpURLConnection API
http://stackoverflow.com/questions/10480122/difference-between-http-pipeling-and-http-multiplexing-with-spdy
39. Server Push with Undertow
http://undertow.io/blog/2015/03/25/Server-Push.html
or use the Undertow Learning Push Handler
• learns which requested resources are requested per
page and pushes them proactively
40. Graceful Shutdown
• Essentially suspend(timeout) / resume()
• Allow active sessions/requests/in-flight-tx to complete
• After suspend the server may be restarted
• Action per subsystem may vary
• Reject new requests (HTTP Error 503 - Service unavailable)
• Clustering could fail over sessions
• mod_cluster could notify load balancer
• …
41. ORB Switch
• Java EE requires deep IIOP/CORBA integration
• JBoss/WildFly was always based on JacORB
• Great ORB but JVM ORB interop is challenging
• Switched to the OpenJDK ORB to
• Pool resources with other vendors
• Reduce Java EE RI interop issues
42. Offline CLI
• Configure a server, without the server “running”
• Similar to admin-only mode, without any ports bound
• Implemented by embedding the server in the CLI
• CLI is also embeddable
$ bin/jboss-cli.sh
[disconnected /] embed-server --std-out=echo
12:10:15,300 INFO [org.jboss.modules] (main) JBoss Mo
dules version 1.4.1.Final
…
(server boots up)
https://developer.jboss.org/wiki/OfflineCLIWork
43. Misc. WF 9 Features
• Log files appear as resources and can be downloaded
• JCA/IronJacamar Tracer module
• JGroups is now a fully managed resource
• Infinispan caches can share JGroups Channels
using the FORK protocol
• Web Console
• Improved Log Viewer
• Datasource templates
• Flush operations for connection pools
• Enhanced model browser
• …
46. Elytron
• Replacement for PicketBox (old JBossSX)
• Get rid of JAAS as the internal SPI
• Stop “sending the password around”
• Multiple security associations per context
• Support HTTP, SASL+GSSAPI, TSL, RADIOUS, etc.
• Integrate with PicketLink and Keycloak
• …