Skip navigation
Toggle Sidebar

Project Documentation

Roadmap

This project is a demonstration of how to use a couple of GigaSpaces XAP features to meet a common requirement in enterprise systems. Extensive enhancements are unlikely.

Installation Instructions

To get the source code for this example, create a directory called org/openspaces, make it your working directory, and use Subversion:

or retrieve the tarball from the project Downloads page.

To build the example, cd to org/openspaces/scn and run 'ant build'. This will create a subdirectory named deploy with the standard OSGi deployment structure.

To deploy the example, run 'ant deploy'. This will create the directories shared-computation-feeder and shared-computation-worker in the $JSHOMEDIR/deploy directory.

Usage Instructions

To run the example:

  • Start one GSM
  • Start four GSCs
  • Start gs-ui
  • Deploy shared-computation-worker with two primaries and one backup
  • Deploy shared-computation-feeder

By default there are five worker threads running in each processing unit. The GSC output window will show some workers calculating results and others waiting for results (the allowed price values are quantized to ensure some collisions).

Example Output

The output should look something like this:

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Writing mutex...

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Processing request:  LEH,20

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Writing mutex...

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Waiting for result for request:  LEH,20

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Result found:  LEH,20,Done

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Calculating result for request:  BRQ,50

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Processing request:  BRQ,50

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Writing mutex...

Mar 24, 2008 6:03:22 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Waiting for result for request:  BRQ,50

Mar 24, 2008 6:03:25 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Calculated result for request:  AAQ,20

Mar 24, 2008 6:03:25 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Updating mutex...

Mar 24, 2008 6:03:25 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Processing request:  BRQ,40

Mar 24, 2008 6:03:25 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Writing mutex...

Mar 24, 2008 6:03:25 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Waiting for result for request:  BRQ,40

Mar 24, 2008 6:03:25 PM
INFO [org.openspaces.scn.worker.OptionStressWorker]: Result found:  BRQ,40,Done
Adaptavist Theme Builder Powered by Atlassian Confluence