3rd-Eden / versions

Versions, A small module for creating a flexible CDN application
204 stars 13 forks source link

Hinted origin pull #10

Closed 3rd-Eden closed 11 years ago

3rd-Eden commented 11 years ago

We are currently iterating over the provided origin servers list in order to pull them from the servers. This is done in series so the order of the list specifies the importance of the assets over each other so it prevents clashing of duplicate resources from different origins.

But sometimes in you want to have image.png from origin 1 and image.png from origin 2. In order to facilitate this behavior we should introduce origin hinting in to the url.

schema: /versions:<key>/id:<origin>/image.png
example: /versions:0.3.1/id:github/image.png # this would fetch the image.png from the specified origin, in this case it would be origin with the id `github`

Is one of the first things that pops in to my mind. We cannot use URL strings as they are prevent our assets from being cached by caching proxies.