A COBOL template is provided for creating a solution for a cloud application or service, with projects for the web and worker roles you choose.
The main project is the cloud service. It defines the roles in the service and contains associations to the roles' projects in the solution.
The properties for each role define its configuration settings, connection settings, end points, local storage resources and more. You edit these settings through the role's properties.
The service definition and service configuration files are xml files representing the roles' properties. The service definition file establishes the run-time parameters for the service and the service configuration file sets the parameters for a running instance of a service.
By default, the Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString for each role is set to use the storage emulator. This specifies the storage account that Microsoft Azure Diagnostics will use to transfer logging data. Before you deploy your service, you set the cloud configuration to point to a valid storage account in Microsoft Azure.
To use Microsoft Azure queue storage, you need to set the DataConnectionString to use the storage emulator.
The web role is the presentation layer for the application. The skeleton web role comprises:
This web role is for use with WCF services. The skeleton web role comprises:
The worker role is similar to a web role but isn't hosted by Internet Information Services (IIS). You usually use the worker role for background processing, such as communicating with the web role and your business logic.
The skeleton worker role includes WorkerRole.cbl - A skeleton COBOL program, which writes a line repeatedly, so that you can see it working. You add you business logic to the skeleton code in this role. It contains the following methods:
Similar to the web roles, the worker also includes references to Microsoft Azure classes, such as MicroFocus.COBOL.Runtime.Azure, Microsoft.WindowsAzure.ServiceRuntime and Microsoft.WindowsAzure.Diagnostics.