Title: QoS Feature Development and Deployment for Distributed Heterogeneous Systems
1QoS Feature Development and Deployment for
Distributed Heterogeneous Systems
- Eric Wohlstadter
- University of California, Davis
2Remote Collaboration Tool (RCT) Walters,
Amsler
Server
Network
Relational Storage
Client
- Open source remote classroom software
- Developed at UCDavis (http//davinci.cs.ucdavis.e
du) - Interactive collaboration chat, blackboard,
audio - 3-Tier Architecture
- Java Client and C Server
3Need to Adapt Applications
- Example QoS Requirements
- Security
- Availability
- Differentiated Service
- Example Feature Implementation
- Client Puzzle Protocol (CPP)
4Adapt RCT to Resist DOS Attacks
Server
Network
Relational Storage
Client
- QoS Requirement
- Protect server from malicious DOS attack
5Adapt RCT to Resist DOS Attacks
Server
Network
Relational Storage
Client
- QoS Requirement
- Protect server from malicious DOS attack
6Client Puzzle Protocol (CPP)Dwork, Naor, Dean
Old System
New System
Puzzle(Client )
Puzzle(Server )
Malicious client overloads server cpu
resources Legitimate service rendered
impractical
Server issues cryptographic puzzle Hash(random)
digest Clients pay cpu resources Hash(x)
digest?
7Adapt Remote Procedure Call (RPC)
Old System
Server Active
Start
Success
New System
Server CPP Active
Start
Client CPP Active
Server Active
Success
8RCT Interfaces
Interfaces Divide programmer effort for scalable
development process Reduces costs Improves
quality
9Hard to develop QoS features on distributed
applications
- Features affect many interfaces
- Breaks encapsulation
- Different for each application
- Features affect client and server
- Need to ensure consistent deployment
- Need to support platform heterogeneity
- Interaction model (RPC) is too rigid
10Outline
- Related Work
- Aspect Oriented Programming
- Adaptlets
- Policy Overview
- Future Work
11Aspect Oriented Programming Kiczales et. al.
- Language for encapsulating crosscutting features
- Crosscutting
- Related changes in two or more interfaces
- Advice
- New code to change (wrap) existing functions
- Pointcut
- Existing functions that need changing
login advice active
Start
login active
Success
login advice active
12Puzzle Protocol Crosscuts RCT
Pointcut
Advice
13Adding Authorization
Server CPP advice active
Start
Client CPP active
Server Authorization advice active
Server Active
Client Authorization active
Server CPP advice active
Success
Server Authorization advice active
14Applying AOP to RCT
Server lt Authorization lt CPP
Client lt Authorization lt CPP
1. Call
2. CPP Error
3. CPP Response/Call
4. Authorization Error
5. Authorization Response/Call
AOP Model imposes total ordering Requirements
dictate partial ordering
15Desiderata
- Client/Server AOP
- Client/Server deployment
- Effective use of multiple aspects
- Support for heterogeneity
16Outline
- Background
- Adaptlets
- Policy Overview
- Future Work
17Adaptlet Development
Application Process
Adaptlet Process
Interface
Interface
Code
Code
Adaptlet
Application
18Adaptlet Development
Application Process
Adaptlet Process
Interface
Interface
Code
Code
Pointcuts
Adaptlet
Application
Adaptlet Compiler
Adapted Application
19Example Client-Puzzle Adaptlet
1. Server can block client requests that access
database 2. Server can issue puzzles to client 3.
Client can respond with solutions
- adaptlet CPP
-
- server
- advice void puzzle( ) Authorization.( )
Service.join() - data(thread) PuzzleResponse solution
-
- client
- request puzzleChallenge(in PuzzleChallenge
ch) -
-
1.
3.
2.
20Adaptlet Advice
- Dispatched Advice
- Bound by pointcuts
-
CPP. puzzle
gt RCT.login
Authorization
gt RCT.login
Router
Router
1. RCT.login
AND
2. puzzle
3. verify
Auth
CPP
21Adaptlet Request RPC Extension
- Multiple embedded adaptlet calls
- Maintains call context
-
Router
Router
4. CPP.challenge Authorization.identify
6. identify
5. challenge
Auth
Auth
CPP
CPP
22Adaptlet Data RPC Extension
- Scoped distributed state
- Per-thread
- Per-Adaptlet
Router
Router
7. RCT.login CPP.solution value
Authorization.identity value
8. solution value
9. identity value
Auth
Auth
CPP
CPP
23Adaptlet Data RPC Extension
- Scoped distributed state
- Per-thread
- Per-Adaptlet
Router
Router
12. login
10. puzzle
11. verify
Auth
Auth
CPP
CPP
24Adaptlet Compilation
Adaptlet Interface
Adaptlet Stub
Stub Compiler
Pointcuts
Adaptlet
Query Engine
Weaver
Application Interface
New App
Application
25Heterogeneity and Consistency
Java Client Application
C Server Implementation
Adaptlets
Adaptlets
Adaptlets
Stubs
Stubs
Middleware
Middleware
Windows Binary
Custom Stubs
ByteCode
Weaver
26Measurements
Averaged over 10 trials of 10000 calls Initial
overhead 80 Additional request overhead
1.6 Internet Ping Delay from Portland to SF
70ms
27Adaptlet Details
- Applied to Remote Collaboration Tool
- Mobility unpublished
- Puzzle Protocol Tech Report
- Performance Monitoring ICSE 2003
- Caching DOA QoS Workshop 2004
- Adaptlets are
- RPC extensions
- Deployed consistently
- Flexibly deployed
28Outline
- Background
- Adaptlets
- Policy Overview
- Future Work
29GlueQoS
- Problem
- Web Services span policy administration
boundaries - Feature agreement must be resolved at runtime
- Example
- Server policy
- 1. Client rewarded ½ puzzle size for
authentication - 2. CPP is required if server load is over 50
- Client policy
- 1. Never use authentication
- 2. CPP puzzle size lt 18
30Start with WS-Policy
- Web Service protocol policies
- Assertions
- XML text
- Text is opaque
- N-ary operators
- ExactlyOne
- OneOrMore
- All
31GlueQoS WS-Policy Middleware
- Resolve policies for client and server at runtime
- ExactlyOne (xor)
- OneOrMore (or)
- All (and)
- Structure assertions with types
- Provide operators to build policies from input
- However resolution is NP-Complete
- Solvable in under .01ms for under 100 variables
- 1000 randomly generated HARD instances tested
with ZchaffFu using fixed-clause method (k3)
32Policy Elements
- Assertions (WS-Policy)
- e.g. CPP
- Typed Parameters
- Enumerated types
- Real values with unary interval constraints
- e.g. CPP10 lt size lt 18
- Policy constructors
- Parameter values
- e.g. CPPsize cpu
- Conditional clauses
- e.g. CPP if (cpu gt .5)
33Policy Protocol
Input Callbacks
Input Callbacks
Client Policies
Server Policies
PolicyManager
PolicyManager
Resolve Configuration
Session Protocol
Session Protocol
1. Client sends policy 2. Server solves
policies 3. Server sends solution 4. Client
verifies solution
SAT Verifier
SAT Solver
Web Services Middleware
Web Services Middleware
34Two Feature Server Policy
- let
- cpu cpuUsage( ),
- puzzleMax 16
- in
- (1) ((CPPsize cpupuzzleMax/2 and
Authentication) - (2) xor CPPsize cpupuzzleMax
- (3) xor (Authentication if (cpu lt .5)))
- 1. Client rewarded ½ puzzle size for
Authentication - 2. No Authentication requires full puzzle size
- 3. CPP is required if server load is over 50
35Satisfiability
- Convert into k-SAT
- Possible exponential blow-up
- Convert parameterized assertions into
- unique variables
- ex. (CPPsize gt 10 xor Authentication) and
- (CPPsize 8)
- becomes
- (A xor Authentication) and
- B and
- (A implies not(B)) and (B implies not(A))
- Proof by induction on number of variable
instances with parameters -
-
36GlueQoS Status
- Implemented for Apache Axis
- Property of IBM
- Integration with Adaptlets in progress
- GlueQoS provides
- Resolution engine
- Structured policies for parameterization
- WS-Policy construction
37Outline
- Background
- Adaptlets
- Policy Overview
- Future Work
38Future Work
- Research focus
- Adaptive Distributed Systems
- Global Battlesphere Initiative
- Knowledge Plane
- K-App Middleware
Knowledge Plane
Deployment Policies
Formal Analysis/ Testing
Component Metadata
Components
Middleware
39Thank you
- Adaptlets
- International Conference on Software Engineering,
2003. - Wohlstadter E. , Jackson S., and Devanbu P.,
- International Conference on Software Engineering
Formal Software Demonstration, 2004. - Wohlstadter E. , Jackson S., and Devanbu P.
- GlueQoS Policy
- International Conference on Software Engineering,
2004. - Wohlstadter E., Tai S., Mikalsen T., Rouvellou
I., and Devanbu P. - Data and Knowledge Engineering Special Issue on
Contract-based Coordination and Collaboration,
2004 - Tai S., Mikalsen T., Wohlstadter E., Desai N.,
Rouvellou I.