key dump - buckets 101

I'm refactoring an existing prod-app to use cb instead of memcached - The transition has been fairly smooth as I've configured cb to use memcached buckets over 11211/SASL instead of the cb buckets.

The engineering team relies heavily on a cache-access utility to validate cache content during development which, in turn, relies on the memcached API method: getAllKeys(). I've spent a half-day researching and determined that:

-- you can use views to fetch keys if you have a couchbase bucket and write a method to return all keys
-- access TAP which isn't guaranteed to work correctly and not sure if I can do that with memcached buckets anyway...

The TAP explanation is ok - but lacks information on implementation - and the fact that the result sets are undefined means that I don't want to invest limited time in exploring.

So, thinking that someone has to have solved this problem before...and was wondering if there were any work-arounds that addresses how to retrieve a key dump from the memcached bucket.

Thanks!

After a couple of days of deploying Couchbase as a replacement for memcached, I have a couple of observations/comments to share:

- In the PHP SDK/API doc, there's reference to the CAS key used to restrict operations. However, the documentation for what a CAS key actually is, or examples of usage, is pretty well hidden. If it exists at all.
- using the delete() method (PHP API) shows that a successful delete returns the CAS key. Unfortunately, if you're not using CAS, then you're basically returning a string(0) which is the default value for when you're not using CAS keys. Through some testing, I was able to determine that the method, on deleting a non-existent key, returns a bool(0) - as opposed to a string(0). Knowing this, I can code a test to check if the delete() was successful or not.

Just finding out, post-implementation of couchbase, that it's constrained on max_item_size to 1MB and that's not tunable by the user's.

Sorry - third strike... have to revert back to memcached... couchbase as a memcached replacement just isn't viable...

0 Answers

No answers yet