Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 1.8.x

Moving from memcached to Couchbase

1 reply [Last post]
  • Login or register to post comments
Mon, 06/25/2012 - 03:42
Docproc
Offline
Joined: 06/25/2012
Groups: None

I understand that Couchbase can be a drop-in replacement for memcached, but I have a couple of questions.

Right now I have an application that talks to a memcached server by:

1. Creating an instance of net.spy.memcached.MemcachedClient

2. Connecting to localhost:11211

3. All kinds of get/set fun and profit

However looking at the examples given in the Couchbase docs, I see that

1. The client object is actually a com.couchbase.client.CouchbaseClient (I assume this is a superset of the Spymemcached functionality)

2. Connections are made to http://127.0.0.1:8091/pools rather than port 11211

Is this correct? What happens if, for instance, I create a CouchbaseClient and point it to localhost:11211?

Thanks

Glenn.

Top
  • Login or register to post comments
Mon, 06/25/2012 - 10:21
mikew
Offline
Joined: 03/14/2011
Groups:

1. CouchbaseClient extends MemcachedClient so all you need to do is change the constructors in your ode and everything should work. The only other differences between these two classes are CouchbaseClient contains a few more apis that allow you to do operations only implemented in Couchbase.

2. When you create a CouchbaseClient you will actually point it to something like "http://localhost:8091/pools". This wil connect the client to our streaming api that tells the client all about your Couchbase cluster. Using this information the client will make connections to port 11211 for you. There is a little bit more to this, but you can basically think of "http://localhost:8091/pools" as a magic url that takes care of the entire connection process for you.

Let me know if you have any other questions.

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