Sneak preview: Content Templates in Vidispine 4.5
We have some sneak previews on future functionality of Vidispine for you. First out is Content Templates, arriving in version 4.5. Content Templates is an easy and flexible way of optimizing data retrieval from Vidispine. The use of content templates will decrease delays, payload size and the burden on your database. We think it’s a winner.
The Vidispine API is great at giving a lot of information, down to single subtitle entries as metadata, or every technical detail you can imagine around an item’s shape. This comes with a price, though.
The sheer size of the response body may not be a big burden for your network, but marshalling and unmarshalling costs may add up to a noticeable delay. The other factor is the number of look-ups Vidispine has to do to the database to find all values. Many of them are efficiently cached and the cost is amortized, but there is a limit to the cache size.
The Projection functionality of Vidispine (XSLTs) can be used to reduce the size of the response body. However, the database look-ups are still there, and there is XML marshalling operations just to feed the XSLT engine. Also, Projections are only available for XML output, not JSON.
For metadata, there is already the option of specifying what metadata fields to return. It is not very generic though, and is not applicable for shape metadata and other values of the item.
Content templates are a way of specifying exactly what information you want to retrieve. By specifying a number of paths into the ItemDocument, Vidispine can optimize the database queries and generate a smaller ItemDocument, with only the requested information.
The syntax is very simple. Just add a query parameter to your current /API/item call:
In order to make it easier for you, we support predicates and multiple paths (branches) in the syntax. And even better, there are shorthand aliases built-in, and you can add your own.
Some (very) beta performance results from the lab can be seen in the table below. Because of the possibility to specify exactly what you need several types of queries will perform 5-10 times faster, and return a much smaller payload. This will be especially important for applications that don’t run on the same network as the Vidispine servers, e.g., mobile phone apps.
Content templates will be available in Vidispine 4.5, scheduled to be released in Q1 2016.
Update Mar 2: Vidispine 4.5 is now released and with that also content templates. Content templates changed name to content paths, and you can find the relevant API documentation about content paths here. The batch list job and list library job has also been updated to support content paths.