HelloWorld Example

A Processing Unit is a scalable unit of deployment. In this example, we show how to create and run inside your development environment and how to use the XAP basic API, by implementing a simple processor and feeder application.

COMPONENTS

There are three components in our scenario:

WORKFLOW

BUILD AND DEPLOYMENT

The example uses maven as its build tool. It comes with a build script that runs maven automatically. Running the build script with no parameters within the current directory will list all the relevant tasks that can be run with this example.

The available commands are:

Running build.(sh/bat) compile will compile all the different modules. In case of the Processor and Feeder modules, it will compile the classes directly into their respective PU structure.

Running build.(sh/bat) package will finalize the processing unit structure of both the Processor and the Feeder. The Common module jar file will be copied into the 'lib' directory within the processing unit structure. In case of the processor module, it will copy the jar file to /examples/first-app/hello-world/processor/target/hello-processor/lib/, and will make /examples/first-app/hello-world/processor/target/hello-processor a ready to use processing unit.

Running build.(sh/bat) intellij will create run configuration for IntelliJ IDE, allowing you to run the Processor and the Feeder using IntelliJ run (or debug) targets.

In order to deploy the hello world example onto the Service Grid:

Run the GS-UI in order to see the PU instance deployed and track the number of messages in the data-grid.

Online Documentation

For more information, lookup 'First XAP Application' under http://docs.gigaspaces.com