The Beauty Of Auto Deployment On Grids
Join the DZone community and get the full member experience.Join For Free
deployment in grid environments is always a big issue. many grid companies provide super-tooling support to make sure that a simple jar file is distributed across all nodes. often users have to create maven or ant scripts that deploy their applications onto servers that run remotely. to me this whole thing just sounds like a big headache. developer still has to spend time to writing an application locally, then launch a build script that would deploy it remotely, and then spend enormous amount of time debugging their applications with remote debuggers to find out why the heck their app does not work the way it should when deployed within a grid infrastructure.
the latest shift in the industry is to remove the deployment step altogether. why spend time on explicit deployment when java provides all the necessary support to do it automatically?
for example, javarebel from zeroturnaround introduced deploy-less way to work with j2ee. they have a pretty cool implementation of java class loading (which supports class unloading and reloading by the way) which allows you to simply change your class in ide and immediately observe the new behavior on the application server without any deployment at all. although not supporting some edge cases, the product does indeed provide a great productivity boost for developers.
the same "change->compile->run" approach you can find in gridgain . i know that we got our grid deployment right when i hear it from our users. our users really appreciate not having to spend any time on deployment, especially in development. when working with gridgain, you simply write your code as you would locally. then you can start several stand-alone gridgain nodes (often on the same box), hit the run button in your ide and watch your code execute on the grid. there are no build scripts to run or grid nodes to restart. whenever you change your code, again, hit the run button and watch your new code execute while the old version is automatically undeployed.
imagine how useful this becomes in production. you can transparently deploy new code in production without bringing down your environment at all. lets say that you have 10 worker grid nodes constantly running in production and several master nodes constantly emitting grid jobs to the worker nodes. now, if you want to deploy a new version of your application onto the grid, you don't need to bring down your production environment at all. you can simply stop master nodes one by one and restart them with new code in the classpath. the restarted nodes will execute the new version of code while the old ones will still work with the old code version. the remote worker nodes will happily execute old and new versions of code side by side without any problems while providing all the required class-loading isolation. once the last master node is restarted, the old code will be automatically undeployed from all the worker nodes. all this is achieved with absolutely zero down time . we used this approach when deploying under load onto a large amazon ec2 cloud and it worked nicely.
when using our gar deployment , you would not even have to bring down the master nodes in the above example. simply deploy new gar files onto master nodes and the new code will automatically be deployed on the worker nodes. all the tasks currently running with old version of code will be allowed to complete and then the old version will be automatically undeployed.
zero deployment is just one of the many productivity enhancements you can find in gridgain. for example, when debugging you can start multiple grid nodes within the same vm and step through the code in debugger while your job executes on the grid. when writing unit tests, you can start several grid nodes right from within your test case, simulate any scenario, and validate results.
we provide all these productivity enhancements because we are developers ourselves and have the first hand experience with all the daily pain factors developers usually run into.
Opinions expressed by DZone contributors are their own.