well spotted :-)

I have ported it up to 1.3.0-alpha5 - alpha6 gave me some trouble that I 
haven't had time to sort out.

[BTW - the following is from memory]

You set the JVM's UID via a sys property.

If this property is set it is incorporated into the names of new classes 
created in this JVM.

The DynamicClassLoader maintains a map of classname : bytecode.

I run a Jetty in this JVM which knows how to respond to URLClassLoader 
requests for class bytecode by looking them up in this map.

I think I hacked DynamicClassLoader (which ?inherits? from URLClassLoader) 
so that you can optionally set a system property that is a URL from which it 
can request classes that it cannot find locally. So you do this on client 
JVMs

Putting this all together, you can basically create types/fns on the-fly in 
a one JVM, serialise instances of these and send them to another JVM, then 
deserialise them (transparently pulling their class over from their parent 
JVM) and use them as if they had been created at compile rather than 
runtime.

This plugs what I have found to be a bit of a hole in Clojure, namely 
dynamism is great, but I want to use it in a distributed app...

The patches are not prodction ready, but I have been using them for some 
time with no problem. I'd be very happy to find other people with similar 
interest, improve the patches and see if we can persuade the powers that be 
to accept them or something providing similar fn-ality into e.g. Clojure-1.4 
:-)

If you need any help getting this stuff to work, just shout.


Jules

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to