Re: features - interesting!!

2011-02-04 Thread Les Mikesell
On 2/3/11 11:40 PM, Roberto Spadim wrote: LOCK (create a key-value, always return value) UNLOCK (delete key-value, if key-value=sent(key-value) delete, return before delete value, if not exist return blank or null) that's it easy not? What happens when the server holding the lock value is

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
How, exactly, does this reduce the cost or increase the performance of your production app to make this change? How many concurrent locks are you holding, and what percentage of your total traffic is this? By how many machines do you estimate you could reduce your memcached server farm by

Re: features - interesting!!

2011-02-04 Thread Les Mikesell
On 2/4/2011 9:34 AM, Roberto Spadim wrote: What happens when the server holding the lock value is rebooted? Or needs to evict values from memory? For memcache's realpurpose those things don't affect operation because the client will reload the correct values on the next access. Where is

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
i don't see any question to say: it's not a good feature to be implemented just one thing: my scenario isn't your scenario, i need only one server, cache timeout isn't a problem, no value in cache isn't a problem, i just need a simple lock / unlock function, i will make all app relative

Re: features - interesting!!

2011-02-04 Thread Dustin
On Feb 4, 8:37 am, Roberto Spadim robe...@spadim.com.br wrote: put at main memcache code, and we can port to others memcache forks, got the quest? Our goals are quite far from this. It would be trivial for you to create an extension in the new engine branch to add lock support if you feel

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
i can´t replace PIC, i have more 2.000 unit of PIC here (a lot of money), after that i can use arm with linux for now i can just use PIC ok, no help from forum, i will try to code by my self, if code looks good could i send to memcache mail list and try to make it 'default' in source code?

Re: features - interesting!!

2011-02-04 Thread Les Mikesell
On 2/4/2011 11:25 AM, Dustin wrote: easy? with it i can have 3 or more send/receive removed from my pic18f4550 code (save a lot of rom for me) Are you sure you're not looking for a job server (gearmand, beanstalkd, etc...)? Perhaps your mistake is in doing any of the processing on your

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
nice =] but it don´t have lock too :/ today i´m using repcache, i never have problem with lose of information (i´m using a good ups too) the only problem is the PIC code is consuming a lot of ROM and time (many network i/o) and i can´t use many PICs in the same time since the network band is just

Re: features - interesting!!

2011-02-04 Thread Marc Bollinger
I get why you may strike out on your own and write an extension to memcached that does exactly what you want (kind of, there _are_ better tools, as mentioned), that's precisely what open source is about. I do not get why you're so persistent about getting changes that the community and maintainers

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
since all (php, ruby, c and many others) client library are compatible with memcached, a new function in memcache will be faster reported to client libraries =), that´s why i want it at memcached, not at repcache or membase or memcachedb or anyother it´s a client and server change, it´s not just

Re: features - interesting!!

2011-02-04 Thread Les Mikesell
On 2/4/2011 11:40 AM, Roberto Spadim wrote: nice =] but it don´t have lock too :/ Isn't this a lock? http://wiki.membase.org/display/membase/getl+extended+operations I guess it is new and experimental. Then again, yours would be too. today i´m using repcache, i never have problem with lose

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
yes but i will need many network packets to work first add second getl it could work with only one lock 2011/2/4 Les Mikesell lesmikes...@gmail.com: On 2/4/2011 11:40 AM, Roberto Spadim wrote: nice =] but it don´t have lock too :/ Isn't this a lock?

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
ehehe i know that there´s many others lock server, but i don´t have ROM on my PIC18f4550 to put two libraries =( it would be nice if i had a ARM or a x86 :/, but i don´t have :( if i use memcache i could do it with my PIC 2011/2/4 Adam Lee a...@fotolog.biz: Yes.  I'm starting to feel like a

Re: features - interesting!!

2011-02-04 Thread Les Mikesell
On 2/4/2011 12:40 PM, Roberto Spadim wrote: ehehe i know that there´s many others lock server, but i don´t have ROM on my PIC18f4550 to put two libraries =( it would be nice if i had a ARM or a x86 :/, but i don´t have :( if i use memcache i could do it with my PIC Do you already have enough

Re: features - interesting!!

2011-02-04 Thread Adam Lee
You don't need two libraries. As I said, a lot of these products already speak the memcached protocol or, alternatively, something like redis would provide you all of the functionality that you need from memcached plus the features that you're requesting (key-value store with replication,

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
i will learn more about redis, i didn´t see a lock server with cache yet my today app work today, but it´s not very good/fast (i have a network bootneck today) i rewrite to redis protocol is very poor :( if i can´t do anythink i will try a proxy between memcache and client and implement lock and

Re: features - interesting!!

2011-02-04 Thread Adam Lee
Do you only need the lock in order to do transaction groups? If so, redis supports those out of the box: http://rediscookbook.org/pipeline_multiple_commands.html http://rediscookbook.org/pipeline_multiple_commands.htmlIf, though, you're actually trying to build locks, check out WATCH:

Re: features - interesting!!

2011-02-04 Thread Les Mikesell
On 2/4/2011 1:16 PM, Roberto Spadim wrote: i will learn more about redis, i didn´t see a lock server with cache yet my today app work today, but it´s not very good/fast (i have a network bootneck today) i rewrite to redis protocol is very poor :( if i can´t do anythink i will try a proxy between

Re: features - interesting!!

2011-02-04 Thread Dustin
On Feb 4, 9:30 am, Roberto Spadim robe...@spadim.com.br wrote: i can´t replace PIC, i have more 2.000 unit of PIC here (a lot of money), after that i can use arm with linux for now i can just use PIC ok, no help from forum, i will try to code by my self, if code looks good could i send to

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
it´s not the case, i will study redis maybe a protocol change can solve the problem lock is just for computer world it´s a mix of pic(gpio + logic) and computer it´s work very well, to problem is pic have low cpu memory and rom, in future i will change to ARM/x86 i will try other solution maybe a

Re: features - interesting!!

2011-02-04 Thread Dustin
On Feb 4, 12:20 pm, Roberto Spadim robe...@spadim.com.br wrote: it´s not the case, i will study redis maybe a protocol change can solve the problem lock is just for computer world it´s a mix of pic(gpio + logic) and computer it´s work very well, to problem is pic have low cpu memory and rom,

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
problem: today i need 4 packets to make 'lock'/'unlock' using memcache i need to use less ROM/CPU/RAM/network at client side solution: 1) make server side lock function with 2 packet (with atomic operations) 2) make a proxy if function = lock/unlock, proxy make these packets to server (i don't

Re: features - interesting!!

2011-02-04 Thread Les Mikesell
On 2/4/11 9:56 PM, Roberto Spadim wrote: problem: today i need 4 packets to make 'lock'/'unlock' using memcache i need to use less ROM/CPU/RAM/network at client side What's the big picture here? If you want your client to do less work, why not run a web service on the server that not only

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
i'm trying to separe some cpu use (i know cpu for servers is not a problem) but since the problem is 'easy' i'm trying to keep logic at microcontroller, if i port all logic to server, is better to use ARM or x86 at microcontroller side (i will spend less money - i still with 2000 pic in stock :/ )

Re: features - interesting!!

2011-02-04 Thread dormando
problem: today i need 4 packets to make 'lock'/'unlock' using memcache i need to use less ROM/CPU/RAM/network at client side solution: 1) make server side lock function with 2 packet (with atomic operations) 2) make a proxy if function = lock/unlock, proxy make these packets to server (i

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
pic use memcache as a RAM memory first i lock memcache (with my today lock function) set a key to 0 i read data from pic, and put at memcache after 128 writes i put a sum (save this sum at pic internal memory) total bytes is about 1MB(1048576 bytes) (pic don't have this memory, it's a ADC read

Re: features - interesting!!

2011-02-04 Thread dormando
pic use memcache as a RAM memory first i lock memcache (with my today lock function) set a key to 0 i read data from pic, and put at memcache after 128 writes i put a sum (save this sum at pic internal memory) total bytes is about 1MB(1048576 bytes) (pic don't have this memory, it's a ADC

Re: features - interesting!!

2011-02-04 Thread Roberto Spadim
for data i use this: key= pic ip number_fragment lock key = pic ip number_lock Then there's no locking, and multiple PIC's can use memcached in parallel? yes many pic's in parallel and a app at server side read in multiget all data :) That sounds like a win/win to me, if gross :) what's win/win

Re: features - interesting!!

2011-02-04 Thread dormando
for data i use this: key= pic ip number_fragment lock key = pic ip number_lock Shouldn't need the lock_key, then? That sounds like a win/win to me, if gross :) what's win/win ? hehehe It's when there's no lose.