Re: Batch Annotation creation use case

You read correctly that there isn't a batch creation API. The protocol
builds upon the LDP specification, which also doesn't have batch processes.

One consideration is that the use of HTTP/2, with persistent asynchronous
connections, might mitigate many of the downsides of HTTP/1.1 where forging
the connection and waiting for the response before moving to the next
operation is no longer a bottleneck. The other approach that has been
discussed is the use of websockets for bidirectional communication, however
it means implementing the HTTP headers as part of the communication payload
... HTTP over websockets over HTTP is as strange as it sounds.

Hope that helps,

Rob

On Tue, Nov 14, 2017 at 8:58 AM, Patrick Cuba <patrick.cuba@health.slu.edu>
wrote:

> I have read what documentation and examples I could find for Web
> Annotation and HTTP and there is a space in which I remain without an
> answer. Is there a protocol for unContained Annotations to be saved
> (updated/created) in a batch? With one Annotation, it is clear to return a
> `Location` header with the URL and similarly when creating a new Container.
>
>
>
> In my case an interface creates *n* new Annotations that may share some
> relationship but do not belong in a Container together, I have a Web
> Annotation repository that would like to allow some `POST /batch` scenario
> with an array of JSON-LD Annotations for creating. The existing behavior
> returns 201 and a comma separated list of URLs in the `Location` header.
> Errors break the batch and the first error is returned. Is this unusual? It
> gets expensive to make 40 calls for a new set, so some batch option feels
> normal, but I cannot find any examples or guidelines.
>
>
>
> In this case, we are building the interface(s) and the Annotation Store,
> but the Annotation Store is open to the public, so we want to put forth an
> API that is as congruent as possible with existing standards.
>
>
>
> Thanks for your thoughts,
>
>
>
> Patrick Cuba, Lead Developer
>
> Walter J. Ong S.J. Center for Digital Humanities
>
> Saint Louis University
> +1.314.977.4249 <(314)%20977-4249>
>
>
>



-- 
Rob Sanderson
Semantic Architect
The Getty Trust
Los Angeles, CA 90049

Received on Wednesday, 15 November 2017 17:51:03 UTC