Download presentation
Presentation is loading. Please wait.
Published byDora Fowler Modified over 9 years ago
1
Bologna, 25 - 26 September 2003 Giorgia Lodi (lodig@cs.unibo.it)lodig@cs.unibo.it Department of Computer Science University of Bologna V.Ghini, F. Panzieri
2
Bologna, 25 - 26 September 2003 2 Summary JBoss/JOnAS: A Comparison Example of TAPAS Services Implementation Concluding remarks References
3
Bologna, 25 - 26 September 2003 3 JBoss/JOnAS: A Comparison (1/3) Two internal drafts about the comparison Both obsolete! New releases for JBoss (version 4.x) and JOnAS (version 3.2 now available) Main difference: their internal structuring –JBoss uses JMX for integrating middleware services, i.e. microkernel structure with JMX as software bus –In JOnAS, JMX at the same level of the other middleware services. Each service seen as a Java class
4
Bologna, 25 - 26 September 2003 4 JBoss/JOnAS: A Comparison (2/3) [LP] Evaluation criteria JBoss 3.x JOnAS 3.0 Ease programmingComplicated for microkernel structure and 70MB of source code Interceptor concept Simple architecture. Small source code. No interceptor concept Extension with new services Complicated by the JMX implementation Immediate: new service as a class. Integration with other software/tools Integration with IDEs (JBuilder 7,8 Eclipse).No integration with some IDEs (JBuilder 7,8). Included in Mandrake Linux 9.1. Available documentation Many documents, updated, not free and scattered. Free and poor with many parts missing. Provided servicesAll J2EE standard services. JMX: common software bus for integrating all the standard services. All J2EE standard services + new functionalities. JMX at the same level of the other services. Expected performance Poor, due to intensive use of Reflection; dynamic proxies approach for the design of EJB containers. Good, due to the pre-compiled approach for the design of EJB containers. ScalabilityPoor High DiffusionHigh Low JVMSUN JDK 1.3Better performances with IBM JDK 1.3. Functionalities (clustering, load balancing, failover) Automatic cluster membership discovery, fail- over and load balancing for JNDI, RMI, EJB. Stateful session bean with in memory state replication. Load balancing for web, Load balancing for EJB + clustering for JNDI, failover for web. Coming soon: failover for EJB
5
Bologna, 25 - 26 September 2003 5 JBoss/JOnAS: A Comparison (3/3) Evaluation criteria JBoss 4.x JOnAS 3.2 Ease programming+ Flexible JMX implementation + Interceptor concept - Complicated JMX structure + Simple Architecture + Small source code - No interceptor concept Extension with new services -Complicated by the JMX implementation + Immediate: new service as a class. Integration with other software/tools + many tools + Integration with IDEs (JBuilder 7,8). + performance profilers + code generators + Full integration with IDEs (JBuilder 7,8). +Included in Mandrake Linux 9.1. -No full code generator support - manual profiler configuration Available documentation + Many documents, updated, - not free. + Free - poor with many parts missing. Provided services and functionalities + All J2EE 1.4 standard services. + Web Services + additional features for performance tuning +/- clustering, load balancing, fail-over + All J2EE (1.3) standard services + new functionalities. + EJB 2.0 CMP + new security features + EJB clustering level + new communication infrastructure -no Web Services yet available Expected performance + JDK 1.4 and BCEL - Dynamic approach (reflection) + the pre-compiled approach + local optimisation for RMI calls Scalability- Poor + High Diffusion+ High - Low JVMSUN JDK 1.3Better performances with IBM JDK 1.3.
6
Bologna, 25 - 26 September 2003 6 Sensors Implementation Two kind of sensors: –Physical sensors (for physical resources e.g. hosts and networks) –Logical sensors (for logical resources e.g. the applications, file system, middleware services) Different implementations for Physical and Software sensors depending on the Application Server used (e.g. JBoss, JOnAS)
7
Bologna, 25 - 26 September 2003 7 Sensors Implementation: Physical Sensors (1/4) JBoss Every resource seen as an MBean –Sensors can be seen as resources so as to be implemented as MBeans Sensor MBeans registered with the MBeanServer: –other middleware services can use them through their interface made available by the MBeanServer JOnAS Standard java object/thread Note: use of other “tools” such as JRes, i.e. a resource accounting interface for Java [JRes98] –Evaluation in progress
8
Bologna, 25 - 26 September 2003 8 Sensors Implementation: Physical Sensors (2/4) Example in JBoss public interface HostSensorMBean { // standard methods // public String getJndiName() throws Exception; // public void start() throws Exception; // public void stop() throws Exception; // … // Proprietary methods // public RawMetric getRawMetric() throws Exception; // … } public class HostSensor implements HostSensorMBean { // implementation of standard methods // implementation of proprietary methods }
9
Bologna, 25 - 26 September 2003 9 Sensors Implementation: Physical Sensors (3/4) Example in JOnAS import org.objectweb.jonas.service.Service; public class HostSensor implements Service{ // implementation of standard methods public void init (Context ctx) throws ServerException {………… } public void start() throws ServerException {………… } public void stop() throws ServerException {………… } ………… // implementation of proprietary methods public RawMetric getRawMetric() throws ServerException { ………… } ……… }
10
Bologna, 25 - 26 September 2003 10 Sensors Implementation: Physical Sensors (4/4) Configuration file in JBoss In …/server/default/conf/jboss-service.xml add: <mbean code = “directory_with_the_code_of_the_sensor” name=“jboss:service=HostSensor”> Configuration file in JOnAS In jonas.properties file add: jonas.services JMX, ……,HostSensor jonas.services.HostSensor.class a.b.HostSensor
11
Bologna, 25 - 26 September 2003 11 Sensors Implementation: Logical Sensors (1/4) Intercept client/server remote method calls for monitoring applications hosted by the ASP and every kind of logical resource JBoss Adopts the concept of Interceptors, i.e stateless components that realize the implementation of “advices” in Aspect Oriented Programming Interceptors may intercept method invocations, constructor invocations, and field access Interceptors are chained together at EJB container level –List of Interceptors with the last one used for invoking methods on EJBs –Used to check particular conditions before/after invoking business methods at run-time JOnAS No concept of Interceptors (even for last release 3.2) Possible implementation through proxies
12
Bologna, 25 - 26 September 2003 12 Sensors Implementation: Logical Sensors (2/4) Example in JBoss public class MyInterceptor implements Interceptor { public Object invokeHome(Invocation invocation) throws Exception { Object result; // Here evaluation of certain QoS conditions before bean is looked up result = getNext().invokeHome(invocation); // Here evaluation of certain QoS conditions after bean is looked up return result; } public Object invoke(Invocation invocation) throws Exception { Object result; // Here execution of the code we want to be called before the method invocation Method method = invocation.getMethod(); // Here execution of the code we want to be called after the method invocation return result; } // Other standard public methods (getNext, setNext, setContainer, create, start, stop, destroy) }
13
Bologna, 25 - 26 September 2003 13 Sensors Implementation: Logical Sensors (3/4) Example in JOnAS import org.objectweb.jonas.service.Service; public class MyProxy implements Service{ // implementation of standard methods public void init (Context ctx) throws ServerException {………… } public void start() throws ServerException {………… } public void stop() throws ServerException {………… } ………… // implementation of main methods performed by a proxy which intercepts client/server method calls ………… }
14
Bologna, 25 - 26 September 2003 14 Sensors Implementation: Logical Sensors (4/4) Configuration file in JBoss In …/server/conf/all/standardjboss.xml add: org.jboss.ejb.plugins.LogInterceptor org.jboss.ejb.plugins.SecurityInterceptor org.jboss.ejb.plugins.TxInterceptorCMT org.jboss.ejb.plugins.MyInterceptor Configuration file in JOnAS In jonas.properties file add: jonas.services JMX, ……, MyProxy jonas.services.MyProxy.class a.b.MyProxy
15
Bologna, 25 - 26 September 2003 15 CS Implementation (1/3) Example in JBoss public interface ConfigurationServiceMBean implements MBean { // standard MBean public methods // discovery public availableResource discovery(SLSAppl#, membership) throws Exception; // negotiation public agreedQoS negotiation(SLSAppl#,availableResource) throws Exception; // reservation public void reservation(membership) throws Exception; } public class ConfigurationService implements ConfigurationServiceMBean { // implementation of standard MBean public methods // implementation of discovery, negotiation, reservation }
16
Bologna, 25 - 26 September 2003 16 CS Implementation (2/3) Example in JOnAS import org.objectweb.jonas.service.Service; public class ConfigurationService implements Service{ // implementation of standard methods public void init (Context ctx) throws ServerException {………… } public void start() throws ServerException {………… } public void stop() throws ServerException {………… } ………… // implementation of discovery, negotiation, reservation public availableResource discovery(SLSAppl#, membership) throws ServerException {………… } // negotiation public agreedQoS negotiation(SLSAppl#,availableResource) throws Exception {………… } // reservation public void reservation(membership) throws Exception {………… } }
17
Bologna, 25 - 26 September 2003 17 CS Implementation (3/3) Configuration file in JBoss In …/server/default/conf/jboss-service.xml add: <mbean code = “directory_with_the_code_of_the_CS” name=“jboss:service=ConfigurationService”> 8080 Configuration file in JOnAS In jonas.properties file add: jonas.services JMX, ……, ConfigurationService jonas.services.ConfigurationService.class a.b.ConfigurationService ………
18
Bologna, 25 - 26 September 2003 18 Concluding remarks We favour JBoss –useful notion of interceptors –larger number of auxiliary services (e.g., clustering, load-balancing, fail-over, web services) –more widely used than JOnAS
19
Bologna, 25 - 26 September 2003 19 References G.Lodi and F.Panzieri “JBoss vs JOnAS: A Comparison ”, TAPAS internal draft, University of Bologna, June 11 2003 W.Beckmann, M.KoBmann “An answer to the JBoss vs JOnAS Comparison ”, TAPAS internal draft, Adesso, June 30 2003 G.Czajkowski and T.Von Eicken “JRes: A Resource Accounting Interface for Java “, In Proceedings of the 1998 ACM OOPSLA Conference, Vancouver, BC, October 1998 http://www.jboss.org/ http://www.objectweb.org/jonas/current/doc/JOnASWP.html Scott Stark and the Jboss Group ``JBOSS Administration and Development Second Edition'', Atlanta, USA, November 10 2002, JBoss Version 3.0.4.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.