STM article

3 views
Skip to first unread message

Mark Volkmann

unread,
Aug 30, 2009, 1:42:10 PM8/30/09
to clo...@googlegroups.com
I think we'd all agree that STM is a very important feature of
Clojure. I trust that it works as advertised, but until recently I
didn't feel that I understood exactly how it worked. This left me
unable to defend it when pressed by developers that aren't using
Clojure. I wanted to change that, for me and for the Clojure
community. For the past few months I've been working on an article
about STM in general and the Clojure implementation in particular. I
hope the Clojure community derives some value from it.

Consider this a beta version of the article. I have tried very hard to
get all the facts straight and have reviewed it many times. It seems
inevitable though that I may have stated some things incorrectly. This
is complicated stuff ... which it must be in order to make concurrent
programming easier.

If you have an interest in this topic, I'd appreciated getting some
feedback on the article. In particular, search for "Question:" in the
article. I'll make suggested updates quickly to avoid spreading any
misinformation.

You can find the article at http://ociweb.com/mark/stm/article.html.

Thanks!

--
R. Mark Volkmann
Object Computing, Inc.

Howard Lewis Ship

unread,
Aug 31, 2009, 12:23:00 PM8/31/09
to clo...@googlegroups.com
Wow! That's a lot of great research. I'm impressed.

My only concern is that some of the internals *could* change over time
(I see Rich's commit stream) and some indication in the doc
identifying what's design level (won't change) vs. implementation
level (might change) would be useful.
--
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

Lau

unread,
Aug 31, 2009, 2:10:26 PM8/31/09
to Clojure
Hey Mark,

Congratulations on a very good article - I helped me get a lot of
facts
straight.

The final part of the article where you comment on the various
functions like
add-watcher etc, is not very insightful and the UML charts didnt help
me all
that much. But with such a small amount of critisism, its actually a
compliment :)

I loved it! Thanks.

/Lau
> You can find the article athttp://ociweb.com/mark/stm/article.html.

Mark Volkmann

unread,
Aug 31, 2009, 2:50:32 PM8/31/09
to clo...@googlegroups.com
On Mon, Aug 31, 2009 at 1:10 PM, Lau<lau.j...@bestinclass.dk> wrote:
>
> Hey Mark,
>
> Congratulations on a very good article - I helped me get a lot of
> facts straight.

Thanks!

> The final part of the article where you comment on the various
> functions like
> add-watcher etc, is not very insightful and the UML charts didnt help
> me all
> that much. But with such a small amount of critisism, its actually a
> compliment :)
>
> I loved it! Thanks.

Yeah, the "Low Level" section is mainly useful if you want to go
through the source code (especially Ref.java and
LockingTransaction.java) and you want some assistance figuring out the
purpose of each field and the functionality of each method. Most
readers will probably get what they want from the first half of the
article which is everything before that section.

Mark Volkmann

unread,
Aug 31, 2009, 2:54:29 PM8/31/09
to clo...@googlegroups.com
On Mon, Aug 31, 2009 at 11:23 AM, Howard Lewis Ship<hls...@gmail.com> wrote:
>
> Wow! That's a lot of great research.  I'm impressed.

Thanks!

> My only concern is that some of the internals *could* change over time
> (I see Rich's commit stream) and some indication in the doc
> identifying what's design level (won't change) vs. implementation
> level (might change) would be useful.

That's a very valid concern and that's why I say this near the
beginning of the "High Level" section:

"My intention is to update this article whenever the Clojure STM
implementation changes so it remains an accurate source of information
that is easier to digest than simply reading the source code."

I expect that we'll see all the STM-related code rewritten in Clojure
instead of Java, perhaps within the next year, so I'll have a lot of
updating to do.

sirpi

unread,
Aug 31, 2009, 4:19:48 PM8/31/09
to Clojure

I remember a discussion about the Ant example in Lisp and Clojure,
the response for Rich shows some important point that establishes the
difference with a naive implementation of the Ant example.

I think you can add a link to the Ant example and the incorrect Lisp
implementation of it.

http://groups.google.com/group/comp.lang.lisp/msg/a86c91091ae16970

I expect to get time to read your article, it seems very interesting.
Congratulations for such a good work.

Reply all
Reply to author
Forward
0 new messages