[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-dev] [OONI] Designing the OONI Backend (OONIB). RESTful API vs rsynch
> Contra:
> * No support for deltas (we can use rsych protocol over HTTP if we
> really need this).
It's a little hackish, but I believe there is a 'standard' way to do
this in HTTP also. A client issues a GET (or PUT) request to a
resource, and recieves an Etag that identifies this version of the
object. The client then issues a PATCH Request to update the object,
sending the Etag, and either structured XMLor JSON with the fields to
replace, or binary data with a Range header indicating where in the
object to replace.
If the Etag the client sent is the object stored on the server, the
PATCH succeeds and overwrites the data. If the Etag does not match,
the client is out of date and must issue a GET, resolve differences,
and then the PATCH.
-tom
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev