Transferring nodes between instances
@anoe would like to be able to transfer nodes between instances.
Requirements
- As a user, if I am logged in on several Gargantext instances, I should be able to transfer a node from one instance to the other.
Technical requirements
This requires a bit of thinking as it's easier said than done, as there are several questions to answer:
- What happens if a node is dependent on data from another node? Should we recursively copy all the children as well, or we support transferring only (certain) leaves? For example a Graph will need the co-occurrences to be generated (or re-generated, likely) but if we didn't transfer the required data, it won't work. Similarly terms are associated to documents, etc;
- What happens if we copy a Shared node? Likely we won't have the same team structure from one instance to the other, which means any share information is lost in the copy;
- What's the authentication story? As far as the backend goes, multiple instances are disjointed backends, which don't share an overarching login. Probably the backend should expose an endpoint to transfer data by supplying two authorization tokens, one for the source, and one for the target. Certainly we didn't want to allow anybody to transfer everything.
Probably we can start by sketching out the endpoint(s) and start with some very simple use case, like transferring a single (simple) node, and make it more complex as we go along.