[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[S8] Balloons

S8 balloon/bubble

A balloon/bubble is a complete smalltalk environment capable to be activated for execution.
A running S8 system can be stored into a balloon/bubble, and set another balloon as the current system to continue execution.
Note that execution state is not saved/restored when jumping onto a bubble, control on execution is chained to the new global state (the frames in the stack will execute in the target bubble).

Save system state in a balloon

Balloon new save

Inflating a balloon

We call "inflating a balloon" the process that instantiates a system from snapshot literal been encapsulated in a balloon.
The inflated balloon can be activated from hosting system.
Both systems, the current executing system and the balloon(s), share the same object space; but each balloon has dependencies that make behavior secure only when the balloon is running/activated.

To inflate a balloon of a S8 system snapshot, evaluate:
Balloon inflate: aSnapshot

Clonning the system

We can make a snapshot and inflate a balloon to obtain a clone of the current system.
Balloon inflate: Snapshot contents

Implementation

See sources at S8 tools folder.

To load and browse the implementation in an U8 system you can evaluate:
U8Configuration current loadFile: 'Baloon?u8:aleReimondo/s8/tools/Baloons.st.js'.
Balloon browse



Use cases

Embedding a clean S8 snapshot without launching

This technique can be used to build a system assembling elements dynamically using U8 tools running in the host system without running the target.
Once completed the assembly it can be exported as a snapshot file (or sent to another execution environment).

Balloon inflate: ('http://u8.smalltalking.net/profile/aleReimondo/s8/s8.snapshot.js' fileContents upTo: 'smalltalk.launchImage();')