>From what I've observed in the community, it seems that java library dependencies are not discouraged. Lot of good things have been written in java that perhaps don't need rewriting from ground up. It's one of Clojure's big pluses.
I personally would go the "from ground up" route only if the existing java libs fall short in some way or another. Perhaps memcached client would be a good candidate. Implement it in Clojure to utilize its concurrency api to handle client side, queuing, etc. -Al On Wed, Sep 30, 2009 at 8:26 PM, Paulo Candido <[email protected]> wrote: > > I have no doubt spy is easy to use and fairly straightforward to > encapsulate. But doesn't this strategy somewhat complicates the use > and deployment from Clojure? I would think a user would prefer a > "pure" Clojure solution that hides the Java hooks and does not depend > on third part jars. > > Paulo > > On Wed, Sep 30, 2009 at 3:07 PM, Alen Ribic <[email protected]> wrote: >> >> I've personally found using the spymemcached through java introp extremely >> easy, >> >> (def mc (MemcachedClient. (list (InetSocketAddress. "127.0.0.1" 1211)))) >> >> (.. mc (set "topic:1" 3600 topic)) >> (.. mc (get "topic:1")) >> (.. mc (getBulk coll)) >> etc. >> >> Perhaps a simple macro wrappers to encapsulate some common patterns >> would be a good enough approach. >> >> -Al >> >> >> On Wed, Sep 30, 2009 at 7:11 PM, Paulo Candido <[email protected]> >> wrote: >>> >>> Hi, >>> >>> I am just learning Clojure (and Lisp) and I was thinking about >>> developing a Clojure memcached client as an exercise. I am in doubt >>> about the best way to do it. I could just write a thin wrapper around >>> some existing Java memcached library (like Dustin Sallings' >>> spymemcached or Greg Whalin's memcached client). Or I could start from >>> scratch and implement the memcached protocol directly, using only >>> Java's base network classes . The former is certainly easier but I >>> tend to think the direct implementation would be more useful, >>> specially in terms of integration with existing clojure libraries. >>> >>> What do you think? >>> >>> Paulo >>> >>> > >>> >> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
