Overview of SOA Programming Model and Runtime System for Windows HPC Server 2008

Microsoft Corporation

Published: May2008

Abstract

With the increasing number and size of the problems being tackled on ever-larger clusters, developers, users, and administrators face increasing challenges in meeting time-to-result goals. Applications must be developedquickly, run efficiently on the cluster, and be effectively managed so that application performance, reliability, and resource utilization are optimized. Taking an approach to building applications using Service-Oriented Architecture (SOA) with Windows® HPC Server 2008 can help meet these challenges.

Windows HPC Server 2008 provides a platform for SOA-based applications. The SOA programming model allowssolution developers and architects torapidly develop new highperformance computing (HPC) cluster-enabled interactive applications and easily modify existing distributed computing applications. With Windows HPC Server 2008, the developer build/debug/deploy experience is streamlined, the speed of processing is accelerated, and the management of the applications and systems is simplified.

This white paper provides a technical overview of SOA applications and the Windows HPC Server 2008 functions that support the SOA model; including building and deploying SOA applications; their architecture, runtime system, scaling, and performance considerations; and monitoring and troubleshooting.

Windows HPC Server 2008 White Paper

This document was developed prior to the product’s release to manufacturing, and as such, we cannot guarantee that all details included herein will be exactly as what is found in the shipping product.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

© 2008 Microsoft Corporation. All rights reserved.

Microsoft, Active Directory,Excel, SharePoint, SQL Server, Visual Basic,Visual Studio, Windows,the Windows logo,Windows PowerShell, and Windows Server are trademarks of the Microsoft group of companies.

All other trademarks are property of their respective owners.

Windows HPC Server 2008 White Paper

Contents

Windows HPC Server 2008 Overview

Job Operation in Windows HPC Server 2008

Service-Oriented Architecture Application Overview

What Is SOA?

Batch Applications and Interactive Applications

Target Applications for SOA

Building an Application: The SOA Programming Model

Benefits of Windows HPC Server 2008 for SOA Applications

Getting Started: Building an Application with the SOA Programming Model

Creating the Service

Deploying the Service to a Compute Cluster

Creating a Client Program

Session API

Service Deployment

Copying and Placing the Service DLLs

Registering the Service

Maintaining Multiple Versions of a Service

Running the SOA Application: Architectural Considerations

Running the SOA Application

Recovering from a Node Failure

Compute Node Failure

WCF Broker Node Failure

Security

Sharable Sessions

Service Instance Resourcing Model

How Broker Dispatches Requests to Service Instances

Broker Configuration Parameters

Session Life Cycle Model

Broker Node Level Settings

Session Level Settings

Monitoring and Managing the SOA Infrastructure

Monitoring the Cluster

Advanced Monitoring with System Center Operations Manager

Enabling a Broker Node

Monitoring a Session

Monitoring the WCF Broker Node

Monitoring a Service Job

Reporting

Troubleshooting and Diagnosing SOA Application Runtime Errors

Service Repository Test

Service Model Test

Advanced Programming Topics

Throttling Requests

Handling Large Messages

Reducing the Message Passing Overhead

Summary

Glossary

Windows HPC Server 2008 Overview

High performance computing (HPC) applications use a cluster of computers working together to solve a single computational problem or single set of closely related computational problems. Windows HPC Server 2008enables such cluster-based supercomputing based onx64 versions of the Windows Server®2008 operating system. Windows® HPC Server 2008 can efficiently scale to thousands of processing cores and provides a comprehensive set of deployment, administration, and monitoring tools that are easy to deploy, manage, and integrate with an existing infrastructure. A wide range of software vendors in various vertical markets have been designing their applications to work seamlessly with Windows HPC Server 2008, so that users can submit and monitor jobs from within familiar applications without having to learn new or complex user interfaces.

Windows HPC Server 2008 includes an advanced Job Scheduler, a new and faster Microsoft Message Passing Interface (MS-MPI), rapid deployment options using Windows Deployment Services (WDS), and a new management interface built on the Microsoft® System Center user interface (UI) that supports Windows PowerShell™ as a preferred scripting language. Windows HPC Server 2008 takes advantage of Windows Server 2008 failover services,in addition to the failover clustering capabilities of Microsoft® SQL Server®, for cluster failover and redundancy.

Windows HPC Server 2008 integrates with other Microsoft products to help increase HPC productivity and improve the overall user experience. This includes collaboration through Microsoft® Office SharePoint® Server 2007 and the Windows®Workflow Foundation (WF),in addition to improved management and efficiency through integration with System Centersolutions.

Windows HPC Server 2008 delivers an integrated platform that makes it possible to create a new breed of applications that can be run in interactive settings, in addition to the traditional batch applications in the engineering, oil and gas, and life science market segments. These new interactive applications include trade and risk management applications in financial services, Microsoft® Office Excel®, and insurance risk modeling applications. Windows HPC Server 2008 can be used for massively parallel programs (computational fluid dynamics, reservoir simulation) in addition to embarrassingly parallel programs (Basic Local Alignment Search Tool [BLAST], Monte Carlo simulations). Through integration with the Windows® Communication Foundation (WCF), Windows HPC Server 2008 empowers software developers working with Service-Oriented Architecture (SOA) applications to harness the power of parallel computing offered by HPC solutions.

Note:

For general information about Windows HPC Server features and capabilities, see the white paper “Windows HPC Server 2008 Technical Overview.”

For overall management and deployment information, see the white paper “Windows HPC Server 2008System Management Overview.”

For information about the Windows HPC Server 2008 Job Scheduler, see the white paper “Windows HPC Server 2008 Job Scheduler.”

These papers can be found at

Job Operation in Windows HPC Server 2008

Jobs, defined as discrete activities scheduled to perform on the compute cluster, are the key to operating in a Windows HPC Server environment. Compute cluster jobs are comprised of tasks; the job can be a single task, or it can include many individual tasks. Tasks can be serial, running one after another, or parallel, running across multiple processors. Tasks can also run interactively as SOA applications. The structure of the tasks in a job is determined by the dependencies among tasks and the type of application being run. In addition, jobs and tasks can be targeted to specific nodes within the cluster. Nodes can be reserved exclusively for particular jobs, or they can be shared between different jobs and tasks.


To understand job operation, it is helpful to understand the components of an HPC cluster. Figure 1 shows cluster components and how they relate to each other.

Figure 1Elements of a compute cluster

A cluster consists of a single head node (or a primary and secondary head node, if the deployed cluster is made highly available) and compute nodes. For interactive SOA applications, the cluster also includes one or moreWCF broker nodes.

  • The head node, which can also operate as a compute node, is the central management node for the cluster. The head node deploys the compute nodes, runs the Job Scheduler, monitors job and node status, runs diagnostics on nodes, and provides reports on node and job activities.
  • Compute nodes execute job tasks.
  • WCF broker nodes act asintermediaries between the application and the services. The broker load-balances the service requests to the services, and finally return results to the application

When a user submits a job to the cluster, the Job Schedulervalidates the job properties and stores the job in a SQL Server database. The job is entered into the job queue based on the specified policy. When the necessary resources are available, the job is sent to the compute nodes assigned for the job and run under the user’s security context. As a result, the complexity of using and synchronizing different credentials is eliminated, and the user does not have to employ different methods of sharing data or compensate for permission differences among different operating systems.

An SOA application differs from traditional HPC batch-oriented applications in several ways. The admission, allocation, and activation boundaries are blurred. The initial admission involves a session in addition to the actual job, and the job admission request comes from the library implementing the session, not directly from the application code. Allocation is still fairly typical, with the Job Scheduler still managing resource allocation. Once a session is created, requests are sent to the broker node and results returned back to the client through the broker node.

Service-Oriented Architecture Application Overview

What Is SOA?

A Service-Oriented Architectureis an approach to building distributed, loosely coupled applications. SOA separates functions into distinct services that can be distributed over a network, and combined and reused. These functions are loosely coupled with the operating systems and programming languages underlying the applications.SOA defines and provisions the IT infrastructure to support and participate in the exchange of data between different applications. SOA services communicate with each other by passing data or by coordinating an activity between several services.

The SOA architecture is not tied to a specific technology. It may be implemented using a wide range of technologies (including SOAP, Web services,WCF)and a variety of languages across different operating systems. The defining characteristic of SOA is independent services with defined interfaces that can be called to perform their tasks in a standard way—the service does not need to know the calling application, and the application does not need to know how the service actually performs its tasks

Batch Applications and Interactive Applications

While the first version of Windows HPC Server 2008 supports traditional HPC applications in the engineering, oil and gas, andlife science market segments (applications that generally run in batch fashion), Windows HPC Server 2008now delivers a platform that supports a new breed of applications that run in interactive settings, including trade and risk management applications in financial services and WCF or Web services–based applications (see Figure 2).

Figure 2Windows HPC Server 2008 now focuses on interactive applications

Target Applications for SOA

HPC applications submitted to compute clusters are typically classified as either message intensive or embarrassingly parallel. While message-intensive applications comprise sequential tasks, embarrassingly parallel problemscan be easilydivided into very large numbers of parallel tasks, with no dependency or communication between them.

To solve embarrassingly parallel problemswithout having to write the low-level code, developers need to encapsulate the core calculations as a software module. The SOA programming model makes this encapsulation possible and effectively hides the details for data serialization and distributed computing.

Windows HPC Server 2008 includes support for embarrassingly parallel applications that use the SOA programming model; these applications use compute clusters interactively to provide near real-time calculation of complex algorithms. Table 1 shows some example applications and the related tasks.

Table 1Examples of SOA Applications

Example Application / Example Task / Units of Work
Monte Carlo problems that simulate the behavior of various mathematical or physical systems. Monte Carlo methods are used in physics, physical chemistry, economics, and related fields. / Predicting the price of a financial instrument. / The pricing of each security.
BLAST searches. / Gene matching. / Individual matching of genes.
Genetic algorithms. / Evolutionary computational meta-heuristics. / Computational steps.
Ray Tracing. / Computational physics and rendering. / Each pixel to be rendered.
Microsoft Office Excel add-in calculations. / Calling add-in functions. / Each add-in function call.

The Monte Carlo problem, a frequently used example of an SOA application, simulates the behavior of various mathematical or physical systems; it is used in physics, physical chemistry, economics, and related fields. The Monte Carlo problem is a computationalalgorithmthat relies on repeated random sampling. Because of the reliance on repeated computation and random or pseudo-random numbers, Monte Carlo methods are well-suited for HPC. Monte Carlo methods tend to be used when it is infeasible or impossible to compute an exact result with a deterministic algorithm.

The Monte Carlo method is widely used by financial analysts who want to construct stochastic or probabilistic financial models (as opposed to the traditional static and deterministic models). Manyfinancial corporations use the Monte Carlo methods for making investment decisions or for valuing mergers and acquisitions; for example, financial corporations may need to formulate trading strategy against historical market data, complete risk analysis via Monte Carlo simulation in near real time, and price new derivative instruments.

Another SOA example is Basic Local Alignment Search Tool (BLAST), a computer program that identifies homologousgenes (genes in different species that share similar structures and functions) in different organisms. For example, there may be a gene in mice related to liking (or not liking) the consumption of alcohol; using BLAST, it is possible to search the human genome in search of a homologous gene. Because of the many iterations required, BLAST is well-suited for SOA and HPC.

Table 2 describes the features and tools that Windows HPC Server 2008 provides for meeting the needs of SOA applications.

Table 2Benefits of Windows HPC Server 2008 for SOA Applications

Tasks / User Needs / Windows HPC Server 2008 Features
Build / The ability to solve embarrassingly parallel problems without having to write the low-level code.
An integrated development environment (IDE) tool that lets developers develop, deploy, and debug applications on a cluster. / A service-oriented programming model based on WCF that effectively hides the details for data serialization and distributed computing.
Microsoft® Visual Studio® 2008 with tools to debug services and clients.
Run / Ability to distribute short calculation requests efficiently.
Ability to run user applications securely.
A system that decides where to run the tasks of the application and dynamically adjusts cluster resource allocation to the processing priorities of the workload. / Low latency round-trip.
End-to-end Kerberos with WCF transport-level security.
Dynamic allocation of resources to the service instances.
Manage / The ability to monitor application performance from a single point of control.
The ability to monitor and report service usage. / Runtime monitoring of performance counters, including the number and status of outstanding service calls and resource usage.
Service resource usage reports.

Building an Application: The SOA Programming Model

SOA applications need to be developedquickly, run efficiently on the cluster, and be effectively managed so that application performance, reliability, and resource use are guaranteed. Developers need to be able to encapsulate the core calculations as software modules that can be deployed and run on the cluster; these software modulesidentify and marshal the data required for each calculation andoptimize performance by minimizing the data movement and communication overhead.

The SOA programming model provides the specifications and open technologies that enable developers to write service programs and client programs using the widely adopted WCF platform. The Microsoft® Visual Studio® development system provides easy-to-use WCF service templates and service referencing utilities that let developers quickly prototype, debug, and unit-test applications.

Benefits of Windows HPC Server 2008 for SOA Applications

Windows HPC Server 2008 providesa scalable, reliable, and secure interactive application platform that empowers developers to rapidly develop and easily modifycluster-enabled interactive applications.

Getting Started: Building an Application with the SOA Programming Model

Buildingan SOA application using the SOA programming model consists of three steps:

  1. Creating the service.
  2. Deploying the service to a cluster.
  3. Creating a client application.

Creating the Service

A service in the SOA programming model is defined as a program exposing a collection of endpoints; all communication with a service happens via the service's endpoints. Each endpoint specifies a contract that identifies which methods are accessible via this endpoint, a binding that determines how a client application can communicate with this endpoint, and an address that indicates where this endpoint can be found.