This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Library for software transactional memory

5 replies
Philippe Monnaie
Joined: 2009-01-14,
User offline. Last seen 42 years 45 weeks ago.
Hi,

I've once in a distant past announced I was working on a library for software transactional memory. I remember people being interested. Unfortunately, at that time, I was working on a tight deadline and it was my first experience with Scala, so the library turned out to be not so nice. I'm not guaranteeing that this version is nice, but it's at least better :). Plus I should have some free time in the next few months so I'm open to feedback, comments, insights, ...

It's still the first project where I use the possibilities of Scala this extensively, so it probably won't be idiomatic Scala. But I'm open to feedback and eager to learn.


More info at:
http://pmonnaie.blogspot.com/2008/12/software-transactional-memory-in-scala.html


Thanks,

Philippe
odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Library for software transactional memory

On Wed, Jan 14, 2009 at 7:51 AM, Philippe Monnaie
wrote:
> Hi,
>
> I've once in a distant past announced I was working on a library for
> software transactional memory. I remember people being interested.
> Unfortunately, at that time, I was working on a tight deadline and it was my
> first experience with Scala, so the library turned out to be not so nice.
> I'm not guaranteeing that this version is nice, but it's at least better :).
> Plus I should have some free time in the next few months so I'm open to
> feedback, comments, insights, ...
>
> It's still the first project where I use the possibilities of Scala this
> extensively, so it probably won't be idiomatic Scala. But I'm open to
> feedback and eager to learn.
>
That's very interesting! How would you rate the efficiency of your
implementation? Do you have performance comparisons with, for
instance, DSTM2 or Clojure's STM?

Thanks

StephaneLD
Joined: 2008-08-28,
User offline. Last seen 4 years 9 weeks ago.
Re: Re: Library for software transactional memory
Hello,
I really wonder if someone has tryied to take http://www.xstm.net/ approach for distributed STM in Scala..It would be a wonderful library to solve certain problems which are difficults (verbose and risky) to adress using Actors. I can imagine niceties using this from inside actors reactions..
StepH

On Wed, Jan 14, 2009 at 10:40 AM, martin odersky <martin.odersky@epfl.ch> wrote:
On Wed, Jan 14, 2009 at 7:51 AM, Philippe Monnaie
<philippe.monnaie@gmail.com> wrote:
> Hi,
>
> I've once in a distant past announced I was working on a library for
> software transactional memory. I remember people being interested.
> Unfortunately, at that time, I was working on a tight deadline and it was my
> first experience with Scala, so the library turned out to be not so nice.
> I'm not guaranteeing that this version is nice, but it's at least better :).
> Plus I should have some free time in the next few months so I'm open to
> feedback, comments, insights, ...
>
> It's still the first project where I use the possibilities of Scala this
> extensively, so it probably won't be idiomatic Scala. But I'm open to
> feedback and eager to learn.
>
That's very interesting! How would you rate the efficiency of your
implementation? Do you have performance comparisons with, for
instance, DSTM2 or Clojure's STM?

Thanks

 -- Martin

Patrick Wright
Joined: 2009-01-14,
User offline. Last seen 31 weeks 5 days ago.
Re: Library for software transactional memory

Hi

Have you looked JVSTM?
http://web.ist.utl.pt/~joao.cachopo/jvstm/
"Java Versioned Software Transactional Memory"

Regards
Patrick

Philippe Monnaie
Joined: 2009-01-14,
User offline. Last seen 42 years 45 weeks ago.
Re: Re: Library for software transactional memory

I'd think that performance won't be too impressive at this moment.
However, it is the first thing to work on on my list.

Would you happen to know any benchmarks or other performance
measurements I should check out?

Stephane:
Thanks for the link. I haven't heard of the framework before. I have
thought about distributing an STM implementation over several
machines. So far terracotta seemed to offer interesting possibilities
(I think it should port to scala pretty easily). Haven't really looked
much into it yet though.

Patrick:
Actually, yes. I don't know whether they've made any recent updates,
but I did read their paper about 2 years ago. In my implementation of
STM, the policy for handling synchronization can be changed for each
shared variable if needed. The default one I provided is very similar
to the JVSTM one, though less sophisticated.

Thanks for your responses,

- Philippe

--
http://pmonnaie.blogspot.com/

On Wed, Jan 14, 2009 at 11:11 AM, Stephane Le Dorze
wrote:
> Hello,
> I really wonder if someone has tryied to take http://www.xstm.net/ approach
> for distributed STM in Scala..
> It would be a wonderful library to solve certain problems which are
> difficults (verbose and risky) to adress using Actors.
> I can imagine niceties using this from inside actors reactions..
> StepH
>
> On Wed, Jan 14, 2009 at 10:40 AM, martin odersky
> wrote:
>>
>> On Wed, Jan 14, 2009 at 7:51 AM, Philippe Monnaie
>> wrote:
>> > Hi,
>> >
>> > I've once in a distant past announced I was working on a library for
>> > software transactional memory. I remember people being interested.
>> > Unfortunately, at that time, I was working on a tight deadline and it
>> > was my
>> > first experience with Scala, so the library turned out to be not so
>> > nice.
>> > I'm not guaranteeing that this version is nice, but it's at least better
>> > :).
>> > Plus I should have some free time in the next few months so I'm open to
>> > feedback, comments, insights, ...
>> >
>> > It's still the first project where I use the possibilities of Scala this
>> > extensively, so it probably won't be idiomatic Scala. But I'm open to
>> > feedback and eager to learn.
>> >
>> That's very interesting! How would you rate the efficiency of your
>> implementation? Do you have performance comparisons with, for
>> instance, DSTM2 or Clojure's STM?
>>
>> Thanks
>>
>> -- Martin
>
>

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: Re: Library for software transactional memory

On Wed, Jan 14, 2009 at 1:32 PM, Philippe Monnaie
wrote:
> Martin:
> I'd think that performance won't be too impressive at this moment.
> However, it is the first thing to work on on my list.
>
> Would you happen to know any benchmarks or other performance
> measurements I should check out?

Mohsen Lesani has done some tests, but they are still preliminary.
There are also some standard benchmarks such as STMBench7. I let him
respond directly.

Cheers

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland