marekjm / viuavm

Parallel virtual machine designed to reliably run massively concurrent programs
https://viuavm.org/
GNU General Public License v3.0
71 stars 11 forks source link

Add version header to modules #151

Closed marekjm closed 6 years ago

marekjm commented 8 years ago

Modules should be versioned. This would provide certain benefits:

Example without versioned modules: process P1 is in the middle of a function module::a/1, and process P2 requests module module to be relinked. Machine relinks the code. Process P1 calls module::b/1 and crashes because implementation of the module have changed.

Example with versioned modules: process P1 is in the middle of a function module::a/1, and process P2 requests module module to be relinked. Machine relinks the code. Process P1 calls module::b/1, and sends the version of the module along with function signature when requesting entry point. VM supplies entry point for that version. Process P2 calls module::a/1 but uses newer version. Machine supplies entry point for that newer version.

marekjm commented 6 years ago

Tracked by issue b0c4d6d67baa69a3c39af4ae24688c6a58043afc.