Newb. request - Couchbase 2 & PHP Memcache?
New to Couchbase, and the general concepts of NoSQL so please be gentle!
We have a PHP application that is written for the Memcache PHP client (not Memcached) - and were curious to see if anything would happen if we pointed it at Couchbase2.
So we installed 2.0 and set up a default bucket of type Couchbase.
We made sure our PHP module was working, by uploading a simple PHP memcache test script - which immediately spat out:
Server's version: 2.0.0_1976_rel
Store data in the cache (data will expire in 10 seconds)
Data from the cache:
object(stdClass)#3 (2) { ["str_attr"]=> string(4) "test" ["int_attr"]=> int(123) }
Proving that PHP was indeed grabbing data from the cache - so it would seem that the Memcache module for PHP and Couchbase are playing ball (so we thought).
We then hooked up the live PHP application and immediately see a bunch of keys, operations / sec metrics in the bucket stats. It definitely appeared to be 'working'.
The thing is, there is absolutely no difference in the response time of the application when using Couchbase.
Does anyone have any tips on how to figure out whether or not Couchbase is actually doing anything useful!?!?
JD
Hello,
When people are replacing memcache by Couchbase it is not only about performance, but is also to provide:
- better scalability
- management
- and more.
You can find more information here http://www.couchbase.com/memcached
So to be able to leverage Couchbase features you need to connect to your server using :
- Install Couchbase Moxi on your application server ( http://www.couchbase.com/docs/moxi-manual-1.8/moxi-introduction.html ) that allows you to use the memcache protocol (so no change into your application code)
or
- use the PHP Client SDK to connect to Couchbase server ( http://www.couchbase.com/develop/php/current )
When you are using one of these approaches, your application will automatically be aware of the topology of the cluster and will to all the memcache operations on the correct node.
Let me know if you need more information about "Replacing memcache by Couchbase".
Regards
Tug
Tug
@tgrall