Facebook Twitter Gplus LinkedIn YouTube E-mail RSS
Home GigaSpaces Distributed Java Application Deployment – 1 … 2 … 3

Distributed Java Application Deployment – 1 … 2 … 3

Cloud platforms (such as Google App Engine and Windows Azure) offer a simple deployment experience. Just upload your code, and the cloud takes care of the rest. GigaSpaces XAP v8 brings this user experience without the cloud vendor lock-in. Your application can now be deployed on your laptop,  in the data center or on any cloud infrastructure.

Step 1: Start Agent on each machine.

Running Agents

The first step is running an Agent on each machine. Simply run the "gs-agent" script, or write a plugin that does it for you. The GigaSpaces test lab uses two different plugins. The default plugin automatically discovers agents that have been started in advance; the XenServer plugin simulates a cloud environment by starting a new Virtual Machine on-demand. Plugins for public clouds will follow.

Step 2: Deploy and specify maximum Memory and CPU

Deployed Processing Unit

The second step is specifying the required memory and CPU at any time after deployment. GigaSpaces applications can achieve low latency data access by loading the data and the code into the same process. That requires memory capacity planning (for your data), and CPU capacity planning (for your code).  The admin API uses this declarative semantic to describe the application deployment across different machines:

ProcessingUnit pu = 
  manager.deploy(
new ElasticStatefulProcessingUnitDeployment("businesslogic.jar")
                .maxNumberOfCpuCores(
32)
                .maxMemoryCapacity(
64, MemoryUnit.GIGABYTES)
                .memoryCapacityPerContainer(
4,MemoryUnit.GIGABYTES));
 
 

Step 3: Trigger Scale-Out or Scale-In

Scale-out processing unit

The manager continuously enforces the specified capacity. It automatically discovers new machines, detects their memory and CPU capabilities, and scales the application on demand to meet the specified capacity. The manager automatically performs corrective actions if a process or a machine fails and maintains a balanced application deployment across machines. Which leaves one thing – the trigger. Triggering the scale-in or scale-out is manually performed by the administrator by issuing the pu.scale() API call. 

pu.scale(new ManualCapacityScaleConfigurer()
            .numberOfCpuCores(
4)
            .memoryCapacity(
16,MemoryUnit.GIGABYTES)
            .create()
);


 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
© GigaSpaces on Application Scalability | Open Source PaaS and More