This topic comes up from a comment on the rpc.js updates, see below. The simplistic method below works only if you have one physical server, or can simultaneously update your server farm. But if you have a gradual roll out to the servers, a version skew can start to take place. This is a problem we will be facing in the next few months.
My first thought is a custom GadgetFeatureRegistry and the use Guice, but if there is a need in the community for a solution, perhaps we can start to scheme on how that could be done as it might require some substantial changes. A high level proposal, just to get people thinking: The GadgetFeatureRegistry would support versioning, and the feature JS would have to be versioned as well (of course only features with gadget and container code, like rpc.js). A configuration variable would tell the server what version to serve up. The metadata call would return that version to the container so it can generate the proper js servlet call and ifr render call. A new build would be made with a minimum of old and new JS versions. But the configuration would point to the old version. A roll out to all the servers would commence, and over time finish. The system would run new server side executable code, but the old JS code. The configuration variable would be altered, at runtime of course, to switch the JS versions to the new version. Even if the switching takes time, or pages are cached, all servers can serve both old and new versions, and the container will coordinate the js and ifr servlet calls correctly. Jon -----Original Message----- From: John Hjelmstad [mailto:[email protected]] Sent: Monday, June 08, 2009 7:21 PM To: [email protected] Subject: rpc.js updates, optimizations, and info [deleted...] * Containers taking an rpc.js "snapshot" make improvements/upgrades exceedingly difficult to impossible. As has been noted in several places, the rpc.js version that the container loads should always be the exact same as what the gadget loads. This is often achieved by the container including <script src=" http://gadgetserver.com/gadgets/js/rpc.js?c=1&container=1[&debug=1][&v= <hash>]"></script>. [deleted...] Best, John

