Scenario
Symphony has a service deployment tool. You must first upload your application's service binary onto the repository service. Once you instantiate your app, each compute host will in turn automatically download the service package. This way, you do not have to manually place the service binary on each compute host.
However, in the application development phase, in which you are frequently updating and testing your application's service on the local machine, re-packaging and uploading the service binary every time can become tedious and error prone.
As an alternative, you can configure the Application Profile to reference the service binary directly in its build location, without having to maintain an up-to-date copy on the repository service.
Steps
1. Open the application profile (''SampleApp.cpp'' for example) in an editor.
2. In Service section, remove the definition for packageName
3. For Service startCmd, set the full path of the service binary, for example: startCmd="C:\symde\4.0\samples\CPP\SampleApp\Outpu t\SampleServiceCPP"
4. Save and register the application using soamreg command
Alternatively, using the PMC:Code:<Service description="The Sample Service" name="SampleService"> <osTypes> <osType name="all" startCmd="C:\symde\4.0\samples\CPP\SampleApp\Output\SampleServiceCPP" workDir="${SOAM_HOME}/work"> </osType> </osTypes> </Service>
1. Open the Application Profile in the PMC Editor (Click Configure Applications tab, then click on the application name, SampleAppCPP for example)
2. In Service Definition section:
2.1. Under Service Package, select "---"
2.2. Under Start Command, enter the full path of the service binary, for example: C:\SymphonyDE\DE40\4.0\samples\CPP\SampleApp\Outpu t\SampleServiceCPP
3. Click Save
Verify your Setting
1. Run your client (AsyncClient for example)
2. If tasks fail to run, check SIM log file (under logs/ directory of your SOAM_HOME) for possible ERROR messages. Most likely the service binary could not be found. In that case double check the Service Start Command path.
Reverting the Change
For a single host cluster, even after development is compelted, it's not necessary to revert back to using the service deployment tool. However, for a multi-host cluster, the deployment tool is valuable.
1. Open the application profile (SampleApp.cpp for example) in an editor.
2. In Service section, add the definition for packageName, for example: packageName="SampleServiceCPP"
3. For Service startCmd, enter ${SOAM_DEPLOY_DIR}/ followed by the service binary name, for example: startCmd="${SOAM_DEPLOY_DIR}/SampleServiceCPP"
4. If the package is not already on the respostiory, deploy it using soamdeploy add command
5. Save and register the application using soamreg command
ReferencesCode:<Service description="The Sample Service" name="SampleService" packageName="SampleServiceCPP"> <osTypes> <osType name="all" startCmd="${SOAM_DEPLOY_DIR}/SampleServiceCPP" workDir="${SOAM_HOME}/work"> </osType> </osTypes> </Service>
1. Developer's Guide > Service Package Deployment
2. Symphony Reference > Application Profile > Service section


LinkBack URL
About LinkBacks
Reply With Quote