Develop grid applications

Source: Internet
Author: User
Tags apache tomcat

Introduction

Most developers may think of a network composed of high-voltage cables and power stations when thinking about grids. In fact, the grid originally meant a Interconnected System, which was used to deliver current or electromagnetic signals in a wide area. Therefore, all electrical and electronic devices can access some resources by inserting them into the network, which becomes a device with grid enabled.

In 1995, this concept was applied to the computing field. With the development of the computing environment, especially the Internet and broadband technology, there is a movement in the business world, it is to apply these new and collaborative technologies and ideas to solve problems in the fields of finance, defense research, pharmaceutical invention, decision making, and collaborative design. The grid computing plan used to focus on Computing and high-performance computers. Now it has used web services to access business services, such as business process outsourcing, a Higher Level E-commerce on-demand outsourcing model.

Many developers think that the grid can redefine the nature of computing, just as the Internet has transformed people's communication methods. Grid can also change the way people from different organizations and locations work together to solve a specific problem (such as design collaboration. This is a typical dynamic resource sharing and information exchange. The grid computing platform allows you to discover resources, manage data, schedule online resources, and provide security in a distributed environment.

Grid Technology Standardization is promoted by the Global Grid Forum (GGF) (see references. The integration of grid and Web Services is technically complex, but it is natural. GGF isCommunityThe Forum participants are individual researchers and practitioners engaged in distributed computing (or "Grid" technology. GGF isGrid Forum),Egrid European grid Forum)The product of integration with grid communities in Asia Pacific. Another goal of GGF's work is to develop an integrated grid architecture with a broad foundation, which can help guide the research, development, and deployment activities of emerging grid communities. The Open Grid Service Interface Working Group of GGF is defining "Open Grid Service Architecture (OGSA )".

What is the content of article 2nd in this series?

The second part of this series will focus on the grid solution creation process, including GRID architecture design, grid service development, and grid service deployment.

OGSA is a grid-based distributed interaction and computing architecture. It ensures interoperability between heterogeneous systems so that different types of systems can communicate and share information. It uses emerging web services to define the Web Service Definition Language (WSDL) interface. For more information, see references. All services follow the specified mesh service interfaces and actions. Three levels can be used to define the grid:

    1. Enterprise (Enterprise Grid ))
    2. Partner Grid ))
    3. Service Grid ))

However, the following components in the OGSA specification are still in the early stages of development: factory, registry, discovery, and lifecycle) query service data, notification, and reliable invocation ). On the other hand, OGSA is a system synthesis model that uses distributed resources on the network to execute specific tasks or solve challenging problems.

Back to Top

Use OGSA to distribute resources

OGSA describes and defines the Web service-based architecture, which consists of a group of interfaces and their associated behaviors, it is used to share distributed resources in a heterogeneous dynamic environment (see references ). OGSA depends on the definition of the service in the WSDL. The WSDL defines the parameters and types of service access. OGSA architecture 1 is shown in.

Figure 1. OGSA Architecture

The basic concept behind OGSA is that it is a service-oriented grid architecture-a special web service that provides a set of clearly defined interfaces that comply with specific conventions. These interfaces solve problems such as discovery, dynamic service creation, lifecycle management, notification, and manageability. Naming and upgrading. The standard interface of the Grid Service contains multiple bindings and implementations (such as Java and C ). This type of Grid Service can be deployed in different hosting environments-or even different operating systems. OGSA also provides a grid security mechanism to ensure that all communications between services are secure. All services (lasting or instantaneous) are built using Globus Toolkit. Therefore, the basic idea of OGSA is to add a toolkit to the grid structure and a web service ). OGSA solves two important problems: Standard Service Interface Definition and protocol identification.

Semantics of grid service interfaces

OGSA defines the semantics of a grid service instance: How it is created, how it is named, how its lifecycle is determined, and how it communicates with it. Current grid applicationsProgramIt usually depends on the local operating system as their hosting environment. Creating a new service instance involves creating a new process. In the OGSA context, the hosting environment (container) is mainly responsible for ensuring that the services it supports comply with the mesh service semantics. In this way, OGSA can facilitate the modification or addition of container/component interfaces.

OGSA allows applications and users to create instantaneous services, discover and determine the properties of available services. The OGSA factory, registry, gridservice, and handlemap interfaces support creating instantaneous service instances, discovering service instances associated with the actual organization, and determining the characteristics of these service instances.

Service capability

Service capability)(That is, services provided by a company or organization) is widely used in current web service solutions. For example, the shipping service may have the ability to deliver a parcel to a destination within two days and charge less than $10. Similarly, grid service capabilities may also be computing resources, storage resources, networks, programs, databases, and so on. The features of grid services are determined by the capabilities they provide. The Grid Service implements one or more interfaces. Each interface defines a group of operations to call by exchanging the defined message sequence (such as input parameters of method calls. The Grid Service Interface correspondsPorttypes.

Service version confirmation and upgrade

ThePorttypesSet and some additional information related to version determination in the Grid ServiceServicetypeIs specified. The latter is a WSDL scalability element defined by OGSA. Services in complex distributed systems can be upgraded independently. Therefore, we can manage and express the version determination and compatibility between services, so that the client can discover not only specific service versions, but also compatible services. In addition, you do not have to interrupt the client's operations on the service to upgrade the service (and the hosting environment that runs them. Currently, the Web Service specification does not provide such enhanced functions.

Soft State management

The Grid Service can maintain the internal lifecycle of the service.Status(To distinguish a service instance from a service instance that provides the same interface ).Grid Service instance)This term refers to a specific instantiation of a grid service. Services exchange messages for interaction. The existence of the internal status makes it important to ensure that the service has received a complete message at a time or has not received the message at all. On this basis, we can build a wide range of high-level semantics for each operation, such as transactions. The OGSA model defines the semantics that must be provided by a standard interface (factory) and any service creation service. In a system that combines transient and stateful service instances, some mechanisms must be provided to restore services and statuses related to failed operations.

Assume that the user application fails for some reason. The Grid Service computing is still in progress, but if no one else is interested in the computing results, it will not generateKeepaliveMessage. Because the application fails,KeepaliveWhen the message is stopped, the grid service instance eventually times out and ends by releasing the storage and computing resources they use.

Grid Service deployment and Service Registration

Figure 2 shows a grid service deployment and release example. Remote Procedure Call (RPC) the actual implementation of Servlet and grid services can be deployed on application servers (such as WebSphere or Apache Tomcat. All call messages will be captured by soaprpc servlet, which routes these messages to the corresponding Grid Service.

Figure 2. Grid Service deployment and release example

In addition, you can publish the Grid ServiceUnified description, discovery, and integration (Universal Description, discovery, and integration)(UDDI) Registration Center (see references) orWeb service inspection Language)(Wsil) documentation (see references ). The Design of UDDI allows us to publish and search business partners' businesses and their grid services. The UDDI registration center is a center that stores such information and grid service locations. There are two types of UDDI registration centers: public and private. You can publish your grid service to a public UDDI registration center hosted by IBM, Microsoft, HP, or sap as an application developer or service provider. If you want to publish your own private grid service or secret Grid Service, you should use the private UDDI registration center. However, it is easiest to publish your grid services to wsil documents for testing purposes or small-scale integration, because wsil can discover, deploy, and call grid services without the need of the UDDI registration center. This is because wsil provides a way to aggregate references to existing service description documents (these documents have been edited in many formats ). These check documents are then provided at the service delivery point, or available through reference that can be placed in content media (such as HTML. For example, the URL format for wsil locating may be as follows:

Http://www.myorg-wsd.com/inspection.wsil

Furthermore, the UDDI registration center and wsil will beWsiluddiData tags are closely associated. In wsil, reference pointers are used to connect to businesses or services published in the UDDI registration center.

Create and call a grid service instance

The user application calls the "Create Grid Service" request at the factory to create a new service instance and allocate temporary storage for this computing. Each request involves mutual authentication between the user and the relevant factory, followed by authorization requests. Each request is successful, and a grid service instance with an initial life cycle is created. A delegated proxy credential is also provided for the newly created grid service instance. This credential allows this instance to perform more remote operations on behalf of users. Because the Grid Service is dynamic and stateful, each grid service instance is assigned a globally unique name, that isGrid Service handle)It separates a specific grid service instance from all other grid service instances.

For example, "Advanced UDDI Search Service" uses its proxy credential to request data from the UDDI registration center and stores intermediate results in local storage. The advanced UDDI Search Service also uses a notification mechanism to regularly update user applications. At the same time, the user application generates a regular response to the grid service instance it creates.KeepaliveRequest.

Back to Top

OGSA development tool: Globus Toolkit

The OGSA development framework (ogsadf, see references) can be viewed as a transmission and organization engine and ApplicationsCodeThe adhesive between managed environments. The implementation of ogsadf is Globus Toolkit, which comes from openSource codeCommunity.

By providing standard and customizable Implementation of interfaces defined in Grid Service Specifications, most grid behaviors are transparent to the hosted environment and application code. Another goal of reference implementation is to demonstrate the key OGSA concepts to help standardize implementers, managed environment providers, and service providers. The main purpose of this implementation is to provide a framework that makes it easy to integrate, develop, and use services in a grid environment.

Globus Toolkit is built on Web Service technologies such as SOAP, WSDL, and WSI to support distributed State management, lightweight inspection and discovery, and asynchronous notification. All external components are made public through the description of the WSDL interface, which is derived directly from the Global Service Specification.

Globus Toolkit provides software libraries that support grids and grid applications. This toolbox solves security, information discovery, resource management, data management, communication, fault detection and portability issues. As an example, the current security support is highly dependent on the development and hosting environment selected to implement OGSA.

Globus Toolkit provides a GUI framework to demonstrate the dynamic nature of ogsadf. Figure 3 shows how to use discovery and inspection to search, query, and use services when they become available. It knows how to obtain a grid service reference (GSR) from GSS, and how to map the WSDL port types found in GSR to a GUI panel. The service provider can easily add support for the new port type through configuration. All GUI panel implementations are given a sh and a default GSR endpoint so that service calls support a specific port type.

Figure 3. OGSA Grid Service Browser

As shown in the OGSA service browser, the container registry service contains multiple sample services included in the Alpha release of globus toolkit. You can view the Registration Center as a table (a service list) or wsil document (an XML document.

You can also use the lightweight discovery and inspection capabilities provided by Globus to query services by name. The GUI framework makes all services automatically the target for querying and checking requests. All services written for ogsadf will expose a WSDL file for the check and a set of service data elements, depending on what services are provided. This means that all ogsadf services will use the OGSA service browser. You can view the detailed information of the service interface described in WSDL. Listing 1 demonstrates the WSDL of the weather grid service example contained in the Alpha release of globus toolkit2.0.

OneInstanceofThe element appears as part of the mesh service definition in Listing 1. This element uses the scalability mechanism under the WSDL service element. The handle attribute is the Grid Service handle of the service ). Port binding in Listing 1 is used to describe the specific network protocol and Message format used to express and communicate with operations.

The client can use many different models to call services that enable ogsadf. Any tool that supports WSDL may have its own programming model. A possible model supported by the current implementation is:

    1. Generate a proxy according to the definition of WSDL
    2. Obtain
    3. Call http get to obtain the GSR and parse the endpoint URL with the WSDL option of GSS.
    4. Pass the endpoint URL found in step 3 to the proxy generated in step 1, and then start to call the service

If the binding is a SOAP protocol, you may also use existing tools, suchWsdl2java(See references) generate a soap call proxy to call the Grid Service. Another method is to useWeb service calling framework)(Wsif, see references) to dynamically detect binding protocols and build appropriate call code. The input of the proxy-free call code using wsif can include the WSDL position, method name, and input parameters of this method. The binding protocol can include soap, CORBA, and DCOM.

Figure 4 shows two possible call methods and a detailed call process.

Figure 4. Grid Service call sample

Figure 5 shows how users can use the OGSA service browser to createMyweatherinstance. You can set the initial life cycle before the service instance is created.

Figure 5. Create a grid service instance

UseWeatherfactoryserviceAfter creating a grid service instance, you will see the running instance page. Then, you can enter your zip code using the OGSA service browser as the mesh service client. Then, the temperature value of your region will be obtained from xmethods (which is a gateway that can connect to weather information service provider. The result is shown in Figure 6, which is 74.0.

Figure 6. Results of calling weather grid service

Back to Top

Use web services to enhance OGSA

Currently, OGSA's work begins with outsourcing of IT infrastructure. In our opinion, the next phase of OGSA should include more advanced Outsourcing: business process outsourcing. According to the OGSA specification, different methods may be used to implement and synthesize grid services. For example, a travel planning service that supports simultaneous binding of multiple services and using multiple computing resources can be instantiated as a service instance linked together with the application as a database, or combine them into more advanced services. We will call itComposite Grid Service).

In fact, most of the existing web services can be designed as grid computing spaces based on the architecture and specific technical components. For example, a Web service-based B2B integration center can be regarded as a grid computing system with a typical hub style required by e-commerce. In other words, each service can be deployed as a grid service, so that other applications using soap can use and access it. In general, companies that provide grid-based Web Services in a grid system (you can sell them to partners or subscribers through Web Services) creating valuable data will open up new revenue channels. Other technical components that can enhance the current grid computing infrastructure include:

  • Advanced web service discovery engine ):It can be used to enhance OGSA to discover grid services.Business Explorer for Web Services(Be4ws) is an example of the advanced Web service discovery engine, which can be obtained from IBM alphaWorks. It provides an efficient method and unified interface to use the UDDI search Markup Language (USML) search for scripts instead of discovering Web services through lower-level Java APIs (see references ).
  • Web Services relationships language (wsrl ):It can be used to enhance the OGSA to define the complex relationships between grid services. The basic web service information is described in WSDL. However, an important part of data related to Web Services is the relationship between business entities, Enterprise Services, and operations. These relationships are the key to merging and executing dynamic business processes. However, the current Web Service Specification and UDDI specification lack the definition and description of these relationships. Wsrl (see references) captures web service relationships at different granularities (We will regard these relationships as important guides for choosing and synthesizing the correct service set that meets customer needs), including:
    • Business-business relationship (BBR)
    • Business-service relationship (BSR)
    • Service-service relationship (SSR)
    • Business-operation relationship, Bor)
    • Service-operation relationship (SOR)
    • Operation-operation relationship, oor)

  • Web Services Composition ):It can be used to enhance OGSA to synthesize new business processes using existing grid services based on some optimal service selection mechanisms and merging modes.
  • Adaptive Web service calling mechanism ):It can be used to enhance OGSA to execute reliable and dynamic grid service calls. For dynamic web service calls, this mechanism should be able to automatically execute method descriptions (including input and output ). Meta-WSDL is a common XML Representation used to transmit the semantic information of WSDL (such as the description and quantification of input and output parameters ). This unit information is particularly important when inter-unit conversion is required. For example, the input is in an ounce, but the unit required by Web Services is 1 litre. Therefore, the input must be converted from an ounce to a litre before calling the web service. Similarly, switching between feet and meters, LBS and kilograms is also required. This is also true for the output. That is to say, Web Services may provide outputs in units of degrees Celsius, while customers may require data in units of degrees Fahrenheit. By providing metadata and describing them with metawsdl, OGSA can correctly and automatically adapt the input to Web service calls without manual interference and adapt the output parameters to Web service calls.
  • Grid service provisioning and Subscribe ):How do we promote the Grid Service? How can we provide grid services to enterprise users and end users? How do users subscribe to grid services? All these problems should be resolved in future OGSA specifications.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.