ajvincent / es-membrane

An ECMAScript implementation of a Membrane, allowing users to dynamically hide, override, or extend objects in JavaScript with controlled effects on the original objects.
ISC License
109 stars 13 forks source link

Experiment: "pointer-to-pointer" redirection across graphs (allow a graph to be reloaded) #195

Open ajvincent opened 5 years ago

ajvincent commented 5 years ago

Just a thought: if an object graph hits a serious error, being able to quickly rebuild it might be useful.

I'm not sure this would be a viable mechanism though.

cliveb commented 5 years ago

I second the thought about taking steps to make the mechanism resilient. From my perspective far more interoperability will be programmed in web apps than in back-ends because of flexibility and customization (we are just beginning to discuss SES at the Hyperledger Architecture WG).

ajvincent commented 5 years ago

Just to clarify: I am not talking about reversing a revocation of an object graph. Rather, if object graph A refers to graph B (and this is the only distortion on A), and B refers to O, and B has some sort of failure, it might be worth considering quickly creating graph C such that A -> C -> O.

Also, suppose O had a failure in the above mechanism that demanded a reload of its objects. That might demand revoking B anyway.

This might fall apart in the realm of objects owned by A (think event listeners).