On Tue, Jun 2, 2009 at 8:12 AM, Robert Campbell <rrc...@gmail.com> wrote:
>
> I've been looking at using the clojure.set functions to create a
> simple in-memory database cache. Basically when the app boost up, load
> entire db into memory, work with it through the basic relational
> algebra functions provided. Any mutations (create/update/delete) would
> be wrapped in a simple function that 1) updates the cache and 2)
> persists to the database in order to add the "D" to STM's "ACI". So
> for example, you could have:
>
> (defn insert-product [product]
>     (dosync (alter products conj product))
>     (with-connection db (transaction (insert-values XXXstuff hereXXX)))
>
> The dosync will run the alter within an STM transaction.
> The transaction will run the insert within a local resource (database)
> transaction.
>
> In Java, if you have two transactional systems, you can bridge them
> with JTA. STM, however, is a different beast. Has anyone done anything
> towards bridging STM and resource transactions?
>

There was a thread about this awhile back:

http://groups.google.com/group/clojure/browse_thread/thread/aa22a709501a64ac/b578f0915b55c4be?#b578f0915b55c4be

There is apparently an attachment to the list which modifies the
Clojure STM in the necessary ways, but it may not work with the latest
anymore.

Sounds like Rich may be willing to work with you to integrate it into
the trunk..

/mike.

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