Hi! I am a student at Swansea University (UK), trying to present a
Project about Clojure STM performance and Java Locks performance
during the simulation of concurrent Banking transactions:

I intend to execute a concurrent transfer of (fixed amount of) money
from an account A to an account B in a dosync with a concurrent
transfer from account B to account A and repeat this conflict a N-
input number times. Like this:

(transfer account-a account-b 100)
(transfer account-b account-a 100)

Now, I don't think I am doing it right because i am not taking full
advantage of the STM, while I should perform on large sets of shared
objects to make the difference between STM and Locks.

FINALLY:
What I would like to do is:
1) connect to a database with the Accounts, and create an associated
data that works with STM.
2) Create N-random operations Like (account id-source, account-id-
destination, money)
3) Start counting time -> perform the operations under STM -> stop
counting time.
4) update the database and show statistics.

QUESTION: which kind of clojure data should I use in the point 1) to
make advantage of STM transactions? which database best suit the fact
that I will use the same data to perform operations in Clojure and in
Java (one at a time) ? I know mySQL at least :P

I really need some advice, I also would like to ear your opinion on
the other points (2,3,4).
Many thanks in advance!!

Riccardo

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