Needs Memcached/Ephemeral buckets Example with SDKl!

#1

I couldn’t find any example/tutorial , Nothing about Memcached bucket even Ephemeral bucket.
Why couchbase has lack of documentation ??
I want to replace my Redis server to Couchbase memcached/Ephemeral bucket. but I don’t know how to use it with SDK.

Could you give me some usage example/tutorial anything using SDK?
I can use Go,Python,Node.js .

#2

Hello @max_xyz,

The SDKs will automatically detect the bucket type. The application developer for most part does not have to worry what the bucket type is, of course there’re some operations like persistTo that will not work with Memcached and Ephemeral buckets.

I would recommend using an Ephemeral bucket over a Memcached bucket, it does all stuff that Memcached buckets can do plus much more. To use an Ephemeral bucket create a bucket and select ephemeral as the bucket type then use the Hello Couchbase example to connect from the SDK.

For more information about the different bucket types see the documentation

Let’s know if you have any other questions?

1 Like
#3

Thank you for answering !

I have some questions !

My main concern is to utilize Couchbase as a in-memory database like Redis in some dataset which has very high frequent read-write operation.
I also have persistent dataset as well. So I need to manage two type of buckets with the same dataset?

Let’s think about time-series finance dataset.
I basically need persist all finance tick data(30sec, 60sec,5m and so on).
Users will have read operations for the latest finance dataset, not all old time series.
For this reason, I need a in-memory type for this frequent access data like Redis but I also need to persist the data permanently at the same time because user can also retrieve all historical finance dataset.
I couldn’t find any knowledge&examples about this situation.

So, If I use Ephemeral bucket, I don’t need worry about additional setup; just use it like a normal bucket?
One thing I know about Couchbase is it has an inherent cache capacity even for a normal bucket type. right? So, Do I still need have Ephemeral bucket for this?

#4

One thing I know about Couchbase is it has an inherent cache capacity even for a normal bucket type. right? So, Do I still need have Ephemeral bucket for this?

This is the key question for the use case. Couchbase buckets do have an inherent cache capacity, there should never be a need to put a cache in front of a Couchbase bucket. If the data needs to be persistent then the correct bucket would be a Couchbase bucket. The bucket will automatically cache the data in memory that is being accessed regularly.

There have been use cases where Couchbase Server replaces both Redis and Mongo as a single solution.

1 Like