1 / 28

Replication Framework: Progress Report

This progress report discusses the implementation of the Replication Framework, including EJB and Web-service implementations, transaction interception, deployment support, and open issues.

steveevans
Télécharger la présentation

Replication Framework: Progress Report

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Replication Framework:Progress Report Vance Maverick University of Bologna Dec. 11, 2003

  2. Outline • Framework recap • EJB implementation • Web-service implementation • Transaction interception • Deployment support • Some open issues • Summary ADAPT Bologna meeting, Dec. 2003

  3. Framework recap • Generic API for interface between standard J2EE server and replication algorithm • Allow different replication algorithms to be plugged in • Protect replication development from upgrades in the server • Circulated paper designs from May onwards • Presented at Brussels meeting ADAPT Bologna meeting, Dec. 2003

  4. ComponentMonitor API • Approach: module barriers between J2EE container and replication algorithm • Replication code implements interface ComponentMonitor • Container provides services to replication code through interfaces • ContainerSupport provides top-level container services • ComponentHandle stands for component ADAPT Bologna meeting, Dec. 2003

  5. Intercepting invocations ComponentMonitor call() ? call() Handle Normal Intercepted • Container diverts invocation to ComponentMonitor • Response call(ComponentHandle, Request) • CM may perform arbitrary computation + communication • To continue execution, it forwards call to ComponentHandle ADAPT Bologna meeting, Dec. 2003

  6. Communicating component state ComponentMonitor ComponentMonitor Handle State Handle Handle State State • ComponentMonitor does not reference component directly • Instead, uses serializable ComponentHandle • Gets and sets state as opaque serializable “blob” (bytes) ADAPT Bologna meeting, Dec. 2003

  7. EJB implementation of API • Types of EJBs • Entity bean • Stateless session bean • Stateful session bean • ComponentHandle contains • JNDI name of bean • Session ID (for SFSB) • Primary key object (for entity bean) • Intercept persistence methods for entity bean ADAPT Bologna meeting, Dec. 2003

  8. EJB EJB EJB PersistenceManager EJB Invocation Interception EJB Container Interceptors ADAPT Bologna meeting, Dec. 2003

  9. EJB EJB EJB PersistenceManager EJB Invocation Interception EJB Container ComponentMonitor Interceptors Call Management Persistence Management ADAPT Bologna meeting, Dec. 2003

  10. EJB EJB EJB PersistenceManager EJB Persistence Invocation Interception EJB Container Interceptors ADAPT Bologna meeting, Dec. 2003

  11. EJB EJB EJB PersistenceManager EJB Persistence Invocation Interception EJB Container Component Monitor Interceptors Call Management Wrapper Persistence Management ADAPT Bologna meeting, Dec. 2003

  12. Axis web service objects • Implement a web service (port type) • WSDL2Java tool • Generates Java interface from WSDL definition • Developer creates object as implementation of interface • Deployed in Axis configuration file • “Scope”: instance per request, per client session, or per server • Request scope is stateless, others stateful ADAPT Bologna meeting, Dec. 2003

  13. Web service implementation of API • ComponentHandle • Service name • Session ID (when session scope) • We generate this • State transmission • Serialized form of web service object • Automatic translation of EJB references • When deserialized, new object replaces old ADAPT Bologna meeting, Dec. 2003

  14. Handlers in Axis Service Object handleRequest() handleRequest() HTTP handleResponse() handleResponse() • Handler model defined by Sun (JAX-RPC) ADAPT Bologna meeting, Dec. 2003

  15. Component Interception ComponentMonitor ComponentHandle call() call() Proxy “Normal” Axis chain Handlers disabled static call() TxHandler WSMon Handler Service Object handleRequest() handleRequest() handleResponse() handleResponse() AXIS ADAPT Bologna meeting, Dec. 2003

  16. Transactions Container EJB Persistence Manager begin, commit Read, Write prepare, commit, rollback DataSource (XAResource) Transaction Manager ADAPT Bologna meeting, Dec. 2003

  17. Transactions Container EJB Persistence Manager begin, commit Read, Write Transaction Interceptor prepare, commit, rollback begin, commit DataSource (XAResource) Transaction Manager ADAPT Bologna meeting, Dec. 2003

  18. Transactions Container EJB Persistence Manager begin, commit Read, Write prepare, commit, rollback Transaction Interceptor DataSource (XAResource) ADAPT Bologna meeting, Dec. 2003

  19. Component Monitor Component Monitor ContainerSupport Container Support Remote Deployment (Farming) ADAPT Bologna meeting, Dec. 2003

  20. Component Monitor Component Monitor Container Support Container Support Remote Deployment (Farming) Notification ADAPT Bologna meeting, Dec. 2003

  21. Component Monitor Component Monitor Container Support Container Support Remote Deployment (Farming) Transmission ADAPT Bologna meeting, Dec. 2003

  22. Component Monitor Component Monitor Container Support Container Support Remote Deployment (Farming) Deployment ADAPT Bologna meeting, Dec. 2003

  23. Open issues I: Persistence • Persistent creation vs. instantiation of existing object • Requires clarification in API • So far, test applications based on entity beans, CMP • BMP should be equivalent • ejbStore() and ejbLoad() have same timing, semantics • In practice, developers don’t rely entirely on entity beans • Considered inefficient ADAPT Bologna meeting, Dec. 2003

  24. Persistence through SFSBs • Consider stateful session bean that accesses DB • Each method invocation may read and modify DB as well as bean state • Replication algorithm should wait till commit before synchronizing state on other replicas • Bean should not access other state outside beans, DB • Standard development guideline • With these cautions, we believe mechanism is adequate ADAPT Bologna meeting, Dec. 2003

  25. ComponentMonitor Stub Open issues II: Client-side invocation Cluster 1 ComponentMonitor Stub ComponentMonitor ComponentMonitor Cluster 2 ADAPT Bologna meeting, Dec. 2003

  26. What stub could do • Select target host for invocation • Select means of communication • Group communication instead of RMI • Add information to request and response • Session ID • List of alternate hosts • Applies to J2EE invocation more than web services • Stub code is downloaded from server ADAPT Bologna meeting, Dec. 2003

  27. Open Issues III: Message-Driven Beans • Natural base for asynchronous service implementation • Stateless component with one method • void onMessage(javax.jms.Message) • Variant of existing invocation model • Response is posted to a JMS Session (not return value from invocation) ADAPT Bologna meeting, Dec. 2003

  28. Summary • API has stabilized • Some loose ends to be tied up • Core methods work correctly • Demonstrated in “toy” replication algorithms • Replication algorithm development can begin ADAPT Bologna meeting, Dec. 2003

More Related