On Mon, Jul 13, 2009 at 7:55 AM, Mark Volkmann<r.mark.volkm...@gmail.com> wrote:
>
> On Sun, Jul 12, 2009 at 7:07 PM, Vagif Verdi<vagif.ve...@gmail.com> wrote:
>>
>> Potentially interesting library for clojurians. Java STM
>> implementation: http://www.deucestm.org/
>
> As best I can tell, this is yet another "on your honor" STM
> implementation. What I mean is that as long as you use the library
> correctly in every place where it is needed, everything works fine.
> Forgot to use it somewhere in an application where it was needed and
> all bets are off. That's one thing I really like about Clojure. You
> can't get away with forgetting to update Refs inside a transaction. If
> you do, you'll be reminded with an exception.
>
> Is there another STM implementation that enforces its use like this?
>

Well, I'd say that's a property of the language, not the library. You
could use pretty much any STM library in Java if you can make sure
that the executed bytecode has the appropriate calls in place. Have a
look at Terracotta (http://terracotta.org/). It's not an STM in the
sense of intra-JVM transactions, but inter-JVM transactions (they call
it network attached memory), and it's implemented as a bytecode weaver
(meaning you either transform your compiled class files with an
additional step after compilation to add the library specific
instructions, or you do the same thing at loadtime when loading your
code through a special classloader). Terracotta's approach is also "on
your honor" in the sense that it doesn't force you to declare all
variables in TC terms, but the approach could be extended to throw
(compile time) exceptions on undeclared state variables.

By the way, I would take a good look at Terracotta if I ever wanted to
extend Clojures STM to work across JVMs. You probably would have to
think a bit harder about how you integrate the TC transactions with
the ones from Clojure, since TC transactions are remote calls and
therefore a lot slower, but I reckon it shouldn't be too hard. TC has
enough tools to inspect how your transactions perform.

HTH

Cheers,
Daniel

--~--~---------~--~----~------------~-------~--~----~
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