Generally, the things mentioned above were in my mind when creating this 
stuff. As I've played around with proxies and used them to achieve certain 
tasks, a few generalized patterns emerged and the library is the overall 
result of the last year or so of that.

Specifically with the membrane, the first thing in my mind is a general 
"omniscience" debugging tool, or like a kind of heat map of "action". 
Imagine for a second that you could zoom out and look at your program 
visually, some sort of representation of it. Node does this with the REPL 
and console by default, and I've greatly expanded on the rendering of that 
with my own repl. Now imagine a full instrumented runtime environment, 
where you could see in real time as the action moves between areas of your 
application, or the "pings" or execution time is represented as a heat map, 
literally showing you the hot code.

This is (relatively) trivial to do with the tracer that comes with 
meta-objects. With some slight modification I could register both entrance 
and exits to any action that lands in user code, allowing 100% tracing of 
execution time, inputs, outputs, etc. The membrane included goes out of its 
way to be a non-intrusive, external membrane. That is, it wraps the border 
of an object graph. It doesn't intercept interactions between objects on 
the "inside" of the membrane (or outside of course), it simply enforces the 
barrier line in entering or exiting.

However, it simply requires less carefulness to create more of a "goo" than 
a membrane, that permeates all interactions instead of merely standing 
around the edges. This type of interaction would have proxy objects 
becoming the actual communication medium itself, with all actions from one 
object to any other object going through them by necessity. In this type of 
construct, no object ever has a direct reference to another real object, 
only mirrors. (the exception here is things created via literals). As with 
the membrane, normal execution could continue without problem, and in 
indeed without the objects even being able to tell they're in such an 
environment.

The third construct it more like a "blob", or an offensive one that 
actively seeks out and replaces all properties on all objects it meets. As 
soon as an object is exposed to this blob, it will find all of its 
non-primitive properties replaced by dopplegangers. Proxy mirrors with new 
object identities that otherwise are indistinguishable from the original. 
This one is the first that is invasive, in that its replacing objects with 
separate-identity objects where existing objects might already have 
references. However, if you''re purposefully creating all your objects 
inside of this (say for debugging or deep introspection) the opportunity to 
extract near full reconstructable JS execution playbacks exists.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to