Presentation is loading. Please wait.

Presentation is loading. Please wait.

Java-based component framework for dynamic reconfiguration 소프트웨어 재사용 방법론 2011 년 3 월 22 일 ( 화 ) 발표자 : 전승우.

Similar presentations


Presentation on theme: "Java-based component framework for dynamic reconfiguration 소프트웨어 재사용 방법론 2011 년 3 월 22 일 ( 화 ) 발표자 : 전승우."— Presentation transcript:

1 Java-based component framework for dynamic reconfiguration 소프트웨어 재사용 방법론 2011 년 3 월 22 일 ( 화 ) 발표자 : 전승우

2 Ubiquitous Computing Database Lab Pusan National University Contents  Introduction  Component framework overview  Implementation of component framework  Dynamically reconfigurable TCP and performance evaluation  Conclusions 2

3 Ubiquitous Computing Database Lab Pusan National University Introduction  Present situation  update software online via the Internet  must be stopped before updating and restarted after the update  Dynamic reconfiguration  the above situation can be improved 3 a.system consists of three modules: A, B, C b.new version of B, B’ is created in system c.The state of B is transferred to B’ d.B’ refers to the modules to which B originally referred e.external references of B are directed to B’ f.B is removed from system and dynamic reconfiguration process is complete

4 Ubiquitous Computing Database Lab Pusan National University Introduction  Three basic requirements  safe reconfiguration point  quiescent state or safe state  state transfer mechanism  transfers the state from the old module to the new module  external reference management  ensure that the new module can be accessed by its external references  Evaluation ways  what kinds of change the system supports  method reimplementation < method redefinition < field redefinition  how it preserves a safe reconfiguration point  use blocking protocols, use proxy classes, inspect stack 4

5 Ubiquitous Computing Database Lab Pusan National University Introduction  Design goals  exploit the features of the Java language and the virtual machine  make the reconfiguration transparent to components  allow several kinds of change  method reimplementation, external and internal method redefinition, field redefinition and multiple update  select implementation techniques  can minimize both the runtime and reconfiguration overheads  Implementations  focus on portability, performance  Demonstration of component framework’s capability  a dynamically reconfigurable TCP implementation has been developed 5

6 Ubiquitous Computing Database Lab Pusan National University Component framework overview  System architecture 6 create and connect component instances for the user application replace a component configuration with new one how to program a component how components are composed How components are reconfigured provides an execution environment to the component framework consists of a number of components uses the components to perform given task

7 Ubiquitous Computing Database Lab Pusan National University Component framework overview  Example a.startup program is executed b.create, connect the component instances: C1, C2 c.component instances perform normal processing d.reconfiguration management subsystem receive reconfiguration message e.components are temporarily stopped and reconfiguration program is invoked f.continue their processing 7

8 Ubiquitous Computing Database Lab Pusan National University Component framework overview  Component model  component is a Java class  component instance is a Java object of a component class  components can only communicate with each other through Java interfaces  Two additional programming rules for ensuring state transfer  A component must implement the serializable interface  A component reference must be declared as transient 8

9 Ubiquitous Computing Database Lab Pusan National University Component framework overview  Compatible changes and user-defined handler  three requirements for compatibility between components  implement the same interfaces  if the old version refers to a component, the new version must also refer to this component and the component reference must be stored in the same field  two component versions must declare the same fields  user-defined handler  when finish to transfer, provide the handler  a class that implements a convert method 9

10 Ubiquitous Computing Database Lab Pusan National University Component framework overview  Example 10 old version new version component1 component2

11 Ubiquitous Computing Database Lab Pusan National University Component framework overview  Programming rules for user application  Programming rules for interacting with component instances  communicate with components directly  refer to component instances through Java interfaces  register itself to component repository  During reconfiguration, the component instances can be altered by the component framework  access component instances through component adapter  component adapter  provides a programming interface to the user application to access components. 11

12 Ubiquitous Computing Database Lab Pusan National University Component framework overview  Limitations of component model  component instance must act either active component or passive component  only a passive component can be reconfigured dynamically  a passive component only invokes other passive components when it is executed  Solution  an application can be composed without an active component 12

13 Ubiquitous Computing Database Lab Pusan National University Implementation of component framework  Two implementation  Java serialisation, Java reflection, JNI and JVMDI 13 ApproachCharacteristicAdvantageDisadvantage serialization-basedwritten in Java and the librariesportable slower, safe reconfiguration point don’t preserve native programmingwritten in Java and Cfasterplatform-dependent Java serializationJava reflectionJNI and JVMDI - the object persistence scheme - provides two main classes * ObjectOutputStream * ObjectInputStream - belong structural reflection - allow to inspect structure - modify content of object during runtime - provide a set of C functions to communicate with Java objects(JNI) - provide a set of C functions to monitor or modify the execution state(JVMDI)

14 Ubiquitous Computing Database Lab Pusan National University Implementation of component framework  Safe reconfiguration point of serialization-based approach  not consider blocking protocol  cannot use reference counting  use simple locking mechanism  component framework provides a lock class to control the access of all passive components  when the component framework acquires the lock, it must be a safe reconfiguration point  State transfer of serialization-based approach  three steps  object serialization  store old component instance to an in-memory byte stream  byte stream rewriting  modify byte stream from old component class to new component class  object deserialization  create component instance from modified byte stream 14

15 Ubiquitous Computing Database Lab Pusan National University Implementation of component framework  Replace operation of serialization-based approach  consist of six major steps  component locating  search component repository  state transfer  transfer component state  reference duplication  copy component references from old component instance to new component instance  reference redirection  redirect component references  invoke user-defined handler  execute user-defined handler  component registration  deregister old component instance and register new component instance to component repository 15

16 Ubiquitous Computing Database Lab Pusan National University Implementation of component framework  Implementation of native programming approach  safe reconfiguration point  use stack inspection technique  suspend all the Java threads  get each stack frame of each suspended thread  find the instruction location of each inspected stack frame  state transfer  based on the type of fields held by the component class  replace operation  consist of eight main steps 16 component locatingstack inspectionstate transferreference duplication user-defined handler invokingreference redirectioncomponent registrationthread resumption native part java part

17 Ubiquitous Computing Database Lab Pusan National University Implementation of component framework  Implementation of external method redefinition and multiple update  external method redefinition implies a multiple update  multiple update occurs when more than one component needs to be updated at the same time  multiple update steps  locates the components to be replaced  detects a safe reconfiguration point  all the new component instances are created and transferred at once  perform reference duplication and reference redirection  perform the user-defined handler invoking and component registration  resume Java threads 17

18 Ubiquitous Computing Database Lab Pusan National University Implementation of component framework  Implementation of external method redefinition and multiple update  Example 18 reference duplicationreference redefinition new version of component B, B’ would refer to component A since A is also replaced, B’ will refer to A’ rather than A component A would change its reference to refer to B’ since component A itself is also replaced, component A’ rather than component A will refer to B’

19 Ubiquitous Computing Database Lab Pusan National University Dynamically reconfigurable TCP and performance evaluation  Dynamically reconfigurable TCP  TCP1  initial version that supports only single TCP connection  FastTimer, SlowTimer  delayed acknowledgment and retransmission timer  StackIF  responsible for communicating with low-level protocols and high-level applications 19

20 Ubiquitous Computing Database Lab Pusan National University Dynamically reconfigurable TCP and performance evaluation  Performance of normal execution  overhead of component framework is just method invocation on an interface  an empty method that has no argument and no return value. 20

21 Ubiquitous Computing Database Lab Pusan National University Dynamically reconfigurable TCP and performance evaluation  Performance of replace operation 21 standard deviations are bar getrusage function Linux measures the actual processor time System.currentTimeMillis method Java measures execution time

22 Ubiquitous Computing Database Lab Pusan National University Dynamically reconfigurable TCP and performance evaluation  Performance of replace operation 22 state transfer is the most time-consuming step n ative programming approach spends only one-ninth of the serialization only approach in this step state transfer overhead of component depends on two factors the number of fields the target component declares the complexity of each individual field

23 Ubiquitous Computing Database Lab Pusan National University Conclusions  Three basic issues  safe reconfiguration point  state transfer mechanism  external reference management  Don’t consider part  update is correct  formalization of dynamic software updating  Two implementations  uses Java serialisation and Java reflection  exploits the programming of JNI and JVMDI 23


Download ppt "Java-based component framework for dynamic reconfiguration 소프트웨어 재사용 방법론 2011 년 3 월 22 일 ( 화 ) 발표자 : 전승우."

Similar presentations


Ads by Google