On Sep 5, 8:56 pm, Alyssa Kwan <alyssa.c.k...@gmail.com> wrote: > Any thoughts on how to marshal functions? What about vars and dynamic > binding?
I don't think marshaling closures will ever happen without changes to Clojure itself. I haven't looked into how much work it would require, or how much it would impact Clojure's performance. It always seemed like an excessively lofty goal anyway: if I could save plain Clojure data structures (all primitives, all fully-evaluated collections, and all records), I would be happy with it. In truth, I always wanted to extend Cupboard to support some kind of semi-magical distributed storage (like Oracle Coherence, but with better persistence guarantees — database-like rather than cache-like), but wanted to get single-node basics working properly first. The latest BDB JE has some replication built-in, and I planned to use it. As for dynamic binding, I'm not sure what you mean. The bound value will evaluate using Clojure's normal rules when cupboard.core/make- instance runs, and go into the database. cupboard.core/query will then read it and make the value part of the returned map (it should really be a Clojure 1.2 record). The code doesn't do anything except save and restore fully-evaluated data structures. Incidentally, Cupboard wraps BDB transactions, and does not attempt to work with Clojure's STM subsystem. I always considered this a weakness, but a difficult one to resolve. To counterbalance it, I planned to avoid mixing STM and on-disk data structures in the same code. -- 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