[annodex-dev] URI templates for time, id offsets

Conrad Parker conrad at metadecks.org
Sun Dec 9 21:08:10 PST 2007


On 10/12/2007, Silvia Pfeiffer <silviapfeiffer1 at gmail.com> wrote:
> Hi Conrad,
>
> On Dec 7, 2007 9:07 PM, Conrad Parker <conrad at metadecks.org> wrote:
> > Hi,
> >
> > currently, we specify that time offsets must be given by a t=
> > parameter, and clip offsets must be given by an id= offset.
> >
> > An alternative would be to use URI templates, similar to those used by
> > OpenSearch for specifying how to build a search query URI
> > (http://www.opensearch.org/).
> >
> > This would allow a site to choose the query parameters to use; for
> > example, to say that a specific resource uses "baz" instead of "t", a
> > site would advertise the template:
> >
> >   http://www.example.org/britney.axv?baz={timeOffset}
> >
> > For more info on URI templates, see eg:
> >
> >   http://bitworking.org/news/URI_Templates
> >   http://bitworking.org/projects/URI-Templates/draft-gregorio-uritemplate-00.html
> >
> > In OpenSearch, those templates are described in a separate XML description file.
> > However, we could avoid an extra HTTP GET by simply placing this
> > template into an HTTP response header, for example the HTTP response
> > headers for http://www.example.org/britney.axv could include:
> >
> > X-TimeURI-Template: http://www.example.org/britney.axv?baz={timeOffset}
> >
> > Thoughts? do you think URI templates would be useful for specifying
> > time and clip offsets? should they be given in HTTP headers or XML
> > files?
>
> I think URI templates sound like a great addition to what we have
> currently suggested. The current parameter names t and id could be the
> default ones, but if somebody needed to change them, they could use
> URI templates.
>
> As for how to specify them - I have tried finding out whether the
> standard specifies a method, but couldn't find a mention of it.

Yeah, I assume that finding out about the template mechanism is up to
the application.

> Have
> others used the HTTP header approach or is this a new idea of yours?
> Have you bounced that idea off the URI template specifying guys?

i haven't seen the HTTP header approach used elsewhere. Most uses of
URI templates are for conventional web apps, where protocols involve
transferring XML content.

As the main content of a video feed is binary, I tend to think it
works well to instead use request/response headers for this kind of
thing (negotiating and discovering the protocol).

> Would love to hear from others about this, too.

me too!

K.


More information about the annodex-dev mailing list