Deploying the RAP Sample Project for Adaptive Server Enterprise

Configure and deploy the RAP sample project using Adaptive Server Enterprise as the in-memory database.

  1. Open a new command prompt. Do not reuse a command prompt from the installation of another RAP component.
  2. Copy the RAP enablement package to the Event Stream Processor machine, and extract it into a directory of your choice. If any of the RAP components from this current RAP version are installed on this machine, you can use the existing RAP enablement installation. This is referred to as the RAP enablement installation directory throughout the rest of this guide.
  3. If you did not run it previously, run the configure.sh shell script from the RAP enablement installation directory.
    This file prepares the ESP project files for use.
  4. Source the SYBASE.sh or SYBASE.csh script file located in the RAP enablement installation directory.
  5. Source the SYBASE.sh or SYBASE.csh script in the Event Stream Processor installation directory.
  6. If you installed the Japanese supporting data in your historical and in-memory databases, use Japanese sample data with this project.
    1. Change the directory to $RAP_HOME/sample/inputdata.
    2. To maintain a copy of the English sample data, rename STOCK_QUOTE.csv to STOCK_QUOTE.csv.en, and STOCK_TADE.csv to STOCK_TRADE.csv.en.
    3. Copy STOCK_QUOTE.csv.jp to STOCK_QUOTE.csv, and STOCK_TRADE.csv.jp to STOCK_TRADE.csv.
  7. Compile the CCL file for the Adaptive Server sample project by running: $ESP_HOME/bin/esp_compiler -i $RAP_HOME/sample/projects/ase/rap.ccl -o $RAP_HOME/sample/projects/ase/rap.ccx
  8. Create primary and overflow directories for the Sybase IQ database adapter to use when loading data into your historical database.
    These directories are initially empty and will be used to temporarily store data during adapter operation. Place the primary and overflow directories on separate file systems and secure them as they may contain sensitive data during the loading process.
  9. Edit the project configuration file ($RAP_HOME/sample/projects/ase/rap.ccr) to fill in run time values for the project. Replace <ADD PATH>:
    1. Set the IQPrimaryFileLocation parameter to the absolute path of the Sybase IQ Output adapter primary directory, which you created during the previous step.
    2. Set the IQoverflowFileLocation parameter to the absolute path of the Sybase IQ Output adapter overflow directory, which you created during the previous step.
  10. Deploy the Adaptive Server sample project to your cluster:
    1. Run the ESP cluster you created during the Event Stream Processor installation. Replace <node name> with the node name you specified in the installer and run this command: $ESP_HOME/bin/esp_server --cluster-node $ESP_HOME/cluster/nodes/<node name>/<node name>.xml
    2. In another terminal where you have also sourced the SYBASE.sh script which is installed with Event Stream Processor, start the cluster administration tool. Replace <RPC port> with the RPC port for your ESP cluster, <user name> with your cluster user name (with native OS authentication this is your OS login name), and run: $ESP_HOME/bin/esp_cluster_admin --uri esp://localhost:<RPC port> --username <user name>
    3. Replace <RAP Enablement installation directory> with the installation directory for the RAP enablement package and run this command: add project default/RAP <RAP Enablement installation directory>/sample/projects/ase/rap.ccx <RAP Enablement installation directory>/sample/projects/ase/rap.ccr
    4. Run the project by running this command: start project default/RAP
    5. Type quit to exit the cluster administration tool.
  11. To work with the RAP ASE sample project in the Studio:
    1. Start the ESP Studio using this command: $ESP_HOME/studio/esp_studio
    2. From the File menu, select Open and then Project.
    3. Select Browse and select the directory <RAP Enablement Installation Directory>/sample/projects/ase/ from the file dialog.

      After import, any changes saved to the project are saved to a CCL file in the RAP enablement installation directory. If you make changes to your project, recompile it and redeploy.