[Cubicweb] Which way to go to do remote RQL ?

Nicolas Chauvat nicolas.chauvat at logilab.fr
Thu Aug 7 21:43:41 CEST 2014

On Thu, Aug 07, 2014 at 10:14:47AM +0200, Yann Cointepas wrote:
> I use multiple requests transactions because users are sending packages of
> data. We garantie that a package that cannot be fully integrated in the
> base will be rejected (and possibly corrected and resent by the
> user).

What are the reasons that a package can be rejected for?

> Rejected package leave nothing in the base. Since a package can contains
> various data (e.g. MRI Scans, MRI scans with processing results, only
> processing results, etc.), the content of the package in processed in a
> transaction.

You could devise an Upload or Transaction object and use
https://www.cubicweb.org/project/cwclientlib to implement the
following workflow:

1) create a new Upload object

2) add scans, results, etc to the Upload object

3) check the correctness of the Upload

   if it is correct -> move its content to the "standard context" of
   the db, making it available to other users

   if it is not correct -> delete the upload and all its content

IIRC, we do something similar when uploading files in
https://www.simulagora.com/ and we can for example resume interrupted
file transfers to reach correctness before the upload becomes valid.

Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  

More information about the Cubicweb mailing list