This application claims the benefit of priority from Chinese Patent Application No. 201310454664.0 filed on Sep. 29, 2013, the entirety of which is incorporated by reference.
The present invention relates to cloud computing, more specifically to a method and system for deploying a service in a cloud computing system.
Platform as a Service (PaaS) is a category of cloud computing for providing a middleware service and a service at a solution level. In a service model of PaaS, a cloud service provider deploys a service in software instances for providing capabilities of middleware to users. Generally, to deploy a service into software instances, it is required to determine a service endpoint of the service. The service endpoint is an address for a user to use the service, which typically includes a combination of an IP address and a port of the service. However, since the port of the service is only known by software itself during deploying the service in a cloud computing system, how to process mapping between the service and the service endpoint is a challenge currently faced in the art.
There are generally three methods in the art. However, none of them can effectively process mapping between the service and the service endpoint. The first method is to develop a detection plug-in directed to specific software configuration; such as, the detection plug-in directed to configuration file of Tomcat (which is an open source web server and servlet container developed by the Apache Software Foundation). However, since the detection plug-in cannot be reused among different software configurations, different detection plug-ins must be developed for different software configurations. The second method is a hard code service endpoint; however, this method will lead to waste of computation resource. The third method is to perform network virtualization, which virtualizes IP addresses of the service; however, this method will significantly affect network performance.
Embodiments of the present invention provide a method for deploying a service in a cloud computing system. The method comprises: collecting metadata information related to the service; building a list including a plurality of potential service endpoints by using the metadata information; validating the potential service endpoints in the list.
Embodiments of the present invention provide a system for deploying a service in a cloud computing system. The system comprises a collecting unit configured to collect metadata information related to the service, a building unit configured to build a list including a plurality of potential service endpoints by using the metadata information, and a validating unit configured to validate the potential service endpoints in the list.
Embodiments will be described in more detail with reference to the accompanying drawings. However, the present disclosure can be implemented in various manners and thus should not be construed to be limited to the embodiments disclosed herein. The embodiments are provided for the thorough and complete understanding of the present disclosure, and for completely conveying the scope of the present disclosure to those skilled in the art.
It is understood that although this disclosure includes a detailed description on cloud computing, implementation of the teachings recited herein are not limited to a cloud computing environment. Embodiments of the present invention are capable of being implemented in conjunction with any other type of computing environment now known or later developed.
Cloud computing is a model of service delivery for enabling convenient and on-demand network access to a shared pool of configurable computing resources (e.g. networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services). The shared pool of configurable computing resources can be rapidly provisioned and released with minimal management effort or interaction with a provider of the service. This cloud model may include at least five characteristics, at least three service models, and at least four deployment models.
The at least five characteristics are as follows. (1) On-demand self-service. A cloud consumer can unilaterally provision computing capabilities as needed, such as server time and network storage, automatically without requiring human interaction with the service's provider. (2) Broad network access. Capabilities are available over a network and are accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs). (3) Resource pooling. The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to demand. There is a sense of location independence in that the consumer generally has no control or knowledge over the exact location of the provided resources but may be able to specify location at a higher level of abstraction (e.g., country, state, or datacenter). (4) Rapid elasticity. Capabilities can be rapidly and elastically provisioned, in some cases automatically, to quickly scale out and rapidly release to quickly scale in. To the consumer, the capabilities available for provisioning often appear to be unlimited and can be purchased in any quantity at any time. (5) Measured service. Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of the service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported. Cloud systems provide transparency for both the provider and consumer of the utilized service.
The at least three service models are as follows. (1) Software as a Service (SaaS). The capability provided to the consumer is to use the provider's applications running on a cloud infrastructure. The applications are accessible from various client devices through a thin client interface such as a web browser (e.g., web-based e-mail). The consumer does not manage or control the underlying cloud infrastructure including network, servers, operating systems, storage, or even individual application capabilities, with the possible exception of limited user-specific application configuration settings. (2) Platform as a Service (PaaS). The capability provided to the consumer is to deploy onto the cloud infrastructure consumer-created or acquired applications created using programming languages and tools supported by the provider. The consumer does not manage or control the underlying cloud infrastructure including networks, servers, operating systems, or storage, but has control over the deployed applications and possibly application hosting environment configurations. (3) Infrastructure as a Service (IaaS). The capability provided to the consumer is to provision processing, storage, networks, and other fundamental computing resources where the consumer is able to deploy and run arbitrary software, which can include operating systems and applications. The consumer does not manage or control the underlying cloud infrastructure but has control over operating systems, storage, deployed applications, and possibly limited control of select networking components (e.g., host firewalls).
The at least four deployment models are as follows. (1) Private cloud. The cloud infrastructure is operated solely for an organization. It may be managed by the organization or a third party and may exist on-premises or off-premises. (2) Community cloud. The cloud infrastructure is shared by several organizations and supports a specific community that has shared concerns (e.g., mission, security requirements, policy, and compliance considerations). It may be managed by the organizations or a third party and may exist on-premises or off-premises. (3) Public cloud. The cloud infrastructure is made available to the general public or a large industry group and is owned by an organization selling cloud services. (4) Hybrid cloud. The cloud infrastructure is a composition of two or more clouds (private, community, or public) that remain unique entities but are bound together by standardized or proprietary technology that enables data and application portability (e.g., cloud bursting for load-balancing between clouds).
A cloud computing environment is service-oriented with a focus on statelessness, low coupling, modularity, and semantic interoperability. At the heart of cloud computing is an infrastructure comprising a network of interconnected nodes.
In cloud computing node 10, there is computer system/server 12, which is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and/or configurations that may be suitable for use with computer system/server 12 include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices, and the like.
Computer system/server 12 may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, and others that perform particular tasks or implement particular abstract data types. Computer system/server 12 may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
As shown in
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer system/server 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server 12, and it includes both volatile and non-volatile media, removable and non-removable media.
System memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32. Computer system/server 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. By way of example only, storage system 34 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (not shown and typically called a “hard drive”). Although not shown, a magnetic disk drive for reading from and writing to a removable, non-volatile magnetic disk (e.g., a “floppy disk”), and an optical disk drive for reading from or writing to a removable, non-volatile optical disk such as a CD-ROM, DVD-ROM or other optical media can be provided. In such instances, each can be connected to bus 18 by one or more data media interfaces. As will be further depicted and described below, memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program/utility 40, including a set (at least one) of program modules 42, may be stored in memory 28 by way of example, and not limitation. Program/utility 40 may further include an operating system, one or more application programs, other program modules, and program data. The operating system, one or more application programs, other program modules, program data, or some combination thereof may include an implementation of a networking environment. Program modules 42 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
Computer system/server 12 communicates with one or more external devices 14, such as a keyboard, a pointing device, a display 24, etc. Computer system/server 12 may communicate with one or more devices that enable a user to interact with computer system/server 12. Computer system/server 12 may further communicate with any devices (e.g., network card, modem, etc.) that enable computer system/server 12 to communicate with one or more other computing devices. Such communications can occur via Input/Output (I/O) interface(s) 22. Furthermore, computer system/server 12 can communicate, via network adapter 20, with one or more networks such as a local area network (LAN), a general wide area network (WAN), and/or a public network (e.g., the Internet). As depicted, network adapter 20 communicates with the other components of computer system/server 12 via bus 18. It should be understood that although not shown, other hardware and/or software components can be used in conjunction with computer system/server 12. Examples of the other hardware and/or software components include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID (redundant array of inexpensive disks) systems, tape drives, and data archival storage systems, etc.
Referring to
Referring to
Referring to
Referring to
Servlet (a Java programming language class used to extend the capabilities of a server), EJB (server-side component architecture for modular construction of enterprise applications), web service, REST (Representational State Transfer, a way to create, read, update or delete information on a server), LDAP (Lightweight Directory Access Protocol, an application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network), etc. are common in a cloud computing system. Service endpoints of these services are address for user to use the services, which typically include combination of IP addresses and ports of the services. A port of a service is typically only known by software itself. Although the port of the service is often only known by software itself, the service provided by the software usually satisfy current industry standards, such as Servlet, EJB, web service, REST, and LDAP.
The specific implementation of the embodiments of the invention is explained by taking a Servlet service as an example. The method, according to an embodiment of the invention, is performed at an initialization phase of the Servlet service lifecycle. As is well known, at the initialization phase of the Servlet service, Servlet instances are created according to Servlet configuration in a container configuration file while starting a Servlet container and initialization is conducted by invoking an initialization method init( ) of Servlet. According to an embodiment of the invention, codes are injected into the initialization method init( )for forming a collecting unit during initialization to collect metadata information related to the service. According to an embodiment of the invention, metadata information related to the service comprises IP address of the service and the port number of the service. According to an embodiment of the invention, metadata information related to the service comprises a service identifier and path. The service identifier may comprise the type of the service, the host name, and the process number. For the Servlet service, the type of the service is Servlet, the host name is a host to which the Servlet service is deployed, and the process number is a process number corresponding to the Servlet service on the host to which the Servlet service is deployed. The path is relative path of the Servlet service defined in the collecting unit. For example, the injected codes for forming the collecting unit during initialization may be as follows:
Corresponding to the Servlet service, the collecting unit corresponds to standard HTTP Servlet; thus, the above codes will be injected into web.xml as following Servlet definition while deploying the Servlet service:
The formed collecting unit collects metadata information related to the service. The metadata information may comprises: (1) the type of the service, the host name, and the process number, combination of which is taken as the service identifier; (2) the IP address of the service; (3) the port number of the service; and (4) the relative path of the service.
For example, assuming the host to which the Servlet service is deployed is service.com.cn, the collected metadata information related to the service may be represented by Table 1.
Furthermore, codes are also injected into the initialization method init( )for forming a building unit during initialization to build a list of potential service endpoints by using the metadata information. A service endpoint typically includes combination of the IP address and the port of the service; thus, the building unit may build a list of potential service endpoints by combining the IP address and the port number of the service in the metadata information. For Example, the formed list may be represented by Table 2.
Furthermore, codes are also injected into the initialization method init( )for forming a validating unit during initialization to validate potential service endpoints. For example, the injected codes for forming the validating unit during initialization may be represented as follows:
According to an embodiment of the invention, a validation request may be built up for each of potential service endpoints, and the validation request is published into the service for validation. Again taking the Servlet service as an example, a validation request built up for each of potential service endpoints may be represented in Table 3.
Since a standard Servlet service has been injected by the collecting unit while deploying the Servlet service, according to an embodiment of the invention, the validating unit may validate potential service endpoints through handshake between the collecting unit and the validating unit. The validating unit may validate potential service endpoints by publishing the built validation request to the collecting unit and receiving result of validation. If the validation has been passed, then corresponding potential service endpoints are reserved. Then, according to an embodiment of the invention, deploying a service in a cloud computing system comprises a further step: registering potential service endpoint(s) passing the validation; at this step, potential service endpoint(s) passing the validation is/are registered with the cloud computing system. If the validation has not been passed, corresponding potential service endpoint(s) will be removed from the list.
Discussion of Table 3 is given as follows. As for validation request http://9.181.25.234:2899/servlet_service_validation, assuming this validation request returns HTTP 200 OK information, it means that validation has been passed, then corresponding service endpoint (9.181.25.234:289) is reserved. However, as for validation request http://9.181.25.234:9080/servlet_service_validation, it is published to the collecting unit, assuming this validation request returns HTTP 404 or 405 error information, it means that validation has not been passed, then its corresponding service endpoint (9.181.25.234:9080) is removed from the list. In this way, each of potential service endpoints may be validated by publishing all validation requests into the service. After validation, a final list of potential service endpoints is formed; the final list comprises all potential service endpoints passing the validation, mapping between services and service endpoints deployed in the cloud computing system.
For example, result returned by a validated service endpoint may be as follows.
For example, the final list of potential service endpoints may be as shown in Table 4.
It should be appreciated that the validation of potential service endpoints through handshake described above is just an example of validating potential service endpoints. For different services, there are different corresponding methods for validating potential service endpoints, which can be derived by those skilled in the art based on the disclosure of the invention.
It should be appreciated that, the above description in conjunction with Servlet is merely for illustrative purpose and should not be regarded as a limitation to the protection scope of the invention. Those skilled in the art will appreciate that, for different services, codes for forming a collecting unit and for forming a validating unit may vary. For example, for EJB 3.0, the injected codes for forming a collecting unit during initialization may be as follows, for example:
For example, assuming that the host to which EJB service is deployed is also service.com.cn, the collected metadata information related to the service may be represented by Table 5.
For example, the injected codes for forming a validating unit during initialization may be as follows:
According to an embodiment of the invention, validating unit 506 is further configured to build a validation request for each of the potential service endpoints and to publish the validation request into the service for validation.
According to an embodiment of the invention, system 500 further comprises a receiving unit (not shown in
According to an embodiment of the invention, system 500 further comprises a registering unit (not shown in
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the Figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Number | Date | Country | Kind |
---|---|---|---|
201310454664.0 | Sep 2013 | CN | national |