metabrainz / web-service-v3-design

A collaborative specification for the third version of the MusicBrainz web service
2 stars 1 forks source link

How should we link to 'auxiliary' data? #6

Open ocharles opened 12 years ago

ocharles commented 12 years ago

In various responses, we provide hyperlinks to auxiliary data. For example, the artist that a set of artist aliases belong to, or the label that an artist-label relationship points to. The question is:

  1. Do we retain these hyperlinks?
  2. Or do we expand these hyperlinks into full objects?

I personally am in favour of 1 (hence writing it so!), and my rationale is as follows. With aggressive cache control headers, fetching this data can effectively be reduced to a no-op once the client has requested this data once. As per rate limiting, requesting something that hits the cache does not cost against the rate limiter. Thus this data is usable by clients at almost no cost, and the data only has to be transmitted once, rather than multiple times.

warpr commented 12 years ago

I also vote for 1. Though we should encourage client library developers to also cache locally and not request the same resource multiple times in a short period of time, unless specifically requested to do so by the end user.