Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

JBoss AS7 Reloaded

12.379 Aufrufe

Veröffentlicht am

JBoss Application Server 7 - Reloaded, by Dimitris Andreadis

Veröffentlicht in: Technologie

JBoss AS7 Reloaded

  1. 1. JBoss Application Server 7JasoctAS Project LeadDimitris AndreadisMay 4, 2011Engineering ManagerJBoss Application Server
  2. 2. 2
  3. 3. About MeJBoss AS, Engineering Manager dandreadis.blogspot.com •2001, JBoss User •2003, JBoss Committer •2004, JBoss Full-time Core Developer •2006, JBoss AS Lead (v3.2.8+, v4.0.4+, v4.2.x, 5.0.x) •2009 - present, Manager of JBoss AS Core TeamAnd before JBoss? •7y experience in distributed systems (telcos, NMS/OSS) •BSc/MSc Computer Science (Athens/Dublin)
  4. 4. Agenda• A Brief History of JBoss AS • the Path to Java EE6• JBoss Application Server 7 • Architecture • Modularity • Management• Enterprise Application Platform 6 (EAP)
  5. 5. JBoss AS Timeline JavaEE 6 Web Profile, JDK6/JDK7 Modular Service Container Architecture JavaEE 6 Web Profile, JDK6 JBoss AS 7.0, 7.0.1, 7.0.2 JBoss AS 6.0, 6.1 JavaEE 5 certification, JDK5 & 6 MicroContainer Architecture JBoss AS 5.1 J2EE 1.4 certification JBoss AS 5: 5.0.0.GA, 5.0.1.GA JDK 1.4 JBoss Versions JBoss AS 4.2.0 – 4.2.3 JBoss AS 4.0.0 – 4.0.5 JEE 5.0 compatible, not certified (95% pass) JDK5.0 JBoss AS 3.2.0 – 3.2.8 Time 2003 2004 2005 2006 2007 2008 2009 2010 2011 J2EE 1.3, JDK 1.3 JMX MicroKernel Architecture
  6. 6. Andiamo Java EE 6
  7. 7. The path to Java EE6• JBoss AS 6.0 • Deliver faster on Java EE6 • Baking time for EE subsystems • Measure interest on EE profiles • Stepping stone for AS7• New Stuff • HornetQ (Messaging) • Infinispan (Caching) • Apache CXF (Web Services) • Embedded Jopr Console • mod_cluster
  8. 8. The path to Java EE6 (cont.)• JBoss AS 6.0/6.1 • Java EE6 Web Profile++ (or EE6 Full--) • Based on the 5.x Microcontainer • More lightweight than AS5• Gotchas • JBoss AS6 will *not* be productized! • Currently in community maintenance mode
  9. 9. …in the meantime
  10. 10. A hard look in the mirror• Typical Pain Points • Excess baggage (legacy subsystems and abstractions) • Boot time & memory footprint • Embeadability/testability • Administration options • Modularity• It’s “free and it doesn’t suck” not enough anymore
  11. 11. Getting our Mojo back!• Major Goals • Make it Smaller, Faster • Improve Manageability • Simplify Configuration• Clean things up! • Remove abstraction layers • Remove legacy stuff • Modularize
  12. 12. IntroducingJBoss AS 7 *A blazingly fast modular lightweight elegantly administrablecompliant application server with easy testing facilities – Carlo De Wolf, 2011
  13. 13. JBoss AS 7 releases• AS 7.0 – released Jul/2011, • EE6 – Web Profile (+JCA, +JAX-RS) certified • AS 7.0.1 – released Aug/2011 • MDB support, JSR-88, JPA w. older Hibernate 3 • AS 7.0.2 – released Sep/2011 • JSF 2.1, @Asynchronous, PicketLink SSO, etc.• AS 7.1 – released Feb/2012 • Full EE6, clustering, improved security, etc. • AS 7.1.1 – released Mar/2012 • maintenance release
  14. 14. AS7 Key Features• Fast and Lightweight• Modular, OSGi enabled• Unified, user focused configuration• Multiple management interfaces• Support for multi-node management
  15. 15. AS7 Architecture JBoss MSC DMR Controller Threads Modules Server Controller Service Deployers VFS Jandex Reflect Cache Repository Core Infrastructure FS Secanner Transaction Datasource Messaging Connector Remoting Security JAX-RS Naming OSGi EJB3 Weld SAR Web JMX JPA WS EE Subsystems
  16. 16. JBoss 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 • JBoss MSC - Modular Service Container
  17. 17. Key attributes of MSCSmall, lightweight, and efficientHighly concurrent & scalable state machineServices are primarily interface basedOnly two states, Up & DownMultiple startup modes •Active, Passive, On-Demand, Lazy, Never Service Builder Service Registry Service Controller Service Deps Value Listeners Injectors Concurrent Service Container
  18. 18. So What?
  19. 19. #@*%ing fast! http://community.jboss.org/wiki/AS7StartupTimeShowdown
  20. 20. Boot Time Results
  21. 21. Memory Comparison
  22. 22. How is it done?• Concurrent startup/deployments• Faster resource lookup/classloading• Annotation indexing• Caching of reflection metadata• Lazy loading of (some) services• StAX based descriptor parsing• Starting from scratch 
  23. 23. Modularity* *The Class Path is Dead – Mark Reinhold, 2009
  24. 24. Hierarchical Class Loading• Issues • All jars always loaded, whether used or no • Version conflicts, especially with servers libs • Increased lookup/load time • Hard to debug (big ball of mud)• JBoss AS 5 introduced module-like capabilities • jboss-classloading.xml
  25. 25. Modular Class Loading• A graph of Class Loaders, not a tree • Modules delegate to one another as peers • A module imports modules it directly uses • Transitive dependencies are hidden, by default • Different module versions may co-exist
  26. 26. JBoss ModulesSmall, lightweight, and efficient •Highly concurrent class loading •Fast with O(1) dependency resolution“Pure” modular class loading •Modules only see what they import •Including JDK classesExternal module definitions •Don’t have to break open the JAR
  27. 27. modulesorghornetqmainmodule.xml<module xmlns="urn:jboss:module:1.0" name="org.hornetq"> <resources> <resource-root path="hornetq-core-2.2.10.Final.jar"/> <resource-root path="hornetq-jms-2.2.10.Final.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.jms.api"/> <module name="javax.resource.api"/> <module name="org.jboss.jts"/> <module name="org.jboss.netty"/> </dependencies></module>
  28. 28. User Deployments• Deployments are also modules (.ear, .war, etc.) deployment.foo.ear deployment.foo.ear.bar.war deployment.foo.ear.bar.jar• Cannot access server implementation details, unless explicitly specified META-INF/MANIFEST.MF Dependencies: org.javassist, org.apache.velocity
  29. 29. Implicit Module DependenciesSetup by the appserver/deployers automatically, e.g. META-INF/ejb-jar.xml, @Stateless, @Stateful, @MessageDriven  import javaee.api module @PersistenceUnit, @PersistenceContext, <persistence-unit-ref>, <persistence-context-ref>  import javaee.api module  import org.jboss.as.jpa module  import org.hibernate module  import org.javaassist module
  30. 30. What about OSGi?
  31. 31. JBoss OSGi• AS7 is fully compliant with OSGi v4.2 Core• Implemented on top of JBoss MSC/Modules• OSGi bundles become JBoss Modules• Deploy your OSGi bundles, as usual
  32. 32. JBoss OSGi• Out-of-the-box • OSGi Core 4.2, Config Admin, JNDI, JTA, JMX*• Extras with installer • Web Apps, HTTP Service, Blueprint, Web Console *This may change
  33. 33. Management* *Keeping Administrators Happy
  34. 34. Two Operational ModesStandalone •Traditional JBoss single JVM server •Management facilities IN-VM •No lifecycle management (only shutdown)Domain •Multi-JVM, multi-server model •Management coordinated by Domain Controller Process •Multiple server instances (JVMs) per Host •Full lifecycle managed by Process Controller
  35. 35. Domain Mode Physical Topology
  36. 36. Filesystem Layout jboss-7.1.x bin standalone.conf Standalone Mode JVM Parameters standalone.sh Standalone Mode domain.sh Domain Mode jboss-cli.sh Command Line Interface bundles OSGi Bundles Static JBoss Module Definitions modules standalone configuration standalone.xml Standalone Unified Configuration deployments File System Deployment logs data Internal Data (includes repository)
  37. 37. Filesystem Layout (cont) jboss-7.1.x domain configuration standalone.xml Domain Wide Unified Configuration host.xml Host Controller Configuration servers server-one Server “One” JVM instance data logs data server-two Server “Two” JVM instance data logs data
  38. 38. User-focused Configuration<bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService"> <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager",exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation><annotation>@org.jboss.managed.api.annotation.ManagementObject(name="TransactionManager",componentType=@org.jboss.managed.api.annotation.ManagementComponent(type = "MCBean", subtype ="JTA"),targetInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class) </annotation> <property name="transactionTimeout">300</property> <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property><subsystem xmlns="urn:jboss:domain:transactions:1.0"> <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/> <core-environment socket-binding="txn-socket-process-id"/></subsystem>
  39. 39. Management APIs• Command Line Interface (CLI)• Remote Java API• HTTP/JSON API• GWT-based console• JMX mapping
  40. 40. Dynamic Model Representation (DMR)• Central Detyped Management API •All management operations operate with/on DMR •Strictly backwards compatible• Represents simple and complex types •int, long, big int, double, big dec, boolean, string, bytes, list, object, property, expression• Auto-converts like dynamic languages• Self describing• Convertible to/from JSON• Also has a defined binary protocol (optionally b64)
  41. 41. Tx configuration snippet from standalone.xml...<subsystem xmlns="urn:jboss:domain:transactions:1.1"> <core-environment> <process-id> <uuid/> </process-id> </core-environment> <recovery-environment socket-binding="txn- recovery-environment" status-socket-binding="txn- status-manager"/> <coordinator-environment default-timeout="300"/></subsystem>...
  42. 42. …maps to Domain Model... "transactions" : { "default-timeout" : 300, "enable-statistics" : false, "enable-tsm-status" : false, "jts" : false, "node-identifier" : "1", "object-store-path" : "tx-object-store", "object-store-relative-to" : "jboss.server.data.dir", "path" : "var", "process-id-socket-max-ports" : 10, "process-id-uuid" : true, "recovery-listener" : false, "relative-to" : "jboss.server.data.dir", "socket-binding" : "txn-recovery-environment", "status-socket-binding" : "txn-status-manager" },
  43. 43. Components* *First Class Only!
  44. 44. RoadmapAS 7.0.2 – last version of 7.0 seriesAS 7.1.1 – last version of 7.1 seriesJBoss AS 7.1 is the base for JBoss Enterprise Application Platform 6 (EAP)AS 7.2.x – feature enhancements • Patching • Graceful shutdown • Audit logging • …
  45. 45. JBoss EAP* *Professional Support from Professionals!
  46. 46. The Community JBoss Application Server (AS)vs. the Enterprise Application Platform (EAP)• Community Project (JBoss AS) - JBoss As We Know It - Sponsored by JBoss/Red Hat - Allow innovation at a faster pace• Enterprise Application Platform (EAP) - Forks the community project at stable points - Integrates with JBoss Developer Studio / JBoss Operations Network - Rigorously tested (performance, scalability, SpecJ, etc.) - Certified on multiple OS, JVM, DBs combinations - Cumulative Patch cycles - Supported for 5 + 2 years.
  47. 47. JBoss AS vs JBoss EAP
  48. 48. Ευχαριστώ* *Thank You!
  49. 49. dimitris@redhat.com dandreadis.blogspot.com