Tuscany SCA Native Samples - Ruby BigBank Sample

This sample implements the "Simplified BigBank" scenario. A whitepaper describing the scenario based on the SCA 0.9 Assembly specification can be found here. This sample uses multiple Ruby components, calls out to an external Web Service via a reference and exposes the service as a Web Service.

The Ruby BigBank sample requires the following extensions:

Please follow the documentation to ensure you have these extensions built and installed on your system

There are three sub projects in this workspace:

  • bigbank.account
    This contains the source code and SCDL artifacts for the SCA Ruby BigBank composite implementing the account services.
  • bigbank.client
    A sample client which does a local call to the BigBank service.
  • bigbank.wsclient
    A sample client which uses an SCA Web Service reference to make a remote call to the BigBank service.

Additionally, there is the bigbank.app.composite file. This describes the configuration of the SCA BigBank composite deployed to the SCA runtime.

Building the Ruby BigBank sample on Linux and Mac OS X

If using the binary distribution the samples are built and installed in <tuscany_sca_install_dir>/samples - go directly to Running the samples on Linux and Mac OS X.

  1. The following environment variables are required:
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
  2. As the Ruby BigBank sample is based on Ruby scripts, a specific compilation step is not necessary - only deployment is required. Deploy the Ruby samples only with the following command sequence:
    • cd <tuscany_sca_install_dir>/samples
    • ./configure --enable-ruby --enable-cpp=no --prefix=$TUSCANY_SCACPP/samples
    • make install
    NOTE: If you don't provide the --prefix configure option, it will by default install into /usr/local/tuscany/sca/samples/RubyBigBank

Running the Ruby BigBank sample on Linux and Mac OS X

BigBank with basic client

  1. The Ruby BigBank sample requires the following extensions: Please follow the documentation to ensure you have these extensions built and installed on your system
  2. The following environment variables are required:
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
  3. Run the sample with the following commands:
    • cd <tuscany_sca_install_dir>/samples/RubyBigBank/deploy/bigbank.client
    • ./runclient.sh

BigBank with Web Service clients

  1. The Ruby BigBank sample requires the following extensions: Please follow the documentation to ensure you have these extensions built and installed on your system
  2. Ensure you have enabled Axis2/C to run Tuscany SCA services. Follow the instructions found here.
  3. Start the Axis2/C simple http server:
    1. The following environment variables are required:
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • AXIS2C_HOME=<path to Axis2/C version 0.96>
    2. cd <tuscany_sca_install_dir>/samples/RubyBigBank/deploy/bigbank.account
    3. ./runwsserver.sh
  4. Now run the Web Service client:
    1. The following environment variables are required:
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • AXIS2C_HOME=<path to Axis2/C version 0.96>
    2. Run the sample with the following commands:
      • cd <tuscany_sca_install_dir>/samples/RubyBigBank/deploy/bigbank.wsclient
      • ./runwsclient.sh
  5. The PHP web client detailed in the CppBigBank sample can also be used with the Ruby BigBank service that is served by the Axis2/C http server started above.

Building the Ruby BigBank sample on Windows

If using the binary distribution the samples are built and installed in <tuscany_sca_install_dir>\samples - go directly to Running the samples on Windows.

  1. The following environment variables are required:
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
  2. As this sample is based on Ruby scripts, a specific compilation step is not necessary - only deployment is required. Deploy the sample with the following commands:
    • cd <tuscany_sca_install_dir>\samples\RubyBigBank
    • deploy.bat

Running the Ruby BigBank sample on Windows

BigBank with basic client

  1. The Ruby BigBank sample requires the following extensions: Please follow the documentation to ensure you have these extensions built and installed on your system
  2. The following environment variables are required:
    • TUSCANY_SCACPP=<path to installed Tuscany SCA>
    • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
  3. Run the sample with the following commands:
    • cd <tuscany_sca_install_dir>\samples\RubyBigBank\deploy\bigbank.client
    • runclient.bat

BigBank with Web Service clients

  1. The Ruby BigBank sample requires the following extensions: Please follow the documentation to ensure you have these extensions built and installed on your system
  2. Ensure you have enabled Axis2/C to run Tuscany SCA services. Follow the instructions found here.
  3. Start the Axis2/C simple http server:
    1. The following environment variables are required:
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • AXIS2C_HOME=<path to Axis2/C version 0.96>
    2. cd <tuscany_sca_install_dir>\samples\RubyBigBank\deploy\bigbank.account
    3. runwsserver.bat
  4. Now run the Web Service client:
    1. The following environment variables are required:
      • TUSCANY_SCACPP=<path to installed Tuscany SCA>
      • TUSCANY_SDOCPP=<path to installed Tuscany SDO>
      • AXIS2C_HOME=<path to Axis2/C version 0.96>
    2. Run the sample with the following commands:
      • cd <tuscany_sca_install_dir>/samples/RubyBigBank/deploy/bigbank.wsclient
      • ./runwsclient.bat
  5. The PHP web client detailed in the CppBigBank sample can also be used with the Ruby BigBank service that is served by the Axis2/C http server started above.

Getting Help

The first place to look is at the Tuscany SCA FAQ at http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany+SCA+-+FAQ

Any problem with this release can be reported to the Tuscany mailing lists or create a JIRA issue at http://issues.apache.org/jira/browse/Tuscany.