ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach...

12
ActiveContext Erwann Wernli

Transcript of ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach...

Page 1: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

ActiveContext

Erwann Wernli

Page 2: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

Outline

• Why dyn. software update is challenging (5’)• Our approach (5’)• Current stage of the research (5’)

Page 3: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

About safety

• Let’s consider the evolution

PageHtml

PageTitleBody

Page 4: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

About safety• How can we migrate the state?• What happens if old running code accesses field html ?

• What if an execution mixes old and new code?

Method

Method

Method

aPage : Page

Request V1 Method

Method

Method

Request V2

html

Body / header

Page 5: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

Trade-offs

practical

safe

timely

Page 6: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

Trade-offs

practical

safe

timely

FickleMT

HotSwap

Smalltalk

Ginseng

Boyapati

Dynamic C++

JVolve

Gemstone

Delay update Impose constraints

Run-time errors

POLUS

Page 7: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

Trade-offs

practical

safe

timely

HotSwap

Smalltalk

Ginseng

Boyapati

Dynamic C++

JVolve

GemstoneActiveContext

FickleMT

Page 8: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

Our approach

a context is always version-consistent

html := aPage html. newCtx := NewContext ancesor: oldCtx. newCtx do: [ aPage header ,

aPage body ].

new

Page 9: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

Request V1

Method

Method

Bi-directional transformation

Shared object has one identity but two states

Old

con

text

aPage: Page

New context…

Method

Method

Request V2

Dyn

amic

evo

lutio

n

Solution:- State transfer- Safe concurrency- Reflective extension

Page 10: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)
Page 11: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

Design

Strategy Instantiation Concurrent read/write

Garbage collection

Expected overhead

Eager Migrate objects

Sync on write Garbage when not used

High

Lazy Does nothing Sync on dirty read

Force migration prio to GC

Medium

Page 12: ActiveContext Erwann Wernli. Outline Why dyn. software update is challenging (5’) Our approach (5’) Current stage of the research (5’)

Conclusion

• First-class contexts ensure version consistency

• Safe dynamic software update

• Working implementation

• Future work: enable lazy sync & GC