a dapt ist-2001-37126 replication framework: progress report vance maverick university of bologna...
Post on 18-Dec-2015
217 views
TRANSCRIPT
![Page 1: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/1.jpg)
ADAPT IST-2001-37126
Replication Framework:Progress Report
Vance Maverick
University of Bologna
Dec. 11, 2003
![Page 2: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/2.jpg)
ADAPT Bologna meeting, Dec. 20032 ADAPT
Outline
• Framework recap• EJB implementation• Web-service implementation• Transaction interception• Deployment support• Some open issues• Summary
![Page 3: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/3.jpg)
ADAPT Bologna meeting, Dec. 20033 ADAPT
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
![Page 4: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/4.jpg)
ADAPT Bologna meeting, Dec. 20034 ADAPT
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
![Page 5: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/5.jpg)
ADAPT Bologna meeting, Dec. 20035 ADAPT
Intercepting invocations
ComponentMonitor
Handle
?
call()
call()
• Container diverts invocation to ComponentMonitor• Response call(ComponentHandle, Request)
• CM may perform arbitrary computation + communication
• To continue execution, it forwards call to ComponentHandle
InterceptedNormal
![Page 6: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/6.jpg)
ADAPT Bologna meeting, Dec. 20036 ADAPT
Communicating component state
ComponentMonitor
Handle
ComponentMonitor
Handle
Handle
State
StateState
• ComponentMonitor does not reference component directly
• Instead, uses serializable ComponentHandle
• Gets and sets state as opaque serializable “blob” (bytes)
![Page 7: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/7.jpg)
ADAPT Bologna meeting, Dec. 20037 ADAPT
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
![Page 8: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/8.jpg)
ADAPT Bologna meeting, Dec. 20038 ADAPT
EJB Invocation Interception
Persistence Manager
EJB Container
Interceptors
EJBEJB
EJB
![Page 9: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/9.jpg)
ADAPT Bologna meeting, Dec. 20039 ADAPT
EJB Invocation Interception
Persistence Manager
EJB Container
Interceptors
EJBEJB
EJB
Component Monitor
Call Management
Persistence Management
![Page 10: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/10.jpg)
ADAPT Bologna meeting, Dec. 200310 ADAPT
EJB Persistence Invocation Interception
Persistence Manager
EJB Container
Interceptors
EJBEJB
EJB
![Page 11: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/11.jpg)
ADAPT Bologna meeting, Dec. 200311 ADAPT
EJB Persistence Invocation Interception
Persistence Manager
EJB Container
Interceptors
EJBEJB
EJB
Component Monitor
Call Management
Persistence Management
Wrapper
![Page 12: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/12.jpg)
ADAPT Bologna meeting, Dec. 200312 ADAPT
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
![Page 13: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/13.jpg)
ADAPT Bologna meeting, Dec. 200313 ADAPT
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
![Page 14: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/14.jpg)
ADAPT Bologna meeting, Dec. 200314 ADAPT
Handlers in Axis
• Handler model defined by Sun (JAX-RPC)
handleRequest()
handleResponse()
handleRequest()
handleResponse()
ServiceObject
HTTP
![Page 15: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/15.jpg)
ADAPT Bologna meeting, Dec. 200315 ADAPT
handleRequest()
handleResponse()
handleRequest()
handleResponse()
ServiceObject
static call()
call() call()
ComponentMonitor ComponentHandle
Proxy
AXIS
TxHandler WSMon Handler
“Normal”Axis chainHandlersdisabled
ComponentInterception
![Page 16: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/16.jpg)
ADAPT Bologna meeting, Dec. 200316 ADAPT
Container
Transactions
EJB
TransactionManager
PersistenceManager
DataSource(XAResource)
Read,Write
begin,commit
prepare, commit, rollback
![Page 17: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/17.jpg)
ADAPT Bologna meeting, Dec. 200317 ADAPT
Container
Transactions
TransactionManager
PersistenceManager
DataSource(XAResource)
Read,Write
begin,commit
prepare, commit, rollback
TransactionInterceptor
begin,commit
EJB
![Page 18: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/18.jpg)
ADAPT Bologna meeting, Dec. 200318 ADAPT
Container
Transactions
PersistenceManager
DataSource(XAResource)
Read,Write
begin,commit
prepare, commit, rollback
TransactionInterceptor
EJB
![Page 19: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/19.jpg)
ADAPT Bologna meeting, Dec. 200319 ADAPT
Remote Deployment (Farming)
Component Monitor
Container Support
Component Monitor
Container Support
![Page 20: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/20.jpg)
ADAPT Bologna meeting, Dec. 200320 ADAPT
Remote Deployment (Farming)
Component Monitor
Container Support
Component Monitor
Container Support
Notification
![Page 21: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/21.jpg)
ADAPT Bologna meeting, Dec. 200321 ADAPT
Remote Deployment (Farming)
Component Monitor
Container Support
Component Monitor
Container Support
Transmission
![Page 22: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/22.jpg)
ADAPT Bologna meeting, Dec. 200322 ADAPT
Remote Deployment (Farming)
Component Monitor
Container Support
Component Monitor
Container Support
Deployment
![Page 23: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/23.jpg)
ADAPT Bologna meeting, Dec. 200323 ADAPT
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
![Page 24: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/24.jpg)
ADAPT Bologna meeting, Dec. 200324 ADAPT
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
![Page 25: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/25.jpg)
ADAPT Bologna meeting, Dec. 200325 ADAPT
Open issues II: Client-side invocation
ComponentMonitor
Stub
ComponentMonitor
Stub
ComponentMonitorComponentMonitor
Cluster 1
Cluster 2
![Page 26: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/26.jpg)
ADAPT Bologna meeting, Dec. 200326 ADAPT
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
![Page 27: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/27.jpg)
ADAPT Bologna meeting, Dec. 200327 ADAPT
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)
![Page 28: A DAPT IST-2001-37126 Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003](https://reader030.vdocuments.us/reader030/viewer/2022013004/56649d255503460f949fba42/html5/thumbnails/28.jpg)
ADAPT Bologna meeting, Dec. 200328 ADAPT
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