Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

rest-discuss · The REST Architectural Style List

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 1889
  • Category: Protocols
  • Founded: Nov 13, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Link relations for videos   Topic List   < Prev Topic  |  Next Topic >
Summarize Messages Sort by Date  
#17937 From: Alessandro Nadalin <alessandro.nadalin@...>
Date: Wed Nov 9, 2011 5:46 pm
Subject: Link relations for videos
alessandro.n...
Send Email Send Email
 
Hi guys,

I'm currently developing an HTTP interface (can't dare to call it
REST) for a few clients and I have a question for y'all.

I have a resource, /video/{id}, which contains metadata of a video (in
Atom) with a few outgoing links to different formats of the original
source file (let's say that I take, in input, an AVI, and produce
mpeg, ogv and so on).

I tried to represent the link to video files with:
https://gist.github.com/1352232

but I really don't know if the "alternate" link semantic is the right
one. Anyone has suggestions?

--
Nadalin Alessandro
www.odino.org
www.twitter.com/_odino_

#17938 From: Jan Algermissen <jan.algermissen@...>
Date: Wed Nov 9, 2011 5:56 pm
Subject: Re: Link relations for videos
algermissen1971
Send Email Send Email
 
On Nov 9, 2011, at 6:46 PM, Alessandro Nadalin wrote:

> Hi guys,
>
> I'm currently developing an HTTP interface (can't dare to call it
> REST) for a few clients and I have a question for y'all.
>
> I have a resource, /video/{id}, which contains metadata of a video (in
> Atom) with a few outgoing links to different formats of the original
> source file (let's say that I take, in input, an AVI, and produce
> mpeg, ogv and so on).
>
> I tried to represent the link to video files with:
> https://gist.github.com/1352232
>
> but I really don't know if the "alternate" link semantic is the right
> one. Anyone has suggestions?

I think that makes sense. Personally, I am not a friend of the type parameter (I
prefer to let content negotiation handle the selection), but for your use case
it seems like a good option.

You might want to look at NewsML 2 one day for inspiration. IIRC it has quite
sophisticated meta data for media.
(But it is a huge, sort of complicated spec and format).

http://www.iptc.org/site/News_Exchange_Formats/NewsML-G2/

Jan



>
> --
> Nadalin Alessandro
> www.odino.org
> www.twitter.com/_odino_
>

#17941 From: Alessandro Nadalin <alessandro.nadalin@...>
Date: Wed Nov 9, 2011 6:16 pm
Subject: Re: Link relations for videos
alessandro.n...
Send Email Send Email
 
On Wed, Nov 9, 2011 at 6:56 PM, Jan Algermissen
<jan.algermissen@...> wrote:
>>
>> but I really don't know if the "alternate" link semantic is the right
>> one. Anyone has suggestions?
>
> I think that makes sense. Personally, I am not a friend of the type parameter
(I prefer to let content negotiation handle the selection), but for your use
case it seems like a good option.
>

Uh jan, good point, I forgot to think about negotiation, since I'm
used to it with "canonical" types (json/atom/xhtml...)

@erik: just wondering :)

>
> Jan
>
>
>
>>
>> --
>> Nadalin Alessandro
>> www.odino.org
>> www.twitter.com/_odino_
>>
>
>



--
Nadalin Alessandro
www.odino.org
www.twitter.com/_odino_

#17946 From: Erik Wilde <dret@...>
Date: Wed Nov 9, 2011 10:46 pm
Subject: Re: Link relations for videos
drethoo
Send Email Send Email
 
hello.

On 2011-11-09 10:16 , Alessandro Nadalin wrote:
> On Wed, Nov 9, 2011 at 6:56 PM, Jan Algermissen
> <jan.algermissen@...>  wrote:
>>> but I really don't know if the "alternate" link semantic is the right
>>> one. Anyone has suggestions?
>> I think that makes sense. Personally, I am not a friend of the type parameter
(I prefer to let content negotiation handle the selection), but for your use
case it seems like a good option.
> Uh jan, good point, I forgot to think about negotiation, since I'm
> used to it with "canonical" types (json/atom/xhtml...)
> @erik: just wondering :)

agreeing with eric here: it's nice to have server-driven content
negotiation and have "gateway resources" supporting it, but it's also
nice to have stable and exposed URIs for specific renditions, and as
long as everything is correctly labeled and interlinked, it's nicely
RESTful and allows clients some choice.

cheers,

dret.

#17942 From: "Eric J. Bowman" <eric@...>
Date: Wed Nov 9, 2011 6:47 pm
Subject: Re: Link relations for videos
eric@...
Send Email Send Email
 
Jan Algermissen wrote:
>
> I think that makes sense. Personally, I am not a friend of the type
> parameter (I prefer to let content negotiation handle the selection),
> but for your use case it seems like a good option.
>

Upon receiving this representation, the user-agent knows the shared URI
it can use for server-driven negotiation; and is also informed of the
number, nature and location of variants in order to perform client-
driven negotiation (to recover from failure, etc.).  I don't see how
@type is ever a bad thing (unless it's wrong) -- if a user-agent only
knows one of the available types, why incur the added latency of conneg
on each request?  While conneg is a great general-purpose tool for
general-purpose clients, it gets in the way of purpose-built clients
getting their work done, so it would be a shame if no @type existed to
inform purpose-built clients how to bypass conneg.

-Eric

#17940 From: "Eric J. Bowman" <eric@...>
Date: Wed Nov 9, 2011 6:10 pm
Subject: Re: Link relations for videos
eric@...
Send Email Send Email
 
Alessandro Nadalin wrote:
>
> but I really don't know if the "alternate" link semantic is the right
> one. Anyone has suggestions?
>

Why not?  Looks like long-standing best-practice to me.

-Eric

#17950 From: Erlend Hamnaberg <ngarthl@...>
Date: Thu Nov 10, 2011 7:19 am
Subject: Re: Link relations for videos
ngarthl
Send Email Send Email
 
Personally I'm a fan of the MediaRSS extension for image and video content.
Basically it's a "beefed-up" link.


<media:content media="video" url="..." width="" height="" />

Of course, your rel="alternate" also works.
Maybe even  rel="enclosure" would be a suitable rel.

--
Erlend

On Wed, Nov 9, 2011 at 6:46 PM, Alessandro Nadalin <alessandro.nadalin@...> wrote:
 

Hi guys,

I'm currently developing an HTTP interface (can't dare to call it
REST) for a few clients and I have a question for y'all.

I have a resource, /video/{id}, which contains metadata of a video (in
Atom) with a few outgoing links to different formats of the original
source file (let's say that I take, in input, an AVI, and produce
mpeg, ogv and so on).

I tried to represent the link to video files with:
https://gist.github.com/1352232

but I really don't know if the "alternate" link semantic is the right
one. Anyone has suggestions?

--
Nadalin Alessandro
www.odino.org
www.twitter.com/_odino_



 
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help