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

Few basic questions

1 reply [Last post]
  • Login or register to post comments
Thu, 11/11/2010 - 05:04
maimonoded
Offline
Joined: 11/11/2010
Groups: None

Hi,

I've few basic questions related to membase:

  1. - i would like to bound entities under the same namespace, for few reasons, don't want to have system wide unique key, easier management, easier to understand and develop, having the option to get values from a specific namespace, etc.. . if i compare it to other nosql solutions it is called a collection or in rdbms it is a table. using different buckets will solve one or two of my needs, but not all ( i think), is there a way to do something like this in membase?


- other types of collections, i would like to implement other types of collection over membase, like different types of queues, lists, maps etc... i'm trying to think on a way to implement the logic in the client side, do you think that it is possible? 

- distributed reads - does membase distribute the read to replicas or the replicas are passive?

- membase start - what happens when membase starts, does it load all data from disk to memory? if so, does it means that it can only store the amount data as the amount of RAM for each server? if it doesn't load the entire data, what will happen if i try to get a value from membase that is no in memory will it do an IO to check if it is on disk and if so will load it to memory? what is the eviction policy in membase?

- is there a locking mechanism in membase for entities? is there a transaction feature? (for example if i've an entity with a counter in it, how can i make sure that counting will be correct? if i want to change two entities different entities at the same time? ) - i'm guessing that this out of the nosql scope, but maybe you have a solution in mind :)

- what is the one entity size limit in membase? (i think that memcache is 1mb is it the same here?)

 

Thanks,

Oded.

Top
  • Login or register to post comments
Thu, 11/11/2010 - 18:02
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

Oded - responses inline:

  1. - i would like to bound entities under the same namespace, for few reasons, don't want to have system wide unique key, easier management, easier to understand and develop, having the option to get values from a specific namespace, etc.. . if i compare it to other nosql solutions it is called a collection or in rdbms it is a table. using different buckets will solve one or two of my needs, but not all ( i think), is there a way to do something like this in membase?
  2.  
  3. [pk] - The only way to do this currently is to use different buckets.  Can you describe what functionality you need that is not provided by using different buckets?  Our Node Code feature will also enhance this capability.


- other types of collections, i would like to implement other types of collection over membase, like different types of queues, lists, maps etc... i'm trying to think on a way to implement the logic in the client side, do you think that it is possible? 

[pk] - This is also coming with Node Code.  We will be usin the TAP interface (http://wiki.membase.org/display/membase/TAP+Protocol) within Node Code to be able to build up indecises and other types of collections.

- distributed reads - does membase distribute the read to replicas or the replicas are passive?

[pk] - Replicas are currently passive and only for high avialability.  This is to ensure complete consistency on an item.  We have in our product backlog the feature to allow reads from replicas.

- membase start - what happens when membase starts, does it load all data from disk to memory? if so, does it means that it can only store the amount data as the amount of RAM for each server? if it doesn't load the entire data, what will happen if i try to get a value from membase that is no in memory will it do an IO to check if it is on disk and if so will load it to memory? what is the eviction policy in membase?

[pk] - When Membase starts up it will attempt to load all the data from disk into memory.  If there is not enough RAM to hold all the data, it will begin ejecting items back to disk.  If you request an item that is not in memory it will retrieve it from the disk and hold it in memory for as long as there is space.  There is no "eviction" by definition within Membase.  We "eject" items to disk but never actually throw them away.

- is there a locking mechanism in membase for entities? is there a transaction feature? (for example if i've an entity with a counter in it, how can i make sure that counting will be correct? if i want to change two entities different entities at the same time? ) - i'm guessing that this out of the nosql scope, but maybe you have a solution in mind :)

[pk] - Currently you can use the CAS operation (supported by the memcached protocol) to lock an item.  We are also in the middle of implementing some other locking commands but they are not as widely supported by the memcached protocol.  There is currently no idea of a "transaction", but you can use the CAS feature on one item to essentially lock a set of others.  Everytime you want to perform this "transaction", you would attempt to lock the "locking key" before making changes to the other items.  As long as all the clients are trying to access it in the same way, you should be fine.  

For counting specifically, there is an atomic 'increment' command in the memcached protocol that will handle this for you.

- what is the one entity size limit in membase? (i think that memcache is 1mb is it the same here?)

[pk] - Memcached does have a 1mb object size limit.  Membase is currently set to 20mb but that number is arbitrary and could be raised or lowered.  Currently you would have to recompile the code, but we may make it a user-specified value in the future.

 

Thanks for the questions Oded, let us know how else we can help.

 

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 Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -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