When scion is embedded in a node.js app that hosts multiple, simultaneous scxml sessions, the global object is shared between these scxml sessions as a result of the platform eval functions use of the process's global object at [1].
var ctx = vm.createContext(global);
In addition, the use of the process's global gives the scxml application access to a number of objects in the node.js environment we'd rather suppress/hide in our environment:
When scion is embedded in a node.js app that hosts multiple, simultaneous scxml sessions, the global object is shared between these scxml sessions as a result of the platform eval functions use of the process's
global
object at [1].In addition, the use of the process's global gives the scxml application access to a number of objects in the node.js environment we'd rather suppress/hide in our environment:
Would be good if the entire eval impl need not be replaced but rather allowed the integrator to pass in the VM's sandbox via the context parameter.
Here's a barebones sandbox that appears to produce the desired behavior:
[1] https://github.com/jbeard4/SCION/blob/master/lib/runtime/platform-bootstrap/node/platform.js#L57