Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more example embodiments. In the following description, numerous specific details are provided to give a thorough understanding of example embodiments of the present application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, steps, and so forth. In other instances, well-known structures, methods, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The application provides a component management system, which mainly aims to manage components of a service center deployed in a cloud environment so as to improve the reusability of common components in the service center.
The component management system provided by the application comprises a public component library, index middleware and a cloud service compiler. The public component library, the index middleware and the cloud service compiler are deployed in each service middle desk.
Fig. 1 illustrates a component management method according to an embodiment of the present application, where an execution subject of the method is each business middleware in a component management system, and the method includes:
step S110, responding to a calling request of a target foreground application for a target common component, and positioning a local target common component of a common component library stored in a local middle station through an index middleware of the local middle station;
step S120, if the cloud environment of the local middle station is consistent with the cloud environment of the target foreground application, taking the local target common component as a compatible target common component suitable for the cloud environment of the target foreground application, and pushing the compatible target common component to the target foreground application;
step S130, if the cloud environment of the local middle station is different from the cloud environment of the target foreground application, compiling the local target common component into a compatible target common component through a cloud service compiler of the local middle station, and pushing the compatible target common component to the target foreground application.
In the embodiment of the application, the target common component requested to be called by the target foreground application may be distributed in a common component library of a plurality of service middleboxes. In this case, each service center station needs to push the local target common component stored in the local common component library of the service center station to the target foreground application, so that the target foreground application can obtain all the required target common components according to the local target common components of the service center stations.
In consideration of pushing the local target common component to the target foreground application, after receiving a call request of the target foreground application for the target common component, the service middle station positions the local target common component through the index middleware of the local middle station. The call request of the target foreground application to the target common component, which is received by the service center station, may be directly sent by the target foreground application, or may be sent through relay of another service center station.
Before pushing the local target common component to the target foreground application, the service center judges whether the cloud environment of the local center is consistent with the cloud environment of the target foreground application or not in consideration of compatibility.
If the local target common components are consistent with the target foreground application, the local target common components are suitable for the cloud environment of the target foreground application, and the local target common components and the target foreground application are compatible. The local target common component is taken as a compatible target common component and the compatible target common component is pushed to the target foreground application.
If the difference is positive, the local target common component is not suitable for the cloud environment of the target foreground application, and the local target common component and the target foreground application are not compatible. The cloud service compiler of the local middle desk compiles the local target common component into a compatible target common component, and then pushes the compatible target common component to the target foreground application.
The cloud service compiler performs cloud environment compatibility processing on the local target common component before the business middle station pushes the local target common component to the target foreground application, so that the business middle station which is incompatible with the cloud environment can respond to a calling request of the target foreground application for the target common component, repeated management of the common component can be avoided among the business middle stations, and reusability of the common component is improved.
Therefore, according to the embodiment of the application, the common component library for storing the common components, the index middleware for positioning the common components and the cloud service compiler for processing cloud environment compatibility are arranged in each service center, so that even if the service center stations which are incompatible with the cloud environment can respond to the calling request of the target foreground application for the target common components, the common components can be prevented from being repeatedly managed among the service center stations, and the reusability of the common components is improved.
In one embodiment, each common component library may have stored therein common components of the following types: service components, application components, and middleware.
In one embodiment, each index middleware stores the following information for each common component in the component management system: physical address, virtual machine version, cloud environment, component description information. Based on this stored information, the indexing middleware can address the location to the specified common component.
In an embodiment, the component management system further comprises a cloud service compiler deployed at the target foreground application. The target foreground application is configured to: and sending the calling request aiming at the target common component to each service center, and acquiring the compatible target common component through each service center. And compiling and sequencing the compatible target common components according to the service sequence of the target common components by a cloud service compiler of the local foreground to obtain application service for outputting service.
In this embodiment, the target foreground application sends a call request for the target common component to each service center station, so as to obtain a compatible target common component pushed by each service center station.
Specifically, a cloud service compiler is deployed in a target foreground application. The cloud service compiler of the target foreground application is mainly used for compiling the compatible target common component to obtain the application service for outputting the service.
After receiving a service request initiated by a user, a target foreground application determines common components and corresponding service sequences required for responding to the service request. Wherein the common component required to respond to the service request is the target common component.
And then the target foreground application generates a call request aiming at the target common component and sends the call request aiming at the target common component to each service middle station. Each service center station responds to the call request aiming at the target common component and positions the local target common component through the index middleware of the local center station; further performing cloud environment compatibility processing on the local target common component to obtain a compatible target common component; and then pushing the compatible target common component to the target foreground application.
And after the target foreground application obtains the compatible target common components of the corresponding parts from each service center, compiling and sequencing the obtained compatible target common components through a cloud service compiler of the local foreground according to the service sequence of the target common components to obtain application services for outputting the services. The service output by the application service is mainly used for responding to a service request initiated by a user.
It should be noted that, in this embodiment, the service center station that does not store any target common component also receives a call request for the target common component. In this case, after the service center station which does not store any target common component receives the call request for the target common component, the index middleware of the local center station cannot locate the local target common component, and the service center station does not need to push the target common component to the target front station application.
FIG. 2 illustrates a component management interaction diagram according to an embodiment of the present application.
In this embodiment, there are 3 service middlings, which are respectively a service middling station a, a service middling station B, and a service middling station C. Different common components are stored in the common component library of each service center station. The foreground application A and the service center station A are deployed in the same cloud environment. A cloud service compiler is deployed in the foreground application a.
The user initiates a service request to the foreground application a through the channel contact.
The foreground application A determines that the common component a and the common component e are required to respond to the service request according to the service request. The foreground application a requests the service middleboxes to call the common component a and the common component e.
The service center station a locates the common component a stored in the local center station through the indexing middleware of the local center station in response to the received call request. Because the business middle station A and the foreground application A are deployed in the same cloud environment, the business middle station A can directly push the common component a to the foreground application A, so that the foreground application A obtains the compatible common component a.
The service center station B locates, in response to the received call request, the common component e stored in the local center station through the indexing middleware of the local center station. Because the cloud environment of the service center station B is inconsistent with the cloud environment of the foreground application A, the service center station B compiles the public component e through a cloud server compiler of the local center station, so that the compiled public component e is compatible with the cloud environment of the foreground application A, and then the compiled public component e is pushed to the foreground application A, so that the foreground application A obtains the compatible public component e.
The service center station C responds to the received call request, and the index middleware of the local center station locates no public component required by the foreground application A stored in the local center station, so that the service center station C does not push any public component to the foreground application A.
After the foreground application A obtains the compatible common component a and the compatible common component e, the compatible common component a and the compatible common component e are compiled according to the service sequence through a cloud service compiler of the local foreground, and therefore service is provided for the user.
In an embodiment, the component management system further comprises a cloud service compiler deployed at the target foreground application. The target foreground application is configured to: and sending the call request aiming at the target common component to a same-environment service center station in the same cloud environment with the local foreground, and acquiring the compatible target common component through the same-environment service center station. And compiling and sequencing the compatible target common components according to the service sequence of the target common components by a cloud service compiler of the local foreground to obtain application service for outputting service. The co-ambient service middlebox is further configured to: in response to a call request for a target common component, an external target common component of a common component library stored in an external intermediate station is located by the indexing middleware of the local intermediate station. And sending the call request aiming at the external target common component to the heterogeneous environment service central station where the external target common component is positioned.
In this embodiment, the target foreground application sends a call request for the target common component to the same-environment service center station, and then the same-environment service center station sends the call request for the target common component to other different-environment service center stations storing the target common component, and then the target foreground application obtains the compatible target common component pushed by the same-environment service center station and the compatible target common component pushed by the different-environment service center stations.
Specifically, a cloud service compiler is deployed in a target foreground application. The cloud service compiler of the target foreground application is mainly used for compiling the compatible target common component to obtain the application service for outputting the service.
And after receiving the service request initiated by the user, the target foreground application determines the corresponding target common component and the corresponding service sequence. And then the target foreground application generates a call request aiming at the target common component, and then sends the call request aiming at the target common component to the same-environment service middle station. The same-environment service center station refers to a service center station in the same cloud environment as the target foreground application.
After receiving a calling request aiming at a target public component, the same-environment service middle station responds to the calling request aiming at the target public component and positions the local target public component through an index middleware of the local middle station; further performing cloud environment compatibility processing on the local target common component to obtain a compatible target common component; and then pushing the compatible target common component to the target foreground application.
And after receiving the call request aiming at the target public component, the same-environment service middle station responds to the call request aiming at the target public component and also positions the external target public component of the public component library stored in the external middle station through the index middleware of the same-environment service middle station, namely positions the external target public component stored outside the same-environment service middle station. And then the same environment service middle station generates a call request aiming at the external target common component, and sends the call request aiming at the external target common component to the different environment service middle station where the external target common component is positioned.
The external target common component relative to the same environment service middle station is the local target common component relative to the different environment service middle station. Therefore, after receiving the call request aiming at the local target public component, the heterogeneous environment service middle station responds to the call request aiming at the local target public component and positions the local target public component through the index middleware of the local middle station; further carrying out cloud environment compatibility processing on the local target public component to obtain a compatible target public component; and then pushing the compatible target common component to the target foreground application.
Therefore, the target foreground application can obtain the compatible target common component of the corresponding part from the same-environment service center station, and under the forwarding action of the same-environment service center station on the call request, the target foreground application triggers the compatible target common component of the corresponding part pushed by the environment service center station, so as to obtain the compatible target common component of the corresponding part from the different-environment service center station. And the target foreground application compiles and sequences the obtained compatible target common components according to the service sequence of the target common components by a cloud service compiler of the local foreground to obtain application service for outputting service.
The embodiment has the advantages that the calling request is transferred by the service center station in the same environment, the calling request is prevented from being sent to the service center station which does not store the target public component in the component calling process, and the signaling consumption is reduced.
FIG. 3 illustrates a component management interaction diagram according to an embodiment of the present application.
In this embodiment, there are 3 service middlings, which are respectively a service middling station a, a service middling station B, and a service middling station C. Different common components are stored in the common component library of each service center station. The foreground application A and the service center station A are deployed in the same cloud environment, the same-environment service center station of the foreground application A is the service center station A, and the different-environment service center stations are the service center stations B and C. A cloud service compiler is deployed in the foreground application a.
The user initiates a service request to the foreground application a through the channel contact.
The foreground application A determines that the common component a and the common component e are required to respond to the service request according to the service request. Foreground application a requests service station a to call common component a and common component e.
The service center station A responds to the received call request, positions the public component a stored in the local center station through the index middleware of the local center station, and then the service center station A can directly push the public component a to the foreground application A, so that the foreground application A obtains the compatible public component a; and the service center station A locates the public component e stored in the service center station B through the index middleware of the local center station, and further informs the service center station B that the foreground application A requests to call the public component e.
And the service middle station B responds to the received call request, positions the public component e stored in the local middle station through the index middleware of the local middle station, and then compiles the public component e through the cloud server compiler of the local middle station to ensure that the compiled public component e is compatible with the cloud environment of the foreground application A, and then pushes the compiled public component e to the foreground application A to ensure that the foreground application A obtains the compatible public component e.
After the foreground application A obtains the compatible common component a and the compatible common component e, the compatible common component a and the compatible common component e are compiled according to the service sequence through a cloud service compiler of the local foreground, and therefore service is provided for the user.
In an embodiment, the component management system further includes an index middleware deployed in the target foreground application, and a cloud service compiler deployed in the target foreground application. The target foreground application is configured to: and positioning the target service middle station storing the target common component through the index middleware of the local foreground. And respectively sending the calling requests aiming at the target common components to corresponding target service intermediate stations, and acquiring compatible target common components through the target service intermediate stations. And compiling and sequencing the compatible target common components according to the service sequence of the target common components by a cloud service compiler of the local foreground to obtain application service for outputting service.
In this embodiment, the target foreground application sends a call request for the target common component to the target service center station in which the target common component is stored, so as to obtain a compatible target common component pushed by the target service center station.
Specifically, index middleware and a cloud server compiler are deployed in the target foreground application. The cloud service compiler of the target foreground application is mainly used for compiling the compatible target common component to obtain the application service for outputting the service.
And after receiving the service request initiated by the user, the target foreground application determines the corresponding target common component and the corresponding service sequence. And then the target foreground application generates a call request aiming at the target common component, positions the target service middle station through the index middleware of the local foreground, and then only sends the call request aiming at the target common component to the target service middle station.
After receiving a calling request aiming at a target public component, a target service intermediate station responds to the calling request aiming at the target public component and positions the local target public component through an index middleware of the local intermediate station; further performing cloud environment compatibility processing on the local target common component to obtain a compatible target common component; and then pushing the compatible target common component to the target foreground application.
And after the target foreground application obtains the compatible target common components of the corresponding parts from each target service center, compiling and sequencing the obtained compatible target common components through a cloud service compiler of the local foreground according to the service sequence of the target common components to obtain application services for outputting the services.
The embodiment has the advantages that the index middleware is deployed in the target foreground application, so that the target foreground application can automatically position each target common component, and the selection flexibility of the target foreground application in the process of calling the target common component is improved.
FIG. 4 illustrates a component management interaction diagram according to an embodiment of the present application.
In this embodiment, there are 3 service middlings, which are respectively a service middling station a, a service middling station B, and a service middling station C. Different common components are stored in the common component library of each service center station. The foreground application A and the service center station A are deployed in the same cloud environment. The foreground application A is provided with index middleware and a cloud service compiler.
The user initiates a service request to the foreground application a through the channel contact.
The foreground application A determines that the common component a and the common component e are required to respond to the service request according to the service request. The foreground application a locates the common component a stored in the business platform a and the common component e stored in the business platform B through the indexing middleware of the local foreground. The foreground application then requests the service center station a to call the common component a and the common component e, and requests the service center station B to call the common component a and the common component e.
The service center station A responds to the received call request, positions the public component a stored in the local center station through the index middleware of the local center station, and then the service center station A can directly push the public component a to the foreground application A, so that the foreground application A obtains the compatible public component a.
And the service middle station B responds to the received call request, positions the public component e stored in the local middle station through the index middleware of the local middle station, and then compiles the public component e through the cloud server compiler of the local middle station to ensure that the compiled public component e is compatible with the cloud environment of the foreground application A, and then pushes the compiled public component e to the foreground application A to ensure that the foreground application A obtains the compatible public component e.
After the foreground application A obtains the compatible common component a and the compatible common component e, the compatible common component a and the compatible common component e are compiled according to the service sequence through a cloud service compiler of the local foreground, and therefore service is provided for the user.
FIG. 5 illustrates a component management interaction diagram according to an embodiment of the present application.
The difference between this embodiment and the embodiment shown in fig. 4 is mainly that, after the foreground application a locates the target common component through the indexing middleware of the local foreground, the foreground application a specifically requests the service foreground storing the target common component to call the corresponding target common component.
Specifically, it is different from the embodiment shown in fig. 4 that the foreground application a requests the service center station a to call the common component a and the common component e, and requests the service center station B to call the common component a and the common component e. In the embodiment shown in fig. 5, the foreground application a requests the service station a to invoke the common component a and requests the service station B to invoke the common component e.
Fig. 6 shows a component management apparatus according to an embodiment of the present application, the apparatus is disposed at each business center station in a component management system, the component management system includes an index middleware deployed at each business center station, a cloud service compiler deployed at each business center station, and a common component library deployed at each business center station, and each business center station is deployed in different cloud environments, the apparatus includes:
a local positioning module 210 configured to position, by an index middleware of a local middle station, a local target common component of a common component library stored in the local middle station in response to a call request for the target common component by a target foreground application;
a first pushing module 220, configured to, if the cloud environment of the local middle station is consistent with the cloud environment of the target foreground application, take the local target common component as a compatible target common component applicable to the cloud environment of the target foreground application, and push the compatible target common component to the target foreground application;
the second pushing module 230 is configured to compile the local target common component into the compatible target common component through a cloud service compiler of the local middle station if the cloud environment of the local middle station is different from the cloud environment of the target foreground application, and push the compatible target common component to the target foreground application.
An electronic device 30 according to an embodiment of the present application is described below with reference to fig. 7. The electronic device 30 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the electronic device 30 is in the form of a general purpose computing device. The components of the electronic device 30 may include, but are not limited to: the at least one processing unit 310, the at least one memory unit 320, and a bus 330 that couples various system components including the memory unit 320 and the processing unit 310.
Wherein the storage unit stores program code executable by the processing unit 310 to cause the processing unit 310 to perform steps according to various exemplary embodiments of the present invention described in the description part of the above exemplary methods of the present specification. For example, the processing unit 310 may perform the various steps as shown in fig. 1.
The storage unit 320 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)3201 and/or a cache memory unit 3202, and may further include a read only memory unit (ROM) 3203.
The storage unit 320 may also include a program/utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 30 may also communicate with one or more external devices 400 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 30, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 30 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 350. An input/output (I/O) interface 350 is connected to the display unit 340. Also, the electronic device 30 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 360. As shown, the network adapter 360 communicates with the other modules of the electronic device 30 via the bus 330. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 30, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present application.
In an exemplary embodiment of the present application, there is also provided a computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to perform the method described in the above method embodiment section.
According to an embodiment of the present application, there is also provided a program product for implementing the method in the above method embodiment, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as JAVA, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods herein are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.