Hi, I am working on a server project, which requires thousands records
of data stored in memory, and they will be accessed by thousands of
threads simultaneously.
I intend to use datalog to store all my data, sharing the whole
database by a reference.
However, I am afraid of concurrency of this design, say if one thread
changed any piece of the data, the whole data structure must be
protected by dosync, and if another thread try to update it at the
same time (by alter), it may cause retries, and because there are many
many threads, the retries may happen too often.
Another approach is just like in Java, we store each record as a ref,
then we can dosync a single record. It seems like a row level lock
rather than a database level lock in my opinion. Is this correct?
However, this design seems too Java-like and we can not use datalog to
do that.

Which approach is better? Or is there better design? Thanks for your
opinion.
--~--~---------~--~----~------------~-------~--~----~
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