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

Managing a list in membase

1 reply [Last post]
  • Login or register to post comments
Thu, 11/11/2010 - 01:08
Tom
Offline
Joined: 06/07/2010
Groups: None

Hi,

I have a question not about an issue but about how to implement a solution to a common problem:
Lets say I have a user, and the user has a list of ~10-100 items. I'd like to add, remove and iterate the user's items. What's the most efficient way of solving/implementing this in membase?

Thank You,
Tom.

Top
  • Login or register to post comments
Thu, 11/11/2010 - 16:59
perry
Offline
Joined: 10/11/2010
Groups:

 Thanks for your inquiry Tom.

 

Currently, Membase acts exactly like memcached.  You can use the "append" operation to atomically place some data at the end of an item:

set pkrug 0 0 1
a
STORED
append pkrug 0 0 1
b
STORED
get pkrug
VALUE pkrug 0 2
ab
END

 

You can also use the 'CAS' operator to essentially "lock" an item while you read it in, edit it and write it back. 

 

In an upcoming release (though not the next one) we will be adding direct support for 'lists' and 'sets' which give you a much wider range of capabilities to working with this type of dataset.

 

Perry

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!

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