HPC Cluster-SOA Client Template

 

The Cluster-SOA Debugger includes a C# project template called HPC Cluster-SOA Client. The template includes references to the necessary HPC namespaces and the outline of the code that is used to create and start a session on a Windows HPC 2008 cluster.

The client application for a service that runs on a Windows HPC cluster creates a session through the HPC job scheduler. The scheduler allocates service instances on the compute nodes as workers for the session. The client application then invokes the methods that are exposed by the service instances.

The following table describes the template elements:

Template element

Purpose

Reference to the Microsoft.Hpc.Scheduler.Session namespace

Includes classes that allow the client application to create and define an HPC session with multiple instances of a given service, bind the session to the client, and process the results from the service instances.

See HPC Class Library.

Reference to the Microsoft.Hpc.Scheduler.Properties namespace

Defines the enumerations and property identifiers that are used to submit and monitor jobs in a Windows HPC cluster.

See HPC Class Library.

AssemblyInfo.cs

Includes attributes that define information about your assembly.

Set information about your assembly (such as title and description) in this file.

app.config

Defines binding configuration settings for the client.

Specify the service contract name in this file.

app.config.TemplateForService.xml

Defines binding configuration settings for the service.

Specify the service name and the service contract name in this file. Optionally, adjust the timeout settings.

Client.cs

Provides a placeholder for the WCF client proxy object. In the Program.cs file, this class is used to create an instance of the client object in the Main function and to convert the results in the CallBack function.

When you add a service reference to your project, the client proxy object is created automatically. You will need to replace the two occurrences of Client in the Program.cs code with your client proxy object.

Program.cs

Provides a template for the client code. The template includes placeholders for the name of the head node, the name of the service, and the WCF client object.

This file includes the code to perform the following tasks:

  • Specify a head node

  • Create a session object

  • Specify resource requirements (the minimum and maximum service hosts to use)

  • Start the session

  • Call the service

  • Retrieve the returned data from the service (call back)

  • Catch exceptions that are thrown by the service

See Also

Using the C# Cluster-SOA Debugger for Windows HPC 2008 (Visual Studio 2008)
Converting an Existing C# Project to an HPC Cluster-SOA Client Project
How to: Configure and Launch the Cluster-SOA Debugger