Instance Migration in Dynamic Sofuware Update P. Tesone 1,2 G. - - PowerPoint PPT Presentation

instance migration in dynamic sofuware update
SMART_READER_LITE
LIVE PREVIEW

Instance Migration in Dynamic Sofuware Update P. Tesone 1,2 G. - - PowerPoint PPT Presentation

Instance Migration in Dynamic Sofuware Update P. Tesone 1,2 G. Polito 1 L. Fabresse 2 N. Bouraqadi 2 S. Ducasse 1 (1) INRIA LilleNord Europe, France (2) Mines Douai, IA, Univ. Lille, France What is Dynamic Sofuware Update? U p d


slide-1
SLIDE 1

Instance Migration in Dynamic Sofuware Update

  • P. Tesone1,2 – G. Polito1 – L. Fabresse2
  • N. Bouraqadi2 – S. Ducasse1

(1)INRIA Lille–Nord Europe, France (2)Mines Douai, IA, Univ. Lille, France

slide-2
SLIDE 2

What is Dynamic Sofuware Update?

  • Updating a running application. Without needing to

reinitialize the application.

  • Guaranteeing the correct continuity of the execution.
  • Evolving from one version to another (Code + State)
  • Without losing state.
  • Minimizing the downtime.

META ‘16 – Instance Migration in Dynamic Software Update

slide-3
SLIDE 3

Two Use Cases

  • Applications that can not be stopped (ex: global web applications, robotics, etc).
  • Live Development Environments (ex: modifying data structures, complex

refactors, self modifjcation).

  • Similar requirements:

– Migration of state. – Atomicity in the changes. – Validation of the changes.

  • But with some differences

– Size of the changes. – Downtime. – Concurrence. META ‘16 – Instance Migration in Dynamic Software Update

slide-4
SLIDE 4

Generic Update Process Architecture.

DSU Operations & Abstractions DSU Implementation Platform Meta Level Operations Virtual Machine Primitives Patch Description

META ‘16 – Instance Migration in Dynamic Software Update

slide-5
SLIDE 5

Some challenges of Dynamic Sofuware Update

  • How to calculate the changes needed from one version to another.
  • When to perform the changes.
  • What to do with the running threads.
  • How to migrate the data from one version to another.
  • How to validate the changes.
  • Rollback of the changes.

META ‘16 – Instance Migration in Dynamic Software Update

slide-6
SLIDE 6

Instance Migration

  • In a OO Environment the state of the application is

represented in instances inside the environment.

  • The current state has to be preserved between

versions.

  • Any change in the structure or the usage of the
  • bjects has to be updated.

META ‘16 – Instance Migration in Dynamic Software Update

slide-7
SLIDE 7

Possible Changes

  • Creating Instance Variables
  • Removing Instance Variables
  • Renaming Instance variables.
  • Change in the value / usage of an instance variable.
  • All this changes can be applied to a hierarchy,

needing to be propagated.

META ‘16 – Instance Migration in Dynamic Software Update

slide-8
SLIDE 8

Instance Migration Requirements

  • Atomicity
  • Eager / Lazy
  • Support of Application dependent migrations.
  • Support of System and Application Validations
  • Coherence
  • Composability
  • Support of both use cases.
  • Handling global state.

META ‘16 – Instance Migration in Dynamic Software Update

slide-9
SLIDE 9

Proposed Solution

1.The patch declares all the changes to perform. 2.The update process copy the namespace. 3.The update process performs all the changes in the new namespace. 4.The update process migrates all the instances to its new format (if

needed).

5.The new namespace can be validated 6.If everything is correct all the old objects are replaced with the new

  • bjects, replacing the existent namespace with the new one (Bulk

Replace).

META ‘16 – Instance Migration in Dynamic Software Update

slide-10
SLIDE 10

Proposed Interface to Express the Changes.

addClass(classDef) changeSuperclass(subclass, superclass) removeClass(class) addInstanceV ariable(class, variableDef, initialV alue: MigrationPolicy) removeInstanceV ariable(class, variableName) renameInstanceV ariable(class, oldV ariableName, newV ariableName) migrateInstances(class, migrator: MigrationPolicy) addV alidation(validation:V alidation) beginT ransaction() commit() rollback() DSUOperations Validation MigrationPolicy Required MOP META ‘16 – Instance Migration in Dynamic Software Update

slide-11
SLIDE 11

Required Operations

readClassDef nition(Class):ClassDef createClass(classDef):Class readInstanceV ariable(instance, variableName): value writeInstanceV ariable(instance, variableName, value) allInstances(Class):List cloneNamespace(namespaceName):Namespace replaceNamespace(namespaceName,newNamespace:Namespace) swapObjects(oldObjects:List, newObjects:List) RequiredMOP

META ‘16 – Instance Migration in Dynamic Software Update

slide-12
SLIDE 12

Detected Abstractions

  • Migration Policies

– General migration policies – Application Dependent

  • Validations

– System consistence

validations

– Application’s

Validations

migrate ( oldObject, newObject,

  • ldNamespace, newNamespace):void

MigrationPoliciy execute (oldNamespace, newNamespace) : Boolean Validation System Validation 1 Application Validation 1 System Validation N Application Validation M

... ... META ‘16 – Instance Migration in Dynamic Software Update

slide-13
SLIDE 13

Implementation Details

  • Implemented as a Prototype in Pharo.
  • Supporting the update in the two use cases.
  • Implemented as Image side component, no VM modifjcation needed.
  • The full lifecycle of the update process is implemented.
  • Allows research in different alternatives to the different aspects.
  • Simple solutions for some aspects:

– Patch creation – Quiescent point detection – Stack manipulation

META ‘16 – Instance Migration in Dynamic Software Update

slide-14
SLIDE 14

Future work

  • Studying the differences when using lazy migration.
  • Restricting the number of objects to copy.
  • Minimize the downtime (or maximize the operations

that can be done without stopping the application)

  • Improving the detection of changes and providing

more automatic generated migration policies.

  • Smarter detection of Quiescent points.

META ‘16 – Instance Migration in Dynamic Software Update

slide-15
SLIDE 15

Tiank you so much!