Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Add a replication route #94

Open
paultranvan opened this issue Feb 11, 2015 · 4 comments
Open

Add a replication route #94

paultranvan opened this issue Feb 11, 2015 · 4 comments
Labels

Comments

@paultranvan
Copy link
Contributor

For now it is not possible for an app to request its proxy for a replication with a remote target.
External clients like cozy-desktop or cozy-mobile can request a replication on a local database, e.g. PouchDB and establish the sync with cozy through the device interface. But a cozy app cannot access the CouchDB replication.
Adding a replication route would enable at least 2 things :
_ the possibility for an app to share data with a remote cozy
_ the possibility to create backup apps

The proxy should check that the request is correctly authenticated before routing the request to CouchDB. The remote authentication on the other hand is probably an other issue (User/Sharer doctype with specific rights?).

@frankrousseau
Copy link
Contributor

+1 for that feature request.

One more use case: write client-only apps based on Pouch that syncs with the Couch.

@aenario
Copy link
Contributor

aenario commented Feb 11, 2015

@frankrousseau this is already possible through the device API and wont be possible using this approach.

To put it simply, it is already possible to replicate to & from the cozy's couchdb if the replication is managed from the outside (see cozy-mobile & cozy-desktop)
What is not possible is to POST localhost:5984/_replication to ask the cozy's couchdb to initiate and manage a replication

So from my point of view, it would make more sense for this to be an API of the DS rather than the proxy. So a cozy app could say : "OK cozy, do a replication to/from this remote" (where the remote could be another cozy). Of course @Gara64 , this depends of the architecture of the solution (ie. is there an app in the cozy ?).

@frankrousseau
Copy link
Contributor

@aenario I don't think. There is an authentication process specific to devices that allows it. For an app, it would mean to register as a device.

I agree it should be part of the DS to manage properly authentication and filters.

@paultranvan
Copy link
Contributor Author

Yes that would definitely be better as an API in the DS. However in a first step, maybe it would be simplier and faster to do it in the proxy?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants