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

Cache to cdn #13

Open
meelash opened this issue Sep 22, 2012 · 2 comments
Open

Cache to cdn #13

meelash opened this issue Sep 22, 2012 · 2 comments
Assignees

Comments

@meelash
Copy link
Owner

meelash commented Sep 22, 2012

Wonder if it would be beneficial to be able to deploy to cdn. The way it could work is, as bundles are cached on the server, they could be uploaded to a cdn. The next time a client connects, the client-side code can include the location of that bundle. The client-side code can also be included on a cdn and be updated there with the latest cache.

Seems like the biggest challenge is working with the api to different cdn's. Need to research if they even exist and if there is any standardization.

@meelash
Copy link
Owner Author

meelash commented May 11, 2013

Ok, so this is next up... A plugin architecture seems best. This seems like it can be easily split into logical smaller tasks:

Plugin interface- adding the plugin, passing a bundle to the plugin (on duplicates, only deal with the first), plugin calls back a url to the bundle. Implement a sample plugin for one of the popular cdns.

client-side- somehow we need to pass a hash of the cached bundles and their cdn paths back to the client. On request, client-side should check if cached, if so, load the bundle from there, otherwise request it from the server. Cross-site restrictions could become an issue here, with our current mechanism of xhr+eval.

Cache client-side/bundle:cdn hash to cdn as well- the final goal is to get to the point where the entire application is all served from cdn, unless a user happens to request a bundle that has never been loaded before- a rare occurrence after the first few users run through. At this point, we need to include some kind of identifier scheme for cache busting when something changes.

@ghost ghost assigned meelash May 11, 2013
@meelash
Copy link
Owner Author

meelash commented May 20, 2013

Pushed failing tests for the plugin interface to a new branch named 'cdn'. Arrggh, wish it wasn't Monday, so I could work on this more....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant