CN110505074B - Application modularization integration method and device - Google Patents

Application modularization integration method and device Download PDF

Info

Publication number
CN110505074B
CN110505074B CN201810472314.XA CN201810472314A CN110505074B CN 110505074 B CN110505074 B CN 110505074B CN 201810472314 A CN201810472314 A CN 201810472314A CN 110505074 B CN110505074 B CN 110505074B
Authority
CN
China
Prior art keywords
application
url path
cluster
sub
child node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810472314.XA
Other languages
Chinese (zh)
Other versions
CN110505074A (en
Inventor
王宝令
者文明
史季强
刘美德
韩博渊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810472314.XA priority Critical patent/CN110505074B/en
Publication of CN110505074A publication Critical patent/CN110505074A/en
Application granted granted Critical
Publication of CN110505074B publication Critical patent/CN110505074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses an application modularization integration method and device, and relates to the technical field of computers. One embodiment of the method comprises the following steps: receiving a data transmission request, wherein the data transmission request comprises a URL path; determining an application instance according to the URL path and a preset configuration strategy matched with the URL path; and sending the data transmission request to the application instance through a gateway. The implementation mode is based on gateway technology and configuration strategy, can control the forwarding of HTTP request in fine granularity, can realize the modularization integration of large-scale Web application, and the Web application provides service through the gateway, is called in a plurality of pages and has no cross-domain problem, thereby solving the cross-domain data sharing problem of the existing system. Meanwhile, development, testing and deployment can be realized by taking a single page as a minimum unit, namely, the page is an integrated minimum unit, each page is supported to be deployed independently, and faults can be well isolated.

Description

Application modularization integration method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an application modularized integration method and apparatus.
Background
In some large internet enterprises, IT systems are quite many, the relationship between the systems is complicated, the technical route of each system is different, the systems are independently deployed, independent domain names are used, and the UI interaction modes of each system are quite different. In order to enable these systems to respond to service demands quickly, a better effect is achieved by using a distributed service idea to perform modularized integration on the systems, but the method is limited to service applications, for example, for large-scale Web applications (or Web application clusters), the systems are integrated together mainly through a portal website in a hyperlink mode.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art:
1. when data sharing is performed on a browser by using systems with different domain names, a cross-domain problem exists.
2. The minimum unit of integration is a system, and the granularity is too coarse, which can cause poor expansibility and can not solve the problems of single sign-on, access control and the like.
3. The portal site has poor user experience, and a browser window needs to be opened again every time a user opens a link.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide an application modularization integration method and apparatus, which can control forwarding of a data transmission request in a fine granularity based on a gateway technology and a configuration policy, implement modularization integration of a large-scale Web application, and call the Web application in a plurality of pages without a cross-domain problem through a gateway, thereby solving the cross-domain data sharing problem of the existing system. Meanwhile, development, testing and deployment can be realized by taking a single page as a minimum unit, namely the pages are the minimum unit of integration, the pages are of a completely loose coupling structure, different technical routes can be adopted for different pages in the development stage, each page is supported to be deployed independently in the operation stage, and faults can be well isolated.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an application modular integration method, including: receiving a data transmission request, wherein the data transmission request comprises a URL path; determining an application instance according to the URL path and a preset configuration strategy matched with the URL path; and sending the data transmission request to the application instance through a gateway.
Optionally, the configuration policy includes a routing policy and a load balancing policy; determining an application instance according to the URL path and a preset configuration strategy matched with the URL path, wherein the method comprises the following steps: determining an application sub-cluster from the application clusters according to the URL path and the routing strategy; the application cluster comprises a plurality of application sub-clusters; and determining an application instance from the application sub-cluster according to the URL path and the load balancing strategy.
Optionally, determining an application sub-cluster from the application clusters according to the URL path and the routing policy includes: matching the URL path with a child node of the tree structure; the tree structure is obtained by conversion according to a routing strategy, and each child node of the tree structure comprises URL path information and identification information of an application cluster; and if the URL path is successfully matched with the URL path information of the child node, taking the application cluster corresponding to the child node as a target sub-cluster, thereby determining the application sub-cluster.
Optionally, determining an application sub-cluster from the application clusters according to the URL path and the routing policy, further includes: if the URL path is failed to be matched with the URL path information of the child node, matching the URL path with the URL path information of the next child node of the child node; if the URL path is successfully matched with the URL path information of the next-level sub-node of the sub-node, an application cluster corresponding to the next-level sub-node of the sub-node is used as a target sub-cluster, so that the application sub-cluster is determined; if the URL path is failed to be matched with the URL path information of the next-stage child node of the child node, the application cluster corresponding to the child node is taken as a target child cluster, and therefore the application child cluster is determined.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an application modular integrated apparatus comprising: the device comprises a receiving unit, a configuration unit and a gateway unit; the receiving unit is used for: receiving a data transmission request, wherein the data transmission request comprises a URL path; the configuration unit is used for: determining an application instance according to the URL path and a preset configuration strategy matched with the URL path; the gateway unit is configured to: and sending the data transmission request to the application instance through a gateway.
Optionally, the configuration policy includes a routing policy and a load balancing policy; the configuration unit is used for: determining an application sub-cluster from the application clusters according to the URL path and the routing strategy; the application cluster comprises a plurality of application sub-clusters; and determining an application instance from the application sub-cluster according to the URL path and the load balancing strategy.
Optionally, the configuration unit is further configured to: matching the URL path with a child node of the tree structure; the tree structure is obtained by conversion according to a routing strategy, and each child node of the tree structure comprises URL path information and identification information of an application cluster; and if the URL path is successfully matched with the URL path information of the child node, taking the application cluster corresponding to the child node as a target sub-cluster, thereby determining the application sub-cluster.
Optionally, the configuration unit is further configured to: if the URL path is failed to be matched with the URL path information of the child node, matching the URL path with the URL path information of the next child node of the child node; if the URL path is successfully matched with the URL path information of the next-level sub-node of the sub-node, an application cluster corresponding to the next-level sub-node of the sub-node is used as a target sub-cluster, so that the application sub-cluster is determined; if the URL path is failed to be matched with the URL path information of the next-stage child node of the child node, the application cluster corresponding to the child node is taken as a target child cluster, and therefore the application child cluster is determined.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic device including: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the application modularization integration method provided by the embodiment of the invention.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program, which when executed by a processor, implements the application modular integration method proposed by the embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: based on gateway technology and configuration strategy, the forwarding of data transmission request can be controlled in fine granularity, the modular integration of large-scale Web application is realized, the Web application provides service through gateway, the cross-domain problem is not existed when the Web application is called in a plurality of pages, and the cross-domain data sharing problem of the existing system is solved. Meanwhile, development, testing and deployment can be realized by taking a single page as a minimum unit, namely, the page is an integrated minimum unit, each page is supported to be deployed independently, and faults can be well isolated.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a gateway primarily applied to a reverse proxy;
FIG. 2 is a schematic diagram of an embodiment of the present invention using a modular integration method;
FIG. 3 is a schematic diagram of the basic flow of an application modular integration method according to an embodiment of the invention;
FIG. 4 is an exemplary diagram of a routing configuration using a modular integration method in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of the base module of an application modular integrated device according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of preferred modules of an application modular integrated device according to an embodiment of the present invention;
FIG. 7 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 8 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The traditional three-layer architecture comprises a Web service layer, a business service layer and a data service layer, wherein the Web application layer mainly solves the interaction problem (such as a login interface) with a browser, the business service layer mainly performs business logic processing (such as login logic), and the business service layer can perform fine-granularity splitting and has a very mature scheme at present. The application on the Web service layer is a Web application.
An HTTP gateway is a special server that is interposed between a browser and a Web application, receives HTTP requests, and forwards them to the Web application according to a certain routing policy. Traditional HTTP gateways often act as reverse proxies, solving performance bottlenecks. As shown in fig. 1, the gateway acts as a reverse proxy, and can forward HTTP request forwarding to a certain machine of the Web application instance a, the Web application instance b and the Web application instance c according to a load balancing policy (polling, random, hash, etc.), in this technical solution, the Web application of the gateway proxy deploys multiple instances only by the same application, that is, the instance a, the instance b and the instance c are essentially compiled by one code (in the case of gray release, there may be a difference in version, but essentially one application).
Regarding cross-domain issues, javaScript does not allow cross-domain invocation of objects of other pages, i.e., homology policies, for security considerations. By "homologous" is meant that the protocols are identical, the domain names are identical, and the ports are identical. The purpose of the homologous strategy is to ensure the security of the user information. Malicious websites are prevented from stealing data.
The implementation principle of the technology of the invention is shown in figure 2, the traditional reverse proxy gateway is updated to be a URL routing gateway, different routing strategies can be finely implemented for different URLs, for example, a request at the beginning of/URL A can be forwarded to a Web application A cluster, a request at the beginning of/URL B can be forwarded to a Web application B cluster, the cluster A and the cluster B can be different applications, and different load balancing strategies, for example, load balancing strategies for polling of/URL A configuration and load balancing strategies for hash of/URL B configuration can be configured for different URLs.
Fig. 3 is a schematic diagram of a basic flow of an application modular integration method according to an embodiment of the present invention, and as shown in fig. 3, an embodiment of the present invention provides an application modular integration method, including:
step S301, receiving a data transmission request, wherein the data transmission request comprises a URL (Uniform Resource Locator ) path or address;
s302, determining an application instance according to the URL path and a preset configuration strategy matched with the URL path;
and S303, sending the data transmission request to the application instance through a gateway.
The data transmission request may include, but is not limited to, an HTTP request, which refers to request information from a client to a server. The embodiment of the invention can control the forwarding of the data transmission request in a fine granularity based on the gateway technology and the configuration strategy, realize the modularized integration of the large-scale Web application, provide service for the Web application through the gateway, call in a plurality of pages and have no cross-domain problem, and solve the cross-domain data sharing problem of the existing system. Meanwhile, development, testing and deployment can be realized by taking a single page as a minimum unit, namely the pages are the minimum unit of integration, the pages are of a completely loose coupling structure, different technical routes can be adopted for different pages in the development stage, each page is supported to be deployed independently in the operation stage, and faults can be well isolated.
In the embodiment of the invention, the configuration strategy comprises a routing strategy and a load balancing strategy; determining an application instance according to the URL path and a preset configuration strategy matched with the URL path, wherein the method comprises the following steps: determining an application sub-cluster from the application clusters according to the URL path and the routing strategy; the application cluster comprises a plurality of application sub-clusters; and determining an application instance from the application sub-cluster according to the URL path and the load balancing strategy. For example, multiple Web application sub-clusters constitute a large Web application cluster; the routing policy refers to the correspondence between URL paths and application sub-clusters, and the load balancing policy refers to the correspondence between URL paths and application instances in application sub-clusters. The embodiment of the invention can control the forwarding of the data transmission request in a fine granularity mode based on a specific configuration strategy, and realize the modularization integration of large-scale Web application.
In the embodiment of the present invention, determining an application sub-cluster from application clusters according to the URL path and the routing policy includes: matching the URL path with a child node of the tree structure; the tree structure is obtained by conversion according to a routing strategy, and each child node of the tree structure comprises URL path information and identification information of an application cluster; and if the URL path is successfully matched with the URL path information of the child node, taking the application cluster corresponding to the identification information of the application cluster in the child node as a target sub-cluster, thereby determining the application sub-cluster. The embodiment of the invention adopts the tree structure to match the URL path, can more accurately control the forwarding of the data transmission request, and realizes the modularized integration of large-scale Web application.
In the embodiment of the present invention, according to the URL path and the routing policy, an application sub-cluster is determined from an application cluster, and the method further includes: if the URL path is failed to be matched with the URL path information of the child node, matching the URL path with the URL path information of the next child node of the child node; if the URL path is successfully matched with the URL path information of the next-level sub-node of the sub-node, an application cluster corresponding to the next-level sub-node of the sub-node is used as a target sub-cluster, so that the application sub-cluster is determined; if the URL path is failed to be matched with the URL path information of the next-stage child node of the child node, the application cluster corresponding to the child node is taken as a target child cluster, and therefore the application child cluster is determined. The URL path matching in the embodiment of the invention supports rollback matching, can more accurately control the forwarding of the data transmission request, and realizes the modularization integration of large-scale Web application. And meanwhile, the method can realize that the user can call each Web application instance through only one browser window.
And converting the routing strategy into a tree structure, wherein each child node of the tree structure comprises URL path information and identification information of an application cluster. As shown in fig. 4, HTTP requests with URL path "/level a" would be routed to application clusters with cluster nodes 192.168.1.8 and 192.168.1.9. The matching rule of the URL path supports rollback matching, and the matching mode supporting rollback has good flexibility. As shown in Table 1, HTTP requests with URL paths "/leveA" match exactly with URL path information "/leveA" and are therefore matched to application clusters with cluster nodes 192.168.1.8 and 192.168.1.9. HTTP requests with URL paths of "/level A/abc" will fall back the cluster corresponding to the superordinate child node "/level A" because no exactly matching URL path information is found and the matching fails.
The corresponding Web application X cluster with URL path "/level a/level b" may redevelop an application Y if the relevant functionality is to be added to application X, without further development on application X (which may already be huge or application X is intended to be reconfigured), and add a new routing policy:
the cluster corresponding to the URL path "/level A/level B/level C" is an application Y cluster, and the cluster nodes are: 192.168.1.100, 192.168.1.101. This logically adds a related function to application X, but physically two applications, do not affect each other. Meanwhile, the application X and the application Y both provide services through one domain name (the domain name of the gateway), so that the application Y can directly request the services provided by the application X at the browser end without the cross-domain problem (the application X and the application Y are the same domain name).
Table 1 route match example table
Figure BDA0001663565790000081
As shown in Table 2, the configuration of the load balancing strategy is also corresponding to the URL path, and meanwhile, on the basis of the traditional load balancing strategy, a fusing strategy and a current limiting strategy are added, so that the safety of a system behind the gateway can be further ensured.
Table 2 load balancing policy configuration example table
Figure BDA0001663565790000091
Fig. 5 is a schematic diagram of basic modules of an application modular integrated device according to an embodiment of the present invention, and as shown in fig. 5, an embodiment of the present invention provides an application modular integrated device 500, including: a receiving unit 501, a configuring unit 502 and a gateway unit 503; the receiving unit 501 is configured to: receiving a data transmission request, wherein the data transmission request comprises a URL path; the configuration unit 502 is configured to: determining an application instance according to the URL path and a preset configuration strategy matched with the URL path; the gateway unit 503 is configured to: and sending the data transmission request to the application instance through a gateway. The embodiment of the invention can control the forwarding of the data transmission request in a fine granularity mode based on the gateway technology and the configuration strategy, realizes the modularized integration of large-scale Web application, provides service for the Web application through the gateway, calls in a plurality of pages and has no cross-domain problem, and solves the cross-domain data sharing problem of the existing system. Meanwhile, development, testing and deployment can be realized by taking a single page as a minimum unit, namely the pages are the minimum unit of integration, the pages are of a completely loose coupling structure, different technical routes can be adopted for different pages in the development stage, each page is supported to be deployed independently in the operation stage, and faults can be well isolated.
In the embodiment of the invention, the configuration strategy comprises a routing strategy and a load balancing strategy; the configuration unit 502 is configured to: determining an application sub-cluster from the application clusters according to the URL path and the routing strategy; the application cluster comprises a plurality of application sub-clusters; and determining an application instance from the application sub-cluster according to the URL path and the load balancing strategy. For example, multiple Web application sub-clusters constitute a large Web application cluster; the routing policy refers to the correspondence between URL paths and application sub-clusters, and the load balancing policy refers to the correspondence between URL paths and application instances in application sub-clusters. The embodiment of the invention can control the forwarding of the data transmission request in a fine granularity mode based on a specific configuration strategy, and realize the modularization integration of large-scale Web application.
In the embodiment of the present invention, the configuration unit 502 is further configured to: matching the URL path with a child node of the tree structure; the tree structure is obtained by conversion according to a routing strategy, and each child node of the tree structure comprises URL path information and identification information of an application cluster; and if the URL path is successfully matched with the URL path information of the child node, taking the application cluster corresponding to the child node as a target sub-cluster, thereby determining the application sub-cluster. The embodiment of the invention adopts the tree structure to match the URL path, can more accurately control the forwarding of the data transmission request, and realizes the modularized integration of large-scale Web application.
In the embodiment of the present invention, the configuration unit 502 is further configured to: if the URL path is failed to be matched with the URL path information of the child node, matching the URL path with the URL path information of the next child node of the child node; if the URL path is successfully matched with the URL path information of the next-level sub-node of the sub-node, an application cluster corresponding to the next-level sub-node of the sub-node is used as a target sub-cluster, so that the application sub-cluster is determined; if the URL path is failed to be matched with the URL path information of the next-stage child node of the child node, the application cluster corresponding to the child node is taken as a target child cluster, and therefore the application child cluster is determined. The matching of the Web application instance in the embodiment of the invention supports rollback matching, can more accurately control the forwarding of the data transmission request, and realizes the modularization integration of large-scale Web application.
Fig. 6 is a schematic diagram of preferred modules of an application modular integrated device according to an embodiment of the present invention, and as shown in fig. 6, the device mainly includes a gateway, a configuration unit, where the configuration unit includes a URL routing configuration component and a load balancing policy configuration component. The URL routing configuration component generates a routing policy and is responsible for URL routing configuration and routing selection, the load balancing policy configuration component is responsible for generating load balancing policies of different clusters and selection of cluster nodes (application examples), the gateway is responsible for forwarding HTTP requests to specific Web application examples, the Web application sub-clusters are selected according to the routing policies of the URL routing configuration component during forwarding, and the Web application examples are selected according to the load balancing policies.
The URL routing configuration and the load balancing policy configuration can be configured on a centralized server, so that when a plurality of gateways are deployed, data can be pulled from the centralized configuration server. Changing the configuration on a centralized configuration server is effected on all gateways. The URL routing configuration component and the load balancing policy configuration component can be packaged with a gateway for deployment, and can also be deployed independently. When the gateway is deployed independently, the gateway and the gateway are deployed on the same server, and the gateway forwards the request to the load balancing component through the local Socket and then forwards the request to the target server through the load balancing component.
Fig. 7 illustrates an exemplary system architecture 700 to which the application modular integration method or application modular integration apparatus of embodiments of the present invention may be applied.
As shown in fig. 7, a system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 is the medium used to provide communication links between the terminal devices 701, 702, 703 and the server 705. The network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 705 via the network 704 using the terminal devices 701, 702, 703 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc., may be installed on the terminal devices 701, 702, 703.
The terminal devices 701, 702, 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server providing support for shopping-type websites browsed by the user using the terminal devices 701, 702, 703. The background management server can analyze and the like the received data such as the product information inquiry request and the like, and feed back the processing result such as target push information to the terminal equipment.
It should be noted that, the application modular integration method provided by the embodiment of the present invention is generally executed by the server 705, and accordingly, the application modular integration device is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
According to an embodiment of the invention, the invention further provides an electronic device and a computer readable medium.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the application modularization integration method provided by the embodiment of the invention.
The computer readable medium of the embodiment of the present invention stores a computer program thereon, and when the program is executed by a processor, the application modularization integration method provided by the embodiment of the present invention is implemented.
Referring now to FIG. 8, there is illustrated a schematic diagram of a computer system 800 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 8 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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. In the context of this document, a computer 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. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts 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 unit, 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 or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present invention may be implemented in software or in hardware. The described units may also be provided in a processor, for example, described as: a processor, comprising: the device comprises a receiving unit, a configuration unit and a gateway unit. The names of these units do not in any way constitute a limitation of the unit itself, for example, the receiving unit may also be described as "unit for receiving a data transmission request".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: s301, receiving a data transmission request, wherein the data transmission request comprises a URL path or an address; s302, determining an application instance according to the URL path and a preset configuration strategy matched with the URL path; and S303, sending the data transmission request to the application instance through a gateway.
The embodiment of the invention can control the forwarding of the data transmission request in a fine granularity mode based on the gateway technology and the configuration strategy, can realize the modularized integration of large-scale Web application, provides service for the Web application through the gateway, is called in a plurality of pages and has no cross-domain problem, and solves the cross-domain data sharing problem of the existing system. Meanwhile, development, testing and deployment can be realized by taking a single page as a minimum unit, namely the pages are the minimum unit of integration, the pages are of a completely loose coupling structure, different technical routes can be adopted for different pages in the development stage, each page is supported to be deployed independently in the operation stage, and faults can be well isolated.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. An application modular integration method, comprising:
receiving a data transmission request, wherein the data transmission request comprises a URL path;
determining an application instance according to the URL path and a preset configuration strategy matched with the URL path; the configuration strategy comprises a routing strategy and a load balancing strategy; wherein, determining an application instance according to the URL path and a preset configuration policy matched with the URL path includes: determining an application sub-cluster from the application clusters according to the URL path and the routing strategy; the application cluster comprises a plurality of application sub-clusters; determining an application instance from the application sub-cluster according to the URL path and the load balancing strategy;
and sending the data transmission request to the application instance through a gateway.
2. The method of claim 1, wherein determining an application sub-cluster from the application clusters based on the URL path and routing policy comprises:
matching the URL path with the child node of the tree structure; the tree structure is obtained by conversion according to a routing strategy, and each child node of the tree structure comprises URL path information and identification information of an application cluster;
and if the URL path is successfully matched with the URL path information of the child node, taking the application cluster corresponding to the child node as a target sub-cluster, thereby determining the application sub-cluster.
3. The method of claim 2, wherein determining an application sub-cluster from the application clusters based on the URL path and routing policy, further comprises:
if the URL path is failed to be matched with the URL path information of the child node, matching the URL path with the URL path information of the next child node of the child node;
if the URL path is successfully matched with the URL path information of the next-level sub-node of the sub-node, an application cluster corresponding to the next-level sub-node of the sub-node is used as a target sub-cluster, so that the application sub-cluster is determined; if the URL path is failed to be matched with the URL path information of the next-stage child node of the child node, the application cluster corresponding to the child node is taken as a target child cluster, and therefore the application child cluster is determined.
4. An application modular integrated device, comprising: the device comprises a receiving unit, a configuration unit and a gateway unit;
the receiving unit is used for: receiving a data transmission request, wherein the data transmission request comprises a URL path;
the configuration unit is used for: determining an application instance according to the URL path and a preset configuration strategy matched with the URL path; the configuration strategy comprises a routing strategy and a load balancing strategy; wherein the configuration unit is further configured to: determining an application sub-cluster from the application clusters according to the URL path and the routing strategy; the application cluster comprises a plurality of application sub-clusters; determining an application instance from the application sub-cluster according to the URL path and the load balancing strategy;
the gateway unit is configured to: and sending the data transmission request to the application instance through a gateway.
5. The apparatus of claim 4, wherein the configuration unit is further configured to:
matching the URL path with the child node of the tree structure; the tree structure is obtained by conversion according to a routing strategy, and each child node of the tree structure comprises URL path information and identification information of an application cluster;
and if the URL path is successfully matched with the URL path information of the child node, taking the application cluster corresponding to the child node as a target sub-cluster, thereby determining the application sub-cluster.
6. The apparatus of claim 5, wherein the configuration unit is further configured to:
if the URL path is failed to be matched with the URL path information of the child node, matching the URL path with the URL path information of the next child node of the child node;
if the URL path is successfully matched with the URL path information of the next-level sub-node of the sub-node, an application cluster corresponding to the next-level sub-node of the sub-node is used as a target sub-cluster, so that the application sub-cluster is determined; if the URL path is failed to be matched with the URL path information of the next-stage child node of the child node, the application cluster corresponding to the child node is taken as a target child cluster, and therefore the application child cluster is determined.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-3.
8. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-3.
CN201810472314.XA 2018-05-17 2018-05-17 Application modularization integration method and device Active CN110505074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810472314.XA CN110505074B (en) 2018-05-17 2018-05-17 Application modularization integration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810472314.XA CN110505074B (en) 2018-05-17 2018-05-17 Application modularization integration method and device

Publications (2)

Publication Number Publication Date
CN110505074A CN110505074A (en) 2019-11-26
CN110505074B true CN110505074B (en) 2023-06-23

Family

ID=68583914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810472314.XA Active CN110505074B (en) 2018-05-17 2018-05-17 Application modularization integration method and device

Country Status (1)

Country Link
CN (1) CN110505074B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111526034B (en) * 2020-03-04 2022-09-30 平安科技(深圳)有限公司 Route centralized management method, device, electronic device and storage medium
CN113778464A (en) * 2020-08-07 2021-12-10 北京沃东天骏信息技术有限公司 Small program gray scale publishing method and device
CN112804373B (en) * 2020-12-30 2022-10-14 微医云(杭州)控股有限公司 Interface domain name determining method and device, electronic equipment and storage medium
CN114401319B (en) * 2022-01-17 2024-05-10 星环信息科技(上海)股份有限公司 Request processing method, device, server and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09146962A (en) * 1995-11-16 1997-06-06 Nippon Telegr & Teleph Corp <Ntt> Method and device for supporting information space access
US6112242A (en) * 1996-07-10 2000-08-29 Uln Corporation System and method for dynamic data interaction in a hypertext data processing system
CN104735174A (en) * 2015-03-30 2015-06-24 北京奇艺世纪科技有限公司 HTTP transparent proxy implementing method and device
US9456050B1 (en) * 2011-04-11 2016-09-27 Viasat, Inc. Browser optimization through user history analysis
CN106716403A (en) * 2014-07-01 2017-05-24 埃夫里蒙多有限责任公司 Automated generation of web site entry pages
CN106878434A (en) * 2017-02-28 2017-06-20 杭州迪普科技股份有限公司 A kind of method and device of redirection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9531736B1 (en) * 2012-12-24 2016-12-27 Narus, Inc. Detecting malicious HTTP redirections using user browsing activity trees

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09146962A (en) * 1995-11-16 1997-06-06 Nippon Telegr & Teleph Corp <Ntt> Method and device for supporting information space access
US6112242A (en) * 1996-07-10 2000-08-29 Uln Corporation System and method for dynamic data interaction in a hypertext data processing system
US9456050B1 (en) * 2011-04-11 2016-09-27 Viasat, Inc. Browser optimization through user history analysis
CN106716403A (en) * 2014-07-01 2017-05-24 埃夫里蒙多有限责任公司 Automated generation of web site entry pages
CN104735174A (en) * 2015-03-30 2015-06-24 北京奇艺世纪科技有限公司 HTTP transparent proxy implementing method and device
CN106878434A (en) * 2017-02-28 2017-06-20 杭州迪普科技股份有限公司 A kind of method and device of redirection

Also Published As

Publication number Publication date
CN110505074A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN110505074B (en) Application modularization integration method and device
US10491523B2 (en) Load distribution in data networks
CN111294415B (en) Domain name resolution method and device
CN110581890B (en) Routing method and device for service request
US10404657B2 (en) Method and device for accessing website
US8554980B2 (en) Triggered notification
CN103179192A (en) Method, system and NAT (network address translation) for forwarding message about virtual server migration
CN102314469A (en) Method for implementing cross-domain request callback
CN111767157B (en) Request processing method and device based on service grid
CN108737343B (en) Method and device for realizing secure access to network
CN108737471B (en) Network access method and device
US20210314371A1 (en) Network-based media processing (nbmp) workflow management through 5g framework for live uplink streaming (flus) control
CN110798495B (en) Method and server for end-to-end message push in cluster architecture mode
CN106330994A (en) User message publishing method and system
CN113079098B (en) Method, device, equipment and computer readable medium for updating route
CN113778499B (en) Method, apparatus, device and computer readable medium for publishing services
CN113452600A (en) Cross-region message communication method and device, electronic equipment and storage medium
US10904327B2 (en) Method, electronic device and computer program product for searching for node
CN111190664A (en) Method and system for generating page
CN110247847B (en) Method and device for back source routing between nodes
CN111382953A (en) Dynamic process generation method and device
CN115665026A (en) Cluster networking method and device
CN114760360B (en) Request response method, request response device, electronic equipment and computer readable storage medium
US11811884B1 (en) Topic subscription provisioning for communication protocol
CN115442129A (en) Method, device and system for managing cluster access authority

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant