How to export/Upload data from Couchbase into RDBMS


#1

Hi Guys,

I need to upload some data from Couchbase to mysql server by using any JAVA Application whenever there will be change in any doc and I’m wondering about the most efficient and practical way of doing this.

Or we can say that if Couchbase server records any change in doc then it should make an HTTP call to any java based Application which will then proceed things further.

As I am new to both NoSQL and CouchBase, I would really appreciate some advice.

Looking forward to your answer!

Cheers,


#2

Hi, You’ll find lots of information on DCP and Couchbase on our docs page - http://docs.couchbase.com/admin/admin/Concepts/dcp.html

Projects like this one use it https://github.com/couchbase/couchbase-kafka-connector


#3

Note that DCP is experimental for this kind of use at this stage. It’s definitely used by others and will receive full support soon.

If you’re starting off very new, you may want to look into cbtransfer as a first step assuming it meets your needs in running in batch. You’d not be able to get a stream of items as they change in this case.


#4

Thanks for your quick reply.

Let me clarify things a bit further. We have our own ERP system which is in production. Let me explain the use case in detail: We have e-commerce store front and our current java application have ShoppingCart class. When end user add items into the cart, shopping cart object is created and items are added in this object. Now in very high traffic this may not scale. So instead of using in-memory shopping cart object, we wanted to use No-sql (Couchbase) database. Now when user will add items into cart, we will create records in No-sql database and when order is finally placed, we will update status of document in No-sql database. Then we are planning to push these orders in our ERP system asynchronously, where fulfillment and other things will be managed.

So to push orders asynchronously we are thinking if we can call web-service (of our java application )or do a rest call to our java application which will take data in json format and process it and then save it in RDBMS of our ERP.

What should be best way to attack this problem ?

Do we need to implement some kind of listener plugin who will be continuously scooping to Couchbase Server for any changes in it using DCP.


#5

Hello Suraj,

Wonder if you can share with us if you were able to do what you needed and how you achieved it.

Thanks