Re: Clojure + Redis

2010-01-05 Thread Steve Purcell
Or rather, more importantly, I realised I should bind *print-level* to nil... As for *print-dup*, I guess there's a danger that stored values might become unreadable if any implementation structure classes were to get renamed in a future clojure release. -Steve On 5 Jan 2010, at 09:24, Gabi w

Re: Clojure + Redis

2010-01-05 Thread Steve Purcell
Indeed, thanks - I realized that earlier today myself! -Steve On 5 Jan 2010, at 09:24, Gabi wrote: > I think you should do "(binding [*print-dup* true] (pr-str value).." > instead of just (pr-str value) in the encode-value function. (line 20 > in redis_memo.clj) > > On Jan 4, 2:55 pm, Steve P

Re: Clojure + Redis

2010-01-05 Thread Gabi
I think you should do "(binding [*print-dup* true] (pr-str value).." instead of just (pr-str value) in the encode-value function. (line 20 in redis_memo.clj) On Jan 4, 2:55 pm, Steve Purcell wrote: > Read the code I posted in this thread and put up on github after you > expressed interest. > >

Re: Clojure + Redis

2010-01-04 Thread anders nawroth
There's actually been some activity from different people regarding Clojure + Neo4j, see: http://wiki.neo4j.org/content/Clojure /anders On Jan 4, 1:40 am, Tom Hicks wrote: > Have you looked at Neo4J? I have no experience with it but > someone in the forum just announced a Clojure wrapper for it:

Re: Clojure + Redis

2010-01-04 Thread Steve Purcell
Read the code I posted in this thread and put up on github after you expressed interest. That's part of what it does, using the reader/printer representation. Alternatives would include standard Java binary serialisation or 3rd party libraries (Hessian/Burlap?). -Steve On 4 Jan 2010, at 12:1

Re: Clojure + Redis

2010-01-04 Thread Gabi
What if I wanted to use Redis just persist binary (serialized) clojure objects ? What's the easiest (and fastest) way to serialize/de-serialize vectors or lists in Clojure ? (so the can stored as blobs in Redis) On Jan 4, 12:59 pm, Gabi wrote: > Maybe, though I would avoid distributed transaction

Re: Clojure + Redis

2010-01-04 Thread Gabi
Maybe, though I would avoid distributed transactions as much as possible. They are complex and slow creatures. On Jan 4, 12:51 pm, Shantanu Kumar wrote: > On Jan 2, 5:12 am, Gabi wrote: > > > I am interested in the idea: Completely stateless set of Clojure nodes > > (on many machines), operat

Re: Clojure + Redis

2010-01-04 Thread Shantanu Kumar
On Jan 2, 5:12 am, Gabi wrote: > I am interested in the idea: Completely stateless set of Clojure nodes > (on many machines), operating on a central state stored in some > datastore. > If transactions could be managed somehow, I think it would be very > compelling model for many applications. D

Re: Clojure + Redis

2010-01-04 Thread Gabi
How about congomongo (http://github.com/somnium/congomongo) ? Have anybody used it ? Seems good choice for storing state in central location.. On Jan 4, 2:40 am, Tom Hicks wrote: > Have you looked at Neo4J? I have no experience with it but > someone in the forum just announced a Clojure wrapper f

Re: Clojure + Redis

2010-01-03 Thread Tom Hicks
Have you looked at Neo4J? I have no experience with it but someone in the forum just announced a Clojure wrapper for it: http://groups.google.com/group/clojure/browse_thread/thread/9628c622784ff45a# cheers, -t On Jan 1, 2:07 pm, Julian Morrison wrote: > I've just recently been poking arou

Re: Clojure + Redis

2010-01-01 Thread Gabi
I am interested in the idea: Completely stateless set of Clojure nodes (on many machines), operating on a central state stored in some datastore. If transactions could be managed somehow, I think it would be very compelling model for many applications. On Jan 1, 11:07 pm, Julian Morrison wrote: >

Re: Clojure + Redis

2010-01-01 Thread Julian Morrison
Oops, typo - I meant, doesn't have hashes. On Jan 1, 9:07 pm, Julian Morrison wrote: > It doesn't have sets exactly - just keys and values. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.co

Re: Clojure + Redis

2010-01-01 Thread Julian Morrison
I've just recently been poking around these NoSQLs investigating their features, so... Redis has limited data structures - flat un-nested lists and sets, and plain strings. It doesn't have sets exactly - just keys and values. Nothing nested at all, unless you serialize to strings. No indexes, alth

Re: Clojure + Redis

2010-01-01 Thread Gabi
Jackrabbit is heavy. It might be powerful but I am sure it is much slower than Redis or MongoDB. On Dec 31 2009, 6:59 pm, jem wrote: > Something else to look at might be the Apache Jackrabbit project > athttp://jackrabbit.apache.org/. > > I've been looking at tools along these lines as well, and

Re: Clojure + Redis

2010-01-01 Thread Steve Purcell
There you go: http://github.com/purcell/redis-memo I doubt the memoize functions provided therein will be directly useful to you, but you may find a few lines of helpful code there. Best of luck with your experiment. -Steve On 31 Dec 2009, at 16:20, Gabi wrote: > Yes. I think it is of much i

Re: Clojure + Redis

2009-12-31 Thread jem
Something else to look at might be the Apache Jackrabbit project at http://jackrabbit.apache.org/. I've been looking at tools along these lines as well, and recently looked at Redis for the same reasons. Right now, though, I'm focusing my attention on Jackrabbit which is an implementation of the

Re: Clojure + Redis

2009-12-31 Thread Gabi
Yes. I think it is of much interest. What if I stored a shared data structure in redis (only because its the fastest), using your memoize variant, and process (maybe even updated it) it in parallel from different Clojure nodes. Some kind of primitive map/reduce mechanism I think. On Dec 31, 12:29 

Re: Clojure + Redis

2009-12-31 Thread Constantine Vetoshev
On Dec 30, 10:40 am, Robert Campbell wrote: > I think anything which lowers the impedance mismatch between Clojure > data structures and a persistent store is worth investigating. I'd > love to find an ACID, transactional store which accepts native > structures. Have you looked at Cupboard (http:

Re: Clojure + Redis

2009-12-31 Thread Steve Purcell
Not sure if it's any help, but here's a variant of memoize I wrote, which stores arbitrary readable/printable objects to redis: http://gist.github.com/266689 (If there's any interest, I'll wrap it up in a github project and push it to clojars.) Redis isn't a hierarchical store, so its array/se

Re: Clojure + Redis

2009-12-30 Thread Vagif Verdi
There are other NoSQL datastores written in java, like Voldemort. Perhaps if you investigate them, you will find one that will be much easier to integrate with clojure. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: Clojure + Redis

2009-12-30 Thread Robert Campbell
I think anything which lowers the impedance mismatch between Clojure data structures and a persistent store is worth investigating. I'd love to find an ACID, transactional store which accepts native structures. Right now I'm using CouchDB, and while JSON is close enough, it still requires a mapping