 |
|
A quick example of how to submit jobs to Windows cluster through Windows Communication Foundation from a client application
Intro: Please read "Access windows cluster rcwinclu" and How to submit a job in Windows cluster before proceeding.
1> Please download the C# version of HPC Excel source code and recompile it with MS Visual Studio 2008.
Note: This simple application is built based on WCF in MS Visual Studio 2008. It shows how the client can engage the Windows cluster. When a user starts the client application Excel 2007, and clicks different buttons, the client will ask for computing services provided in the windows cluster. The computing cluster will then allocate one or multiple nodes for the computing services, and present the results back to the Excel 2007 when the computing finishes. You can deploy similar types of WCF applications in PHS environment and dispatch computing tasks into the Windows cluster.
a) For this example, you need to start the Excel within Visual Studio 2008. When compiling it, you need to make necessary references such as to MS VSTO, MS HPC SDK Scheduler API …etc
b) The example code contains two useful applications, one is the Excel as the client application(hpcexcel), the other one is the computing service application(hpcexcelservice). There is also a third "testclient" application that gets created and it allows command line interaction with the same computing services on the server for testing purposes.
c) The computing service (hpcexcelservice) contains two simple computing services. One is to generate a random number according to normal distribution, the other one is to sum the values stored in certain cells of the excel.
d) The Excel supports jagged array data type to send data to the cluster.
e) Here is how to depoly the computing service into the Windows cluster. After compiling the entire solution, it will generate the service dll file (hpcexcelservice.dll in our example). But there are two files need to be copied to the cluster, one is the service config file, the other one is the service dll file. The service config file contains the path information to the service dll file. The path should point to a place that you have the permission to access. The config file needs a system administrator to install. The service dll file can be updated/uploaded by users to the cluster. So, it is only during the first time of deployment that you will need a system administrator to install the config file. After that, you can rewrite the service function, generate a new version of service dll and simply copy/paste to replace the existing dll file on the cluster.
2> When you launch the program from Microsoft Visual Studio 2008, click the button for either of the service, you will notice the job status change notification from your "HPC Job Manager"
3> A few seconds later, you will see the results shown in the Excel
For more information about how to develop SOA applications with the windows cluster, please go to \\rcwinclu\public\windowsHPC_doc or contact yxu11@partners.org
|