Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest minor versions #236

Closed
Zverik opened this issue Dec 25, 2013 · 6 comments
Closed

Latest minor versions #236

Zverik opened this issue Dec 25, 2013 · 6 comments

Comments

@Zverik
Copy link
Contributor

Zverik commented Dec 25, 2013

(moving discussion from #235)

It would be nice to have version-dependent latest. There are two ways this can be done (examples from that wiki page):

//cdn.jsdelivr.net/abaaso/latest/3.8/abaaso.js

Loads version 3.8.16 if it is the latest version in 3.8 branch. /latest/3/abaaso.js will return the latest version in 3 branch: e.g. 3.11.5.

//cdn.jsdelivr.net/abaaso/3.8/abaaso.js

This will load version 3.8 if there is a directory for it, or the latest version in 3.8 branch (3.8.16) it there isn't. There might be a problem if author doesn't keep version format consistent.

@jimaek: I want to make the URLs more dynamic but my problem is reliability. With static files I know 100% the user will get the contents of the file. But for example if I create a PHP script to handle different parameters like the versions you said then a lot of new points of failure are added. script code, php-fpm, MySQL, server load...

Well, latest versions are surely not generated by a PHP script, but probably just copied to some location. The same algorithm can be applied to sub-latest versions (1, 1.0, 1.1, 2, 2.0 etc). Hardlinks can remove any disk space overhead.

As for one-week update delay, this is a problem. And I don't know how it can be solved — except for keeping a separate "routing" server, which receives a request for a sub-latest version, and routes to the correct file. But it will be a SPF, which is bad. Still, it is a task worth thinking about. It will also allow for faster latest.

@jimaek
Copy link
Member

jimaek commented Dec 25, 2013

I guess I can lower the caching time for latest. For example from 7 to 3 days. What do you think?

Currently I am trying to do these minor versions you asked. I will let you know how it goes.

Btw you can also read this article to understand better how jsDelivr works

@jimaek
Copy link
Member

jimaek commented Dec 27, 2013

Done! Check it out

http://cdn.jsdelivr.net/abaaso/3.8/abaaso.js = 3.8.16

@Zverik
Copy link
Contributor Author

Zverik commented Dec 27, 2013

Magical! How did you do it? Like latest, with three-day latency?

@jimaek
Copy link
Member

jimaek commented Dec 27, 2013

For now I didn't change the caching times. What do you think its the best number?

@Zverik
Copy link
Contributor Author

Zverik commented Dec 27, 2013

Well, I can't decide on it, since I don't know the algoritm for pushing it to CDNs, but from a dev's point of view it should be a day, maybe two. Only because after releasing a version a developer wants it to be available as early as possible :)

Three days are good enough, I think. Though forbids quick patches. A week feels a bit too long.

@jimaek
Copy link
Member

jimaek commented Dec 29, 2013

I am going to leave it 7 days for now. Will see how it goes and if needed I change it.

@jimaek jimaek closed this as completed Jan 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants