You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: