Re: [ZODB-Dev] zeo.memcache

2011-10-13 Thread Laurence Rowe
On 12 October 2011 23:53, Shane Hathaway sh...@hathawaymix.org wrote: As I see it, a cache of this type can take 2 basic approaches: it can either store {oid: (state, tid)}, or it can store {(oid, tid): (state, last_tid)}. The former approach is much simpler, but since memcache has no

Re: [ZODB-Dev] zeo.memcache

2011-10-12 Thread Vincent Pelletier
Le mercredi 12 octobre 2011 11:55:43, Vincent Pelletier a écrit : distributed Woops. Networked lock server. Not distributed. -- Vincent Pelletier ERP5 - open source ERP/CRM for flexible enterprises ___ For more information about ZODB, see

Re: [ZODB-Dev] zeo.memcache

2011-10-12 Thread Shane Hathaway
On 10/09/2011 08:26 AM, Jim Fulton wrote: On Sat, Oct 8, 2011 at 4:34 PM, Shane Hathawaysh...@hathawaymix.org wrote: On 10/05/2011 11:40 AM, Pedro Ferreira wrote: Hello all, While doing some googling on ZEO + memcache I came across this: https://github.com/eleddy/zeo.memcache Has anybody

Re: [ZODB-Dev] zeo.memcache

2011-10-12 Thread Shane Hathaway
On 10/12/2011 04:53 PM, Shane Hathaway wrote: Given the choice to structure the cache as {(oid, tid): (state, last_tid)}, a simple way to use the cache would be to get the last committed tid from the database and use that tid for the lookup key. This would be extremely efficient until the next

Re: [ZODB-Dev] zeo.memcache

2011-10-09 Thread Thierry Florac
Le Sat, 08 Oct 2011 14:34:59 -0600, Shane Hathaway sh...@hathawaymix.org a �crit: On 10/05/2011 11:40 AM, Pedro Ferreira wrote: Hello all, While doing some googling on ZEO + memcache I came across this: https://github.com/eleddy/zeo.memcache Has anybody ever tried it? Having

Re: [ZODB-Dev] zeo.memcache

2011-10-09 Thread Jim Fulton
On Sat, Oct 8, 2011 at 4:34 PM, Shane Hathaway sh...@hathawaymix.org wrote: On 10/05/2011 11:40 AM, Pedro Ferreira wrote: Hello all, While doing some googling on ZEO + memcache I came across this: https://github.com/eleddy/zeo.memcache Has anybody ever tried it? Having implemented

Re: [ZODB-Dev] zeo.memcache

2011-10-07 Thread Andreas Gabriel
Hi, Am 07.10.2011 01:57, schrieb Vincent Pelletier: Le jeudi 06 octobre 2011 21:18:39, Andreas Gabriel a écrit : I couldn't resist writing my own version inspired from your code: https://github.com/vpelletier/python-memcachelock That's no problem :) It lacks any integration with ZODB. It

Re: [ZODB-Dev] zeo.memcache

2011-10-07 Thread Vincent Pelletier
Le vendredi 7 octobre 2011 10:15:34, Andreas Gabriel a écrit : self._update() in the while loop is called (calls indirectly the memcache query method, a synonym for get) before the cas method is called. In my understanding from pydoc memcache, there is get, which loads, and gets which loads

Re: [ZODB-Dev] zeo.memcache

2011-10-07 Thread Andreas Gabriel
Hi, Am 07.10.2011 11:18, schrieb Vincent Pelletier: Le vendredi 7 octobre 2011 10:15:34, Andreas Gabriel a écrit : self._update() in the while loop is called (calls indirectly the memcache query method, a synonym for get) before the cas method is called. In my understanding from pydoc

Re: [ZODB-Dev] zeo.memcache

2011-10-07 Thread Vincent Pelletier
Le vendredi 7 octobre 2011 14:16:42, Andreas Gabriel a écrit : However, is your implementation thread safe? Maybe I am blind ;). That was the reason I used lovely.memcached as memcached connector. Each thread has its own connection and namespace to store keys. Therefore, the locks from one or

Re: [ZODB-Dev] zeo.memcache

2011-10-06 Thread Vincent Pelletier
Le mercredi 05 octobre 2011 19:45:38, Jim Fulton a écrit : Interesting. I'll review it. I gave it a look. From what I see, I don't think this can be used by more than a single zope at a time. My bigest hint toward this is that there is a lock on class instance which is not visible in

Re: [ZODB-Dev] zeo.memcache

2011-10-06 Thread Andreas Gabriel
Hi, On 06.10.2011 19:59, Vincent Pelletier wrote: synchronisation. Supporting such setup requires using the test-and-set memcached operation, plus some sugar. I just don't think this was intended to be supported in the original code. Maybe this code will help as example for the shared

Re: [ZODB-Dev] zeo.memcache

2011-10-06 Thread Pedro Ferreira
So accesses from different processes (or even different instances of the cache connector) will modify it without synchronisation. Supporting such setup requires using the test-and-set memcached operation, plus some sugar. I just don't think this was intended to be supported in the original

Re: [ZODB-Dev] zeo.memcache

2011-10-06 Thread Vincent Pelletier
Le jeudi 06 octobre 2011 21:18:39, Andreas Gabriel a écrit : Maybe this code will help as example for the shared locking problem https://svn.plone.org/svn/collective/unimr.memcachedlock/trunk/unimr/memcac hedlock/memcachedlock.py I couldn't resist writing my own version inspired from your

Re: [ZODB-Dev] zeo.memcache

2011-10-05 Thread Jim Fulton
On Wed, Oct 5, 2011 at 1:40 PM, Pedro Ferreira jose.pedro.ferre...@cern.ch wrote: Hello all, While doing some googling on ZEO + memcache I came across this: https://github.com/eleddy/zeo.memcache Interesting. I'll review it. Thanks for pointing it out. Jim -- Jim Fulton