CouchBase Client Details

Author
Jun Zhou & Xiaoyun Zhang
Schema Description
  • Data is stored in 4 buckets: "users", "resources", "manipulation" and "photos".
  • userid, resourceid and manipulationid are the keys for "users", "resources" and "manipulation" buckets, respectively.
  • Friendship is represented as an array embedded in the "users" bucket.
  • The "photos" bucket stores the raw data as a byte array, while other buckets store the data as json strings.
  • The "photos" bucket stores both the profile and thumbnail images for a user. The key for the "photos" bucket is the combination of the prefix and the user's unique identifier.
Index Structures
  • CouchBase automatically creates indexes on the keys for buckets.
  • CouchBase "Views" are used to create secondary indexes.
  • The "resources" bucket has four views:
    "by_creator" and "by_walluser" which are used to calculate the number of resources created by a user and the number of resources posted on a user's wall,
    "res_creator" and "res_walluser" maintain all the resource information for the user.
  • The "manipulation" bucket has one view, "by_rsc", which is used to find all the manipulations on a certain resource.
Database Load Time
(10 Load Threads)
  • 10,000 members, 100 friends per user, 100 resources per user, no user images: 7 Minutes
  • 10,000 members, 100 friends per user, 100 resources per user, 12KB profile images and 2KB thumbnail images: 7 Minutes
SoAR Rating# †
10,000 members, 100 friends per user, 100 resources per user, no user images
  • VeryLowUpdateActions: 350 actions/sec
  • LowUpdateActions: 351 actions/sec
  • HighUpdateActions: 355 actions/sec
Source
Download

# 10,000 members, 100 friends per user, 100 resources per user, no user images.

† The reported performance numbers were obtained using Amazon EC2 instances with the following specifications: M1 Extra Large instances, 8 ECUs, 4 cores, 15 Gigabyte. One instance hosted the data store while multiple BGClients were used to generate workload. Processor and network resources of the BGClients were not a bottleneck while obtaining these numbers. The experiments were conducted using CouchBase-Server 2.0.0 and CouchBase-Client 1.1.4.