From quasilists at gmail.com Mon Oct 1 14:16:50 2007 From: quasilists at gmail.com (quasi) Date: Mon, 01 Oct 2007 19:46:50 +0530 Subject: [cl-memcached-devel] Some patch to support LispWorks 5.0 In-Reply-To: <46CF0D00.9000808@gmail.com> References: <46CF0D00.9000808@gmail.com> Message-ID: <47010152.4070404@gmail.com> Chun Tian (binghe) wrote: > Hi, dear developer > > I've made some changes to your code to support LispWorks 5.0.2, take it > if you want. > Thank you for the patch. I have made the changes and checked on LispWorks 5.0.1. I will release a new version as soon as I get time to test on SBCL. thanks for the inputs. I hope you find the library useful. quasi > Thanks. > > Chun Tian (binghe) From binghe.lisp at gmail.com Mon Oct 1 16:47:24 2007 From: binghe.lisp at gmail.com (Chun Tian (binghe)) Date: Tue, 02 Oct 2007 00:47:24 +0800 Subject: [cl-memcached-devel] Some patch to support LispWorks 5.0 In-Reply-To: <47010152.4070404@gmail.com> References: <46CF0D00.9000808@gmail.com> <47010152.4070404@gmail.com> Message-ID: <4701249C.3050405@gmail.com> With my pleasure, and thanks for your work. BTW, I have a LispWorks 64-bit Enterprise Edition on Linux, glad to test you code in the future. quasi wrote: > Chun Tian (binghe) wrote: > >> Hi, dear developer >> >> I've made some changes to your code to support LispWorks 5.0.2, take it >> if you want. >> >> > > Thank you for the patch. I have made the changes and checked on > LispWorks 5.0.1. I will release a new version as soon as I get time to > test on SBCL. > > thanks for the inputs. I hope you find the library useful. > > quasi > > >> Thanks. >> >> Chun Tian (binghe) >> > > > From lucindo at gmail.com Mon Oct 22 17:11:35 2007 From: lucindo at gmail.com (Renato Lucindo) Date: Mon, 22 Oct 2007 15:11:35 -0200 Subject: [cl-memcached-devel] Some questions about cl-memcached Message-ID: <49376cdb0710221011k1b7573eam3257f49a8960336c@mail.gmail.com> Hello, I have a few questions about cl-memcached: 1) Which object type is possible to store on memcached using cl-memcached? CLOS objects instances? Hash tables? Structures? 2) When cl-memcached will support multiple servers (with weights) like others memcached clients? 3) cl-memcached supports compression? 4) cl-memcached will support other lisp implementations? (SBCL, CMUCL, CLISP??) 5) cl-memcached will deal with strings internally (this way won't be necessary pass :is-string parameter)? Thanks! Lucindo From quasilists at gmail.com Tue Oct 23 07:21:44 2007 From: quasilists at gmail.com (quasi) Date: Tue, 23 Oct 2007 12:51:44 +0530 Subject: [cl-memcached-devel] Some questions about cl-memcached In-Reply-To: <49376cdb0710221011k1b7573eam3257f49a8960336c@mail.gmail.com> References: <49376cdb0710221011k1b7573eam3257f49a8960336c@mail.gmail.com> Message-ID: <471DA108.5040208@gmail.com> Renato Lucindo wrote: > Hello, > > I have a few questions about cl-memcached: > > 1) Which object type is possible to store on memcached using > cl-memcached? CLOS objects instances? Hash tables? Structures? memcached stores just bytes. We can retrieve these bytes by using a key with which their storage is associated. We can store anything in memcached, but the serialization etc. has to be our responsibility. For example using cl-store and flexi-streams we can store anything that cl-store can serialize. for example: (defun cl-store-in-memcache (key obj &key (memcache *memcache*) ((:command command) :set) ((:timeout timeout) 0) ((:use-pool use-pool) *use-pool*)) "Serializes 'obj' with cl-store and stores in memcache" (let ((seq (flexi-streams:with-output-to-sequence (out) (cl-store:store obj out)))) (cl-memcached:mc-store key seq :memcache memcache :command command :timeout timeout :use-pool use-pool))) (defun cl-restore-from-memcache (keys-list &key (memcache *memcache*) ((:use-pool use-pool) *use-pool*)) "Gets objects corresponding to keys from keys-list. cl-store will throw and RESTORE-ERROR if an object retrieved has not been encoded by cl-store. i.e. if it cannot find a method to de-serialize it Returned is an alist of key and objects" (mapcar #'(lambda (x) (list (first x) (flexi-streams:with-input-from-sequence (in (second x)) (cl-store:restore in)))) (cl-memcached:mc-get keys-list :memcache memcache :use-pool use-pool)))) > 2) When cl-memcached will support multiple servers (with weights) like > others memcached clients? Shortly. :) Am planning to work on this, but have had absolutely no time. Any help would be appreciated. I also need replicated pairs support. > 3) cl-memcached supports compression? cl-memcached is supposed to be very simple library and as fast as possible. You can very easily add a wrapper to use any compression method you like to compress before you pass to cl-memcached. e.g. http://common-lisp.net/project/gzip-stream/ Compression requires lots of CPU. But your specific needs may warrant the use of compression in which case it is not too difficult to add. > 4) cl-memcached will support other lisp implementations? (SBCL, CMUCL, CLISP??) It already supports LW and SBCL. I will upload an updated tarball by this week end. > 5) cl-memcached will deal with strings internally (this way won't be > necessary pass :is-string parameter)? I added this performance reasons. Typically a memcached server just sits and handles millions of requests. Adding checks which may not be used for most of the requests end up having an impact on performance which IMHO we can avoid. In case your app needs a specific setting, you can write a wrapper for that. I followed the same philosophy for cl-memcached as is followed for memcached. :) do a simple job reliably and as fast as possible. I have tried to get the best possible performance from this client. Our memcached servers have been up upwards of 60 days at a time and have handled millions of requests per day. cl-memcached has been quite stable throughout the 12 months or so of its use till date. > > Thanks! thanks for writing in !! :) quasi > > Lucindo > _______________________________________________ > cl-memcached-devel mailing list > cl-memcached-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-memcached-devel >