Sub-Document in Couchbase server 4.5

Hello,

Sub-Document feature is released in 4.5 DP. Does it only reduces network traffic or it
also reduces disk I/O and memory useges ?
How large document can I design if the Sub-Document feature is supported ?
For example I designed a document contains daily around 100 events. If possible I’d like to
design yearly document which contains 100 * 356 events.

Please give me suggestions.

Hi, webber,

Thanks for trying subdoc feature !

The two major benefits of subdoc are:

  1. Reduce network bandwidth because you don’t have to send/receive full document across the network.
  2. Latency improvement for get/set for large documents. In this case, only a small portion of the document needs to traverse the network, which reduces the latency.

Here’s the doc which talks about subdoc:
http://developer.couchbase.com/documentation/server/4.5-dp/sub-doc-api.html
http://blog.couchbase.com/2016/february/subdoc-explained

There’s no change in terms of the max size of document we supported in CB.
http://developer.couchbase.com/documentation/server/current/clustersetup/server-setup.html

In terms of disk I/O and memory, there may not be much improvement because under the hood, we will need to persist the full document into disk.

In terms of data model, I think this will depend on your use cases:

  1. How often will the documents get updated?
  2. Do you only need to read one day’s events or you need to read multiple day’s events?
  3. What’s your latency requirements for get/set?

Please give it a try with DP 4.5 together with SDK for subdoc.
It will be great if you can provide some feedback after you give it a try.

Thanks,
Qi

Hi qicb,

Thank you for the reply and providing valuable information about Sub-Document.

  1. How often will the documents get updated?
    100 times everyday and 100 * 365 times per year.
  1. Do you only need to read one day’s events or you need to read multiple day’s events?
    Usually one day’s events but sometimes we need to traverse documents over days.
  1. What’s your latency requirements for get/set?
    We expect the latency should be the same as the document design is daily basis.

I will try both cases with DP 4.5.

Thanks,
webber

Thank you, webber.

We would love to hear your feedbacks and thank you for give our product a try.

Thanks,
Qi