I'm exploring the Azure platform, but I'm experiencing issues.
Actually, there's something I don't get...
I understand the difference between a web role and a worker role. But how to specifically create a web role for a Java app ?
Because when developping a java app for azure in eclipse, we have to copy/paste a java server (i picked up tomcat7) + jdk. I assume it's only to run the java app inside the emulator.
But, when deploying the app to azure as a webrole.....Does it upload only the war package + xml configuration files (cscfg and others) or does it also uploads the server and jdk ? I tried to build the project with "Cloud" parameter instead of "Emulator" parameter and it created a huge cspkg file of 150Mb... I seriously can't upload 150Mb each time I have to update the app...
Why don't just allow to upload a .war file ? And if we have to upload the server distribution, then how is the failover and session replication set up ??
I probably miss something...
Thanks for your answers
Edit :
Actually, from what I've read from the web, java applications are not natively handled by Azure, so you have to provide your own applications server (tomcat, glassfish etc..) inside the package, and the startup script will run the server with your app inside. You have to upload the jre + the server binaries + your application code everytime you want to redeploy a new package.
There's no built-in support for session replication or anything. If you want session to be "sharable" across multiples instances, you have to use the Table Storage service to store session infos.
Note : With eclipse, the lastest plugin allows you to set sticky session, but I don't know anything more about it
Hence, a java app is not deployed as a webrole but as a worker role where you add your own server.
Webroles are only for .NET and PHP applications.
Correct me if I'm wrong.
Thanks for your answers guys.
This brings another question : what happens "under the hood" when you deploy a new version of a java package ?
Let's imagine tomcat released a major security fix, you need to use a new version of tomcat either by embedding it into the cspkg (heavyyyyy), or, as you (David) suggested, by storing in blob (light !!) and, of course, the java code with few updates. You deploy this package on already running instances.
What happens to them ? Do they reboot with the new package ? Does it spawn new instances and kill the current running ? Does it kill the running applications server in each instance and run the new one inside the new package ? What happens to the (non-persistant) local storage (if used as cheap cache) ? What happens to in-use sessions (if they are not stored in blob but only in-memory) ?
Is there any benchmark/comparative-table of different java servers inside Azure ? (memory footprint, concurrent connections, etc..
My questions might seem weird but I'm currently working with Google App Engine (and willing to move to Azure) and the only action I have to do to deploy/update an app is to click the Deploy button in eclipse. So currently, things are still quite confusing. But actually, the fact you have to upload your own jre and your own applications server adds a lot of freedom. It brings a piece of IaaS inside the PaaS.