1 qos feature development and deployment for distributed heterogeneous systems eric wohlstadter...

39
1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

Upload: clyde-curtis

Post on 16-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

1

QoS Feature Development and Deployment for Distributed Heterogeneous Systems

Eric Wohlstadter

University of California, Davis

Page 2: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

2

Remote Collaboration Tool (RCT) [Walters, Amsler]

Open source remote classroom software Developed at UCDavis (http://davinci.cs.ucdavis.edu) Interactive collaboration: chat, blackboard, audio 3-Tier Architecture Java Client and C++ Server

Server Relational Storage

Client Network

Page 3: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

3

Need to Adapt Applications

Example QoS Requirements Security Availability Differentiated Service

Example Feature Implementation Client Puzzle Protocol (CPP)

Page 4: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

4

Adapt RCT to Resist DOS Attacks

QoS Requirement:Protect server from malicious DOS attack

ServerClient Relational Storage

Network

Page 5: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

5

Adapt RCT to Resist DOS Attacks

ServerClient Relational Storage

QoS Requirement:Protect server from malicious DOS attack

Network

Page 6: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

6

Client Puzzle Protocol (CPP)[Dwork, Naor, Dean]

Old System

Malicious client overloads server cpu resources

Legitimate service rendered impractical

Server issues cryptographic puzzle:Hash(random) = digest

Clients “pay” cpu resources:Hash(x) == digest?

New SystemPuzzle(Client )

Puzzle(Server )

Page 7: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

7

Adapt Remote Procedure Call (RPC)

Start Server Active

Success

Start

Server ActiveSuccess

Server CPP Active

Client CPP Active

Old System

New System

Page 8: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

8

RCT Interfaces

+sendLine()

«interface»BlackboardService

+login()+logout()

«interface»Authorization

+join()+leave()

«interface»InteractiveService

+sendMsg()

«interface»ChatService

Interfaces:Divide programmer effort for scalable development process

Reduces costsImproves quality

Page 9: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

9

Hard to develop QoS features on distributed applications

Features affect many interfacesBreaks encapsulationDifferent for each application

Features affect client and serverNeed to ensure consistent deploymentNeed to support platform heterogeneity

Interaction model (RPC) is too rigid

Page 10: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

10

Outline

Related Work :

Aspect Oriented Programming Adaptlets Policy Overview Future Work

Page 11: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

11

Aspect 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

Startloginactive

Success

login advice active

login advice active

Page 12: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

12

Puzzle Protocol Crosscuts RCT

+sendLine()

«interface»BlackboardService

+login()+logout()

«interface»Authorization

+join()+leave()

«interface»InteractiveService

+sendMsg()

«interface»ChatService

+makePuzzle()+puzzleChallenge()+puzzleResponse()

«interface»Puzzle Protocol

Pointcut

Advice

Page 13: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

13

Adding Authorization

Success

Start

Server Active

Server CPP advice active

Client CPP active Server Authorization advice

active

Client Authorizationactive

Server CPP advice active

Server Authorization adviceactive

Page 14: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

14

Applying AOP to RCT

AOP Model imposes total ordering

Requirements dictate partial ordering

Server < Authorization < CPPClient < Authorization < CPP

1. Call

2. CPP Error

3. CPP Response/Call

4. Authorization Error

5. Authorization Response/Call

Page 15: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

15

Desiderata

Client/Server AOP Client/Server deploymentEffective use of multiple aspectsSupport for heterogeneity

Page 16: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

16

Outline

Background

Adaptlets Policy Overview Future Work

Page 17: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

17

Adaptlet DevelopmentApplication

ProcessAdaptletProcess

Interface

Code

Interface

Code

Application Adaptlet

Page 18: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

18

Adaptlet DevelopmentApplication

ProcessAdaptletProcess

Interface

Code

Interface

Code

Application Adaptlet

Adaptlet Compiler

Pointcuts

AdaptedApplication

Page 19: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

19

Example: Client-Puzzle Adaptlet

adaptlet CPP{

server { advice void puzzle( ) : Authorization.*( ) && Service.join(); data(thread) PuzzleResponse solution;};

client { request puzzleChallenge(in PuzzleChallenge ch);};

};

1. Server can block client requests that access database2. Server can issue puzzles to client3. Client can respond with solutions

1.

2.

3.

Page 20: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

20

Adaptlet Advice Dispatched Advice Bound by pointcuts

1. RCT.login

2. puzzle

CPP.puzzle

> RCT.login

Authorization > RCT.login

CPP Auth

Router Router

3. verifyAND

Page 21: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

21

Adaptlet Request RPC Extension Multiple embedded adaptlet calls Maintains call context

4. CPP.challenge + Authorization.identify

5. challenge 6. identify

Router Router

CPP AuthCPP Auth

Page 22: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

22

Adaptlet Data RPC Extension Scoped distributed state

Per-thread Per-Adaptlet

7. RCT.login + CPP.solution = value+ Authorization.identity = value

Router Router

CPP AuthCPP Auth

8. solution = value9. identity = value

Page 23: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

23

10. puzzle

CPP Auth

Router Router

11. verify

CPP Auth

Adaptlet Data RPC Extension Scoped distributed state

Per-thread Per-Adaptlet

12. login

Page 24: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

24

Adaptlet CompilationAdaptlet Interface

Adaptlet Stub

Application Interface

Pointcuts

Application

Stub Compiler

Query Engine

Weaver New App

Adaptlet

Page 25: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

25

Adaptlets

Adaptlets

Stubs

Java Client Application Adaptlets

Stubs

C++ Server Implementation

Heterogeneity and Consistency

Middleware Middleware

ByteCode Custom Stubs

Weaver

Windows Binary

Prem
Should we really have the proxy/adapter on the server side? Or should the client side be called proxy and the server side be called interceptor. A
Page 26: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

26

MeasurementsSec/Call versus added Advice or Request

00.00010.00020.00030.00040.0005

1 2 3 4 5 6 7 8 9 10

# Advice or Request

Se

co

nd

s

OriginalAdviceRequest

Averaged over 10 trials of 10000 callsInitial overhead : 80%Additional request overhead: 1.6%Internet Ping Delay from Portland to SF: 70ms

Page 27: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

27

Adaptlet 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

Page 28: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

28

Outline

Background Adaptlets

Policy Overview Future Work

Page 29: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

29

GlueQoS 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 < 18

Page 30: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

30

Start with WS-Policy

Web Service protocol policiesAssertions

XML text Text is opaque

N-ary operators ExactlyOne OneOrMore All

Page 31: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

31

GlueQoS 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

Zchaff[Fu] using fixed-clause method (k=3)

Page 32: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

32

Policy Elements Assertions (WS-Policy)

e.g. CPP Typed Parameters

Enumerated types Real values with unary interval constraintse.g. CPP[10 < size < 18]

Policy constructorsParameter values

e.g. CPP[size = cpu]Conditional clauses

e.g. CPP if (cpu > .5)

Page 33: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

33

Policy Protocol

PolicyManager

SAT Verifier

Client Policies

InputCallbacks

Session Protocol

PolicyManager

SAT Solver

Server Policies

Session Protocol

Web ServicesMiddleware

Web ServicesMiddleware

InputCallbacks

Resolve Configuration

1. Client sends policy2. Server solves policies3. Server sends solution4. Client verifies solution

Page 34: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

34

Two Feature Server Policy

let cpu = cpuUsage( ),puzzleMax = 16

in(1) ((CPP[size = cpu*puzzleMax/2] and Authentication)(2) xor CPP[size = cpu*puzzleMax](3) xor (Authentication if (cpu < .5)))

1. Client rewarded ½ puzzle size for Authentication2. No Authentication requires full puzzle size3. CPP is required if server load is over %50

Page 35: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

35

Satisfiability Convert into k-SAT

Possible exponential blow-up Convert parameterized assertions into

unique variables ex. (CPP[size > 10] xor Authentication) and

(CPP[size = 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

Page 36: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

36

GlueQoS Status Implemented for Apache Axis

Property of IBM Integration with Adaptlets [in progress] GlueQoS provides

Resolution engineStructured policies for parameterizationWS-Policy construction

Page 37: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

37

Outline

Background Adaptlets Policy Overview

Future Work

Page 38: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

38

Future Work Research focus

Adaptive Distributed Systems Global Battlesphere Initiative Knowledge Plane

K-App Middleware

DeploymentPolicies

ComponentMetadata

FormalAnalysis/Testing

Knowledge Plane

ComponentsMiddleware

Page 39: 1 QoS Feature Development and Deployment for Distributed Heterogeneous Systems Eric Wohlstadter University of California, Davis

39

Thank 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, 2004Tai S., Mikalsen T., Wohlstadter E., Desai N., Rouvellou I.