Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

Newb. request - Couchbase 2 & PHP Memcache?

1 reply [Last post]
  • Login or register to post comments
Wed, 12/12/2012 - 05:32
jdamnation
Offline
Joined: 12/12/2012
Groups: None

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

Top
  • Login or register to post comments
Wed, 12/12/2012 - 14:01
tgrall
Offline
Joined: 09/05/2012
Groups: None

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

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker