You are now ready to deploy your application, but first, a short recap: Our Order Management System application has 3 Processing Units: Client, Validator and Processor, and an Enterprise Data Grid that contains a single space instance. The domain model includes the Order object. There are several ways to deploy the application and to run a Processing Unit. A Processing Unit can either run in standalone mode in your IDE (for development and testing purposes), or on top of the Service Grid, in SLA-driven containers that are called GSCs (Grid Service Containers). In this section, we'll show the latter approach, which is used in production environments. Because we want to deploy to the Service Grid, we first need to start it. Running the Service Grid is as easy as running one GSM (Grid Service Manager) from <GigaSpaces Root\bin, and several GSCs, on top of which we run our Processing Units. The deployed application looks like this: Though the image above shows the Client Processing Unit and the space in one container and the Validator and Processor Processing Units in a second container; they might be arranged differently, according to the deployment order. For example, the Validator and Client might be in one SLA container, while the other encapsulates the Processor and the space. We can run more SLA containers (GSCs) and have each component inside its own SLA container. Starting Service Grid Components
- To start the GSM, execute:
<GigaSpaces Root>\bin\gsm.(sh/bat)
- Run 4 GSCs by executing the following 4 times:
<GigaSpaces Root>\bin\gsc.(sh/bat)
- Start the GigaSpaces Management Center:
<GigaSpaces Root>\bin\gs-ui.(sh/bat)
- Click the left Deployments tab.
- The two running GSCs are displayed in the Details area. Both of them are still empty, because no Processing Units or space instances have been deployed.
EDG Space Instance Deployment
- After selecting the Deployments tab, click the Deploy Application button (
) to open the Deployment Wizard.
- In the Deployment Wizard, select the Enterprise Data Grid option and click Next:
- Fill the Data Grid Name attribute with spacePP and choose blank for the Cluster schema attribute as shown below:
- Click Deploy to deploy the EDG, the following screen should appear:
- After the deployment is successful, click Close.
- Now, have another look at the lower side of the Deployments tab. You should see that one of the GSCs contains the EDG space instances you just deployed.
Deploying the Processing Units
- To deploy the Processing Unit, click the deploy button (
) – the Deployment Wizard opens:
- In the first page of the wizard (screen above), click the SBA Application - Processing Unit radio button, and click Next to see the deployment dialog:
- In the Processing Unit name field, select the name of the Processing Unit. This name is the same as the name of the Processing Unit directory, located under the <GigaSpaces Root>\deploy directory.
For example, if you copied the Client Processing Unit folder under the deploy directory with the name pp-oms-client, select pp-oms-client in the Processing Unit Name field. (When using the scripts supplied in the example, the Processing units' folders are named pp-oms-client, pp-oms-validator and pp-oms-processor).
- Click Deploy. the following screen should appear showing the deployment status:
- Wait until the Processing Unit successfully finishes deploying, then click Close.
- Now, have another look at the lower side of the Deployments tab. You should see that one of the GSCs contains the Processing Unit you just deployed.
- Repeat the deployment process twice more for the other Processing Units (remember, you are deploying the Client, Validator and Processor Processing Units).
At the bottom of the Deployments tab, you should now see:
Expected Output
- In the GSC command windows, you can see something like the following as your output lines.
- For the Client:
- For the Validator:
- For the Prcessor:
|