0

I have a Rich Internet Application which is provided in the SaaS schema (cloud) via Internet. The application is deployed via Java Web Start: users click on a link pointing to a JNLP file to the provider site (http://somesite.com/myapp/myapp.jnlp); then the application is downloaded and locally cached (from the client's Java control panel I see that the application is about 40 MB). I expect that if no server-side changes occur the clients use the cached version. A possible issue can happen when a new server version is released: all clients (hundreds) can potentially download the new version at the same time. To prevent this problem I would like to explore the possibility of using the Web proxy as a cache: the first client downloads from the Internet the new version, other clients download the version cached on the Web proxy. Is this feasible? I have some doubts mostly due to the fact that, from the Java control panel --> Java cache viewer (Java 6 on Win XP) I can see 1 application (40 MB) in the 'application view', some JARs when I switch to 'Resources view', but when I go to the disk location supposed to physically host the cache I see a lot of folders (most empty) and .idx files (no trace of JARs). The idea is to tell the Web proxy (which is Forefront TMG) to cache only a set of files (which ones? which extensions?) coming from the provider's site. I attach the cleansed version ofthe JNLP file with the caching option, but I guess they are not relevant to my question since they only deal of the caching option on the CLIENT (right?)

<jnlp spec="1.0+" codebase="http://somesite.com/myapp/" href="http://somesite.com/myapp/WebStart.jnlp">
  <information>
    <title>....</title>
    <vendor>....</vendor>
    <homepage href="http://somesite.com"/>
    <description>....</description>
    <icon href="http://....gif" kind="default"/>
    <shortcut online="true" install="false">
      <desktop/>
      <menu submenu="...."/>
    </shortcut>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <java initial-heap-size="20971520" max-heap-size="536870912" java-vm-args="-XX:MaxPermSize=128m" href="http://java.sun.com/products/autodl/j2se" version="1.6.0_11+"/>
    <jar href="http://......jar" download="eager" main="false"/>
     ... some other JARs...
  </resources>
  <application-desc main-class="com.package.....">
    <argument>-showSavePwd</argument>
    <argument>-forcedHttpsLoginPort:443</argument>
    <argument>-availableLanguages:en;fr;de;es;ja</argument>
    <argument>-forceCountryByLanguage:false</argument>
  </application-desc>
</jnlp>

Thanks

Diego Pascotto
  • 329
  • 2
  • 13

1 Answers1

1

I've used the CloudFront for our CDN and it has worked well for almost 2 years (20+ application updates). I would adjust your JNLP like this:

 ...
  <resources>
    <java initial-heap-size="20971520" max-heap-size="536870912" java-vm-args="-XX:MaxPermSize=128m" href="http://java.sun.com/products/autodl/j2se" version="1.6.0_11+"/>
    <jar href="http://xyz.cloudfront.net/path/some.jar" download="eager" main="false" version="123"/>
     ... some other JARs...
  </resources>
...

http://xyz.cloudfront.net/ is configured with the origin pointing to http://somesite.com/.

After that CloudFront is configured to cache query strings which allows the version mechanism to work. After this initial configuration I've not had to do anything to keep it running.

William
  • 331
  • 3
  • 3