Creation of Daemon to push data on sync gateway

We need to create a Daemon service which will take data from legacy services convert those into documents and post/put of sync gateway.

What is the best option :

  1. Use Rest API of sync gateway
  2. Use Couch base lite Native API in the Java Daemon. But then do we need to create a couch base lite local db to use the native API? How much load couch base lite can handle?

Please suggest.

Pankaj Sharma

I think option 1 is better.
because if you choose option 2, you need load data into CBLite first, then sync to sync gateway via SG REST API. it is unnecessary unless you want to let CBLite store a copy data for legacy services for some reason.

Hi @atom_yang

But I am facing issue while posting attachment via Rest API. I have posted an issue @ Attachment in a document on Sync gateway using .Net console application

Can you help on that. Without posting images it is a blocker. I have figured out normal JSON but Images having issue.

If you want I can post a fiddler call also. By capturing the utility.