Enabling Json publisher with couchdb

Hi,

I'm trying to get odk to publish to a couchdb server but am having issues. I've configured the server to receive from ODK (publicly accessible with CORS). I can publish one instance successfully, however then the connection breaks (ACTIVE RETRY) and periodically the same instance will be submitted as duplicate.

I'm assuming that the issue is with the response code sent from the server. The default POST response is outlined: https://wiki.apache.org/couchdb/HTTP_Document_API

This differs from the 200 status code Aggregate expects on successful transfer as mentioned: https://github.com/opendatakit/opendatakit/wiki/Aggregate-Publishers-Implementation-Details

Is there anything that can be done about this? I've looked into couchDB and it is not possible at this stage to change the response on a server basis.

Thanks

Chris

Hi Chris,

Maybe stick a lightweight server between Aggregate and Couch that
sends the right response codes to each.

Yaw

ยทยทยท -- Need ODK consultants? Nafundi provides form design, server setup, in-field training, and software development for ODK. Go to https://nafundi.com to get started.

On Sat, Dec 5, 2015 at 3:58 AM, chris.m.clarke@live.co.uk wrote:

Hi,

I'm trying to get odk to publish to a couchdb server but am having issues. I've configured the server to receive from ODK (publicly accessible with CORS). I can publish one instance successfully, however then the connection breaks (ACTIVE RETRY) and periodically the same instance will be submitted as duplicate.

I'm assuming that the issue is with the response code sent from the server. The default POST response is outlined: https://wiki.apache.org/couchdb/HTTP_Document_API

This differs from the 200 status code Aggregate expects on successful transfer as mentioned: https://github.com/opendatakit/opendatakit/wiki/Aggregate-Publishers-Implementation-Details

Is there anything that can be done about this? I've looked into couchDB and it is not possible at this stage to change the response on a server basis.

Thanks

Chris

--
You received this message because you are subscribed to the Google Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks for the response, that's exactly the route I've decided to take (creating a simple post server using node/express and nano).

All seems to be working really well, I'll probably do a little bit more testing first but then more than happy to share code/instructions with anybody interested in trying to do similar.

Similar method also works for anybody using mongoDB (although I found it easier to just use the restheart api to manage post requests).

Chris