Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi...

29
Young-Woo Kwon 1 , Eli Tilevich 1 , and Taweesup Apiwattanapong 2 1 Software Innovations Lab 2 NECTEC Dept. of Computer Science Virginia Tech DECEMBER 3 rd , 2009 URBANA, ILLINOIS

Transcript of Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi...

Page 1: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Young-Woo Kwon1, Eli Tilevich1, and

Taweesup Apiwattanapong2

1Software Innovations Lab 2NECTECDept. of Computer Science

Virginia Tech

DECEMBER 3rd, 2009

URBANA, ILLINOIS

Page 2: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Search facility

Criminal evidence warehouse

Detective

Volatility!!

try {//a remote service invocation}catch (RemoteException e) {//exception handling code}

try {//a remote service invocation}catch (RemoteException e) {//exception handling code}

try {//a remote service invocation}catch (RemoteException e) {//exception handling code}

try {//a remote service invocation}catch (RemoteException e) {//exception handling code}

try {//a remote service invocation}catch (RemoteException e) {//exception handling code}

try {//a remote service invocation}catch (RemoteException e) {//exception handling code}

try {//a remote service invocation}catch (RemoteException e) {//exception handling code}

try {//a remote service invocation}catch (RemoteException e) {//exception handling code}

Too much custom-coded exception handling!!

Page 3: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Component Infrastructures◦ OSGi Service-oriented component platform for Java

(Encapsulation with bundles, Management Architecture)

◦ R-OSGi Remote OSGi to support distributed services (Proxy based

distribution, Exceptions to signal network failure)

Network Volatility◦ Temporary network outage Random channel errors, node mobility, and congestion

Page 4: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Disconnected operations◦ Commonly used techniques

Caching

Queuing

Replication

Hoarding

Multi-modal operations

Aspect Oriented Programming◦ Modularizing cross-cutting concerns

Page 5: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Treat network volatility as a disease◦ Unavoidable and omnipresent

◦ Cannot always prepare for it in advance

E.g., naïve implementation practices, execution environment changes, etc.

Leverage the collected wisdom of distributed system developers◦ Disconnected operations, fault-tolerant designs

Custom-coded for individual applications

Not reusable and hard to customize

Page 6: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Improve on state of the art in middleware◦ Advanced middleware (e.g., R-OSGi)

Raise exceptions in response to network volatility

Reestablish connection once the network is up again

Require programmer handle exceptions manually

Treat symptoms of volatility systematically◦ Use hardening strategies (e.g., medicine) for QoS

◦ Detect volatility, instantiate and deploy a strategy

◦ Return to normal operation once the network is up again

Page 7: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Flu◦ Cannot eliminate the flu

◦ Treat symptoms

◦ Improve the quality of life

Network Volatility◦ Cannot avoid network volatility

◦ Treat symptoms

◦ Improve the quality of service (QoS)

DR-OSGi

DisconnectedOperations

Caching

Queuing

Replication

Hoarding

Page 8: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

1. An approach for hardening distributed component applications with network volatility resiliency

2. Programming abstractions to express hardening strategies

◦ Customizable hardening strategies for networks and applications

◦ Reusable hardening strategies across applications

3. A reference middleware implementation that can harden existing distributed component applications

Page 9: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

DR-OSGi Design & Architecture

Treating Symptoms of Network Volatility

Evaluation◦ Benchmarks

◦ Case Study

Future Work

Conclusion

Page 10: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Transparent◦ Should not affect the core functionality of the

underlying application

Flexible◦ One should be able to start and stop a hardening

strategy dynamically

Extensible◦ Hardening strategies should be easy to

program, modify, and extend

Page 11: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

DR

-O

SG

i

Hardening Manager

Network Monitor

Hardening StrategyDR

-O

SG

i

Hardening Manager

Network Monitor

Hardening Strategy

R-O

SG

i

Remote OSGi

SLP

Channel

Service Tracker

Service Registry

OSG

i…

R-O

SG

i

Remote OSGi

SLP

ChannelService Service Service Service

Service Tracker

Service Registry

OSG

i

Page 12: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

DR-OSGi Design & Architecture

Treating Symptoms of Network Volatility

Evaluation◦ Benchmarks

◦ Case Study

Future Work

Conclusion

Page 13: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Network Monitor

Disconnection Re-connectionNormal

Hardening Manager

ReplicationQueuingCaching

R-OSGi

DR-OSGi

DisconnectedOperations

HardeningStrategies

Exception/EventAnalyzer

DistributedService

DistributedService

DistributedService

DistributedService

ExceptionsEvents

Page 14: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Detect network volatility◦ Hardening manager Monitor network condition

Catch network related exceptions

Manage hardening strategies

Cope with network volatility◦ Hardening manager Notify network condition to hardening strategies

◦ Hardening strategy Provide disconnected operations

Page 15: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Hardening manager as an aspect◦ Network monitor is woven at runtime

◦ JBoss AOP for runtime weaving

Weave a standard OSGi bundle into the R-OSGi at bundle life cycle (e.g., start/stop)

R-OSGiHardening Manager

OSGi

Application

Monitor

Page 16: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Management ◦ Hardening strategy bundles

Track registration/unregistration of hardening strategy bundles

◦ Distributed component applications

Manage applications’ disconnected operations

R-OSGiHardening Manager

OSGi

Application

Queue

Cache

Replica

tion

Monitor

Service Tracker

Notification

Registration

Page 17: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Hardening strategy bundles◦ Standard OSGi bundles

◦ A simple deployment configuration file

Reusable hardening strategies◦ Across different distributed applications

Extensible hardening strategies◦ Can derive new strategies

Customize library bundles to create specialized domain-specific strategies

Page 18: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Programming model

Configuration

public interface DisconnectionListener { public Object disconnectedInvoke( … );public Object reconnected( … );public void remoteInvoke( … );public void serviceAdded( … );public void serviceRemoved( … );

}

public class Queuing implements DisconnectionListener { … }

RemoteServiceName=org.mypackage.MyBundleHardeningServiceName=org.otherpackage.CachingHardening

Page 19: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

DR-OSGi Design & Architecture

Treating Symptoms of Network Volatility

Evaluation◦ Benchmarks

◦ Case Study

Future Work

Conclusion

Page 20: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Remote Log◦ Based on existing OSGi log service

◦ Queuing hardening strategy

Remote User Admin◦ Based on existing User Admin service

◦ Caching hardening strategy

Page 21: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Distributed Search Engine◦ Lucene search engine library

◦ Master-worker model

◦ Caching hardening strategy

◦ Benchmarks

Page 22: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Binding time

5040

5060

5080

5100

5120

5140

5160

5180

5200

5220

R-OSGi DR-OSGi

Bin

din

g t

ime (

ms)

Page 23: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Invocation time

9043.5 9321.9

30.40

1,000

2,000

3,000

4,000

5,000

6,000

7,000

8,000

9,000

10,000

R-OSGi DR-OSGi DR-OSGi

(disconnection)

Invocati

on t

ime (

ms)

Page 24: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

DNA Hound System

Search facility

Criminal evidence warehouse

DetectiveVolatility!!

Queuing

Replication

Page 25: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

DR-OSGi Design & Architecture

Treating Symptoms of Network Volatility

Evaluation◦ Benchmark

◦ Case Study

Future Work

Conclusion

Page 26: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Fault tolerant distribution middleware◦ Network failure, Software failure, Security, etc

Application to other distributed component infrastructures◦ Ex. Remote Service of OSGi R4.2

Page 27: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Distributed applications suffer from temporary network outages

Distribution middleware should provide fault tolerance mechanism◦ Improve reliability and QoS

DR-OSGi◦ Systematic hardening approach to cope with

network volatility◦ Reusable and extensible hardening strategies

Page 28: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that
Page 29: Young-Woo Kwon Eli Tilevich , and ... - Middleware 2009middleware2009.cs.uiuc.edu/slides/DR-OSGi Hardening Distributed Components with...A reference middleware implementation that

Disconnected operations◦ Rover toolkit

◦ Mobile Extension

◦ Odyssey

◦ FarGo-DA

Middleware support for new functionality◦ Adaptive CORBA template (ACT)

Middleware support for fault-tolerance ◦ GRAFT

Systematic security hardening