On May 25, 11:29 am, Peter <peter.r.fos...@gmail.com> wrote:
> Hi Rich,
>
> If you set up your object dependencies correctly then the objects you
> want will stay in memory. Your history list would be a list of
> WeakReference so it could be GC'd.
>
> This is nothing about read tracking, more about setting the correct
> object dependencies so that the GC doesn't remove objects you aren't
> quite finished with yet.
>
> I been writing up a description here. It's a simplified version of
> what I've been playing 
> with.http://creativereality.com.au/notes/concurrency/54-mvcc-stm-gcd-ref-h...
>
> I kept the Transaction objects on the list, but you could consider
> keeping a smaller object with just has a collection in it; associated
> with the transaction.
>
>

I took a look at your notes. I have a few problems with it:

First, and foremost, it creates interaction relationships between
transactions that otherwise have no overlap. You see this in the
memory blowup during overlapping transactions. This rubs against a
design objective in Clojure's STM to absolutely minimize transactional
overlap and interaction.

Second, you do a lot of work in createNewTransaction (get a new
timestamp, modify existing head, make new transaction the head). How
is that made consistent? You really need a lock, and at that point
have moved to a much heavier contention point than in the current
Clojure STM.

Third, I'm wary of such extensive use of WeakReferences. That may just
be conservatism on my part.

I had considered and implemented similar designs in the early stages
of developing Clojure's STM, and, while they have some appeal, I think
these 3 points will eventually cause pain in practice.

Rich

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