CN115208884B - Local and cloud network communication method - Google Patents
Local and cloud network communication method Download PDFInfo
- Publication number
- CN115208884B CN115208884B CN202210824358.0A CN202210824358A CN115208884B CN 115208884 B CN115208884 B CN 115208884B CN 202210824358 A CN202210824358 A CN 202210824358A CN 115208884 B CN115208884 B CN 115208884B
- Authority
- CN
- China
- Prior art keywords
- original application
- cloud
- pro
- application program
- proxy
- 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
Links
- 230000006854 communication Effects 0.000 title claims abstract description 38
- 238000004891 communication Methods 0.000 title claims abstract description 24
- 238000000034 method Methods 0.000 title claims abstract description 21
- 230000005540 biological transmission Effects 0.000 claims description 15
- 230000005577 local transmission Effects 0.000 claims description 12
- 238000012544 monitoring process Methods 0.000 claims description 8
- 230000009191 jumping Effects 0.000 claims 1
- 238000011161 development Methods 0.000 abstract description 12
- 230000008569 process Effects 0.000 abstract description 5
- 230000010354 integration Effects 0.000 abstract description 4
- 230000002457 bidirectional effect Effects 0.000 abstract 1
- 238000010276 construction Methods 0.000 abstract 1
- 230000006399 behavior Effects 0.000 description 8
- 238000011144 upstream manufacturing Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3698—Environments for analysis, debugging or testing of software
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明属于网络通信技术领域,具体涉及一种本地和云端网络通信的方法。The invention belongs to the technical field of network communication, and in particular relates to a method for local and cloud network communication.
背景技术Background technique
目前,本地应用程序开发方式为:1)本地开发应用程序的编码;2)通过推送、合并、持续集成方式,将本地开发的应用程序编码复制到云端,在云端借助线上数据库中间件、微服务、缓存等,对应用程序进行运行和调试。其中,在云端运行和调试应用程序的过程中,需要不断访问云端的线上数据库中间件、微服务、缓存等。At present, the local application development methods are: 1) coding of locally developed applications; 2) copying locally developed application codes to the cloud through push, merge, and continuous integration, and using online database middleware, micro Service, cache, etc., to run and debug the application. Among them, in the process of running and debugging applications in the cloud, it is necessary to continuously access the online database middleware, microservices, cache, etc. in the cloud.
以上应用程序开发方式,存在以下问题:由于本地和云端网络不互联,因此,对开发完成的应用程序进行运行和调试时,只可以在云端进行运行和调试,无法在本地调试,具有较大的使用局限性;由于本地无法运行和调试应用程序,具有开发过程繁琐,浪费时间,效率低下等问题。The above application development methods have the following problems: Since the local and cloud networks are not interconnected, when the developed application is run and debugged, it can only be run and debugged in the cloud, and cannot be debugged locally, which has a large Limitations of use; due to the inability to run and debug applications locally, the development process is cumbersome, time-wasting, and inefficient.
发明内容Contents of the invention
针对现有技术存在的缺陷,本发明提供一种本地和云端网络通信的方法,可有效解决上述问题。Aiming at the defects existing in the prior art, the present invention provides a method for local and cloud network communication, which can effectively solve the above problems.
本发明采用的技术方案如下:The technical scheme that the present invention adopts is as follows:
本发明提供一种本地和云端网络通信的方法,包括以下步骤:The present invention provides a method for local and cloud network communication, comprising the following steps:
步骤1,代理服务端和云端跳板机建立并保持向上代理隧道和向下代理隧道的连接;Step 1, the proxy server and the cloud springboard machine establish and maintain the connection between the upward proxy tunnel and the downward proxy tunnel;
具体的,代理服务端启动时,开启代理服务端的三个端口和云端跳板机的三个端口;其中,代理服务端的三个端口分别为:服务端上行代理端口(S1)、服务端下行监听端口(S2)和服务端上行代理端口(S3);云端跳板机的三个端口分别为:跳板机上行监听端口(C1)、跳板机下行代理端口(C2)和跳板机下行监听端口(C3);Specifically, when the proxy server is started, the three ports of the proxy server and the three ports of the cloud springboard are opened; among them, the three ports of the proxy server are respectively: the uplink proxy port (S1) of the server, and the downlink listening port of the server (S2) and server uplink proxy port (S3); the three ports of the cloud springboard machine are: springboard machine uplink listening port (C1), springboard machine downlink proxy port (C2) and springboard machine downlink listening port (C3);
绑定服务端上行代理端口(S1)和跳板机上行监听端口(C1),从而建立向上代理隧道;绑定服务端下行监听端口(S2)和跳板机下行代理端口(C2),从而建立向下代理隧道;Bind the upstream proxy port (S1) of the server and the upstream listening port (C1) of the springboard machine to establish an upward proxy tunnel; bind the downstream listening port (S2) of the server and the downstream proxy port (C2) of the springboard machine to establish a downward proxy tunnel proxy tunnel;
步骤2,本地开发的每个原始应用程序均绑定唯一对应的字节码增强插件;将任意原始应用程序表示为:原始应用程序Pro,将原始应用程序Pro绑定的字节码增强插件表示为:字节码增强插件AE(Pro);Step 2, each original application developed locally is bound with a unique corresponding bytecode enhancement plug-in; any original application is represented as: original application Pro, and the bytecode enhancement plug-in bound to the original application Pro is represented For: bytecode enhancement plug-in AE (Pro);
每当原始应用程序Pro启动时,执行以下两个行为:Whenever the original app Pro starts, the following two behaviors are performed:
行为1:原始应用程序Pro向注册中心发送本地原始应用程序的注册请求;其中,所述注册请求中包含所述原始应用程序Pro的通信地址;Behavior 1: The original application program Pro sends a registration request of the local original application program to the registration center; wherein, the registration request includes the communication address of the original application program Pro;
所述字节码增强插件AE(Pro)拦截所述注册请求,并将所述注册请求发送给所述注册中心,由所述注册中心记录该原始应用程序Pro的通信地址;The bytecode enhancement plug-in AE (Pro) intercepts the registration request, and sends the registration request to the registration center, and the registration center records the communication address of the original application program Pro;
行为2:所述字节码增强插件AE(Pro)与所述代理服务端的服务端上行代理端口(S3)之间建立向上代理本地隧道;Behavior 2: Establish an upward proxy local tunnel between the bytecode enhancement plug-in AE (Pro) and the server uplink proxy port (S3) of the proxy server;
步骤3,原始应用程序Pro向云端网络发送消息的通信过程:Step 3, the communication process of the original application program Pro sending a message to the cloud network:
步骤3.1,在原始应用程序Pro运行的整个生命周期中,当所述原始应用程序Pro发送网络请求消息时,均被所述字节码增强插件AE(Pro)拦截;Step 3.1, during the entire life cycle of the original application program Pro running, when the original application program Pro sends a network request message, it is intercepted by the bytecode enhancement plug-in AE (Pro);
步骤3.2,所述字节码增强插件AE(Pro)判断拦截到的所述网络请求消息的类型,如果是对本地资源的请求消息,则直接转发到本地目的地址;如果是对云端网络资源的网络请求消息,则所述字节码增强插件AE(Pro)将所述网络请求消息通过已建立的向上代理本地隧道,发送给所述代理服务端;Step 3.2, the bytecode enhancement plug-in AE (Pro) judges the type of the intercepted network request message, if it is a request message to a local resource, it is directly forwarded to the local destination address; if it is a request message to a cloud network resource network request message, then the bytecode enhancement plug-in AE (Pro) sends the network request message to the proxy server through the established upward proxy local tunnel;
步骤3.3,所述代理服务端通过已建立的向上代理隧道,将所述网络请求消息发送给所述云端跳板机;Step 3.3, the proxy server sends the network request message to the cloud springboard machine through the established upward proxy tunnel;
步骤3.4,所述云端跳板机将所述网络请求消息发送给云端网络,由此实现原始应用程序Pro向云端网络发送消息的通信过程;Step 3.4, the cloud springboard machine sends the network request message to the cloud network, thereby realizing the communication process of the original application program Pro sending a message to the cloud network;
步骤4,云端网络访问原始应用程序Pro的通信过程:Step 4, the communication process of the cloud network accessing the original application Pro:
步骤4.1,当云端网络需要访问原始应用程序Pro时,云端网络查找所述注册中心,获得需访问的原始应用程序Pro的通信地址;Step 4.1, when the cloud network needs to access the original application program Pro, the cloud network searches the registration center to obtain the communication address of the original application program Pro to be accessed;
步骤4.2,云端网络与云端跳板机的跳板机下行监听端口(C3)建立临时云端传输隧道,通过临时云端传输隧道,向云端跳板机发送对原始应用程序Pro的访问请求;Step 4.2, the cloud network establishes a temporary cloud transmission tunnel with the downlink monitoring port (C3) of the cloud springboard machine, and sends an access request to the original application program Pro to the cloud springboard machine through the temporary cloud transmission tunnel;
步骤4.3,云端跳板机通过已建立的向下代理隧道,向代理服务端转发对原始应用程序Pro的访问请求;Step 4.3, the cloud springboard machine forwards the access request to the original application program Pro to the proxy server through the established downward proxy tunnel;
步骤4.4,代理服务端接收到对原始应用程序Pro的访问请求时,根据原始应用程序Pro的通信地址,建立代理服务端到原始应用程序Pro的临时本地传输隧道,通过临时本地传输隧道,将访问请求发送给原始应用程序Pro,然后,代理服务端关闭临时本地传输隧道,同时,通知云端跳板机关闭临时云端传输隧道,实现云端网络访问原始应用程序Pro的通信过程。Step 4.4, when the proxy server receives an access request to the original application Pro, it establishes a temporary local transmission tunnel from the proxy server to the original application Pro according to the communication address of the original application Pro, and through the temporary local transmission tunnel, the access The request is sent to the original application Pro, and then the proxy server closes the temporary local transmission tunnel, and at the same time, notifies the cloud springboard to close the temporary cloud transmission tunnel, so as to realize the communication process of the cloud network accessing the original application Pro.
优选的,云端网络包括微服务、数据库、消息队列和缓存。Preferably, the cloud network includes microservices, databases, message queues and caches.
优选的,所述微服务配置有微服务字节码增强插件;Preferably, the microservice is configured with a microservice bytecode enhancement plug-in;
当所述微服务发起请求时,该请求被所述微服务字节码增强插件拦截,所述微服务字节码增强插件判断该请求的类型,如果是对云端网络中其他设备的请求,则直接转发给目的设备;如果是对本地应用的请求,则将所述请求转发给所述云端跳板机。When the microservice initiates a request, the request is intercepted by the microservice bytecode enhancement plug-in, and the microservice bytecode enhancement plug-in judges the type of the request. If it is a request to other devices in the cloud network, then directly forward to the destination device; if it is a request for a local application, then forward the request to the cloud springboard machine.
优选的,当原始应用程序Pro需要退出时,在退出前执行以下两个行为:Preferably, when the original application Pro needs to exit, perform the following two actions before exiting:
行为1:原始应用程序Pro向注册中心发送删除注册信息的请求;所述字节码增强插件AE(Pro)拦截所述删除注册信息的请求,并将所述删除注册信息的请求发送给所述注册中心,使所述注册中心删除该原始应用程序Pro的注册信息;Behavior 1: The original application program Pro sends a request to delete registration information to the registration center; the bytecode enhancement plug-in AE (Pro) intercepts the request to delete registration information, and sends the request to delete registration information to the The registration center, causing the registration center to delete the registration information of the original application program Pro;
行为2:所述代理服务端关闭所述字节码增强插件AE(Pro)与所述代理服务端的之间的所述向上代理本地隧道。Behavior 2: The proxy server closes the upward proxy local tunnel between the bytecode enhancement plug-in AE (Pro) and the proxy server.
本发明提供的本地和云端网络通信的方法,具有以下优点:The method for local and cloud network communication provided by the present invention has the following advantages:
(1)通过使用各种隧道,实现本地应用访问云端网络,以及云端网络访问本地应用,因此,软件开发人员在本地即可完成应用程序的开发和不断调试过程,享受到本地和云端网络无差别的开发体验。(1) Through the use of various tunnels, the local application can access the cloud network, and the cloud network can access the local application. Therefore, software developers can complete the application development and continuous debugging process locally, and enjoy no difference between the local and cloud networks development experience.
(2)提升开发效率:由于本地可直接连接云端网络,开发人员免持续集成即可运行程序,节省大量的构建、发布时间,将更多时间投入到程序业务本身上来。(2) Improve development efficiency: Since the local area can be directly connected to the cloud network, developers can run the program without continuous integration, saving a lot of time for building and publishing, and investing more time in the program business itself.
(3)提升调试效率:开发人员可以直接在本地运行应用程序,并实时调试修复。(3) Improve debugging efficiency: Developers can directly run applications locally and debug and repair them in real time.
(4)线上问题精准定位:利用代理服务端的“向下代理”功能,可以很方便的将线上已经运行的程序请求转发到本地,可在不停机的前提下,快速精准的定位到线上问题。(4) Precise positioning of online problems: Using the "downward proxy" function of the proxy server, it is very convenient to forward the program requests that have been running online to the local, and quickly and accurately locate the online problem without stopping the machine. on the question.
附图说明Description of drawings
图1为本发明提供的一种本地和云端网络通信的方法的流程示意图。FIG. 1 is a schematic flowchart of a method for communicating between a local network and a cloud network provided by the present invention.
具体实施方式Detailed ways
为了使本发明所解决的技术问题、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the technical problems, technical solutions and beneficial effects solved by the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
参考图1,本发明提供一种本地和云端网络通信的方法,包括以下步骤:Referring to Fig. 1, the present invention provides a method for local and cloud network communication, comprising the following steps:
步骤1,代理服务端和云端跳板机建立并保持向上代理隧道和向下代理隧道的连接;Step 1, the proxy server and the cloud springboard machine establish and maintain the connection between the upward proxy tunnel and the downward proxy tunnel;
具体的,代理服务端启动时,开启代理服务端的三个端口和云端跳板机的三个端口;其中,代理服务端的三个端口分别为:服务端上行代理端口(S1)、服务端下行监听端口(S2)和服务端上行代理端口(S3);云端跳板机的三个端口分别为:跳板机上行监听端口(C1)、跳板机下行代理端口(C2)和跳板机下行监听端口(C3);Specifically, when the proxy server is started, the three ports of the proxy server and the three ports of the cloud springboard are opened; among them, the three ports of the proxy server are respectively: the uplink proxy port (S1) of the server, and the downlink listening port of the server (S2) and server uplink proxy port (S3); the three ports of the cloud springboard machine are: springboard machine uplink listening port (C1), springboard machine downlink proxy port (C2) and springboard machine downlink listening port (C3);
绑定服务端上行代理端口(S1)和跳板机上行监听端口(C1),从而建立向上代理隧道;绑定服务端下行监听端口(S2)和跳板机下行代理端口(C2),从而建立向下代理隧道;Bind the upstream proxy port (S1) of the server and the upstream listening port (C1) of the springboard machine to establish an upward proxy tunnel; bind the downstream listening port (S2) of the server and the downstream proxy port (C2) of the springboard machine to establish a downward proxy tunnel proxy tunnel;
步骤2,本地开发的每个原始应用程序均绑定唯一对应的字节码增强插件;将任意原始应用程序表示为:原始应用程序Pro,将原始应用程序Pro绑定的字节码增强插件表示为:字节码增强插件AE(Pro);Step 2, each original application developed locally is bound with a unique corresponding bytecode enhancement plug-in; any original application is represented as: original application Pro, and the bytecode enhancement plug-in bound to the original application Pro is represented For: bytecode enhancement plug-in AE (Pro);
每当原始应用程序Pro启动时,执行以下两个行为:Whenever the original app Pro starts, the following two behaviors are performed:
行为1:原始应用程序Pro向注册中心发送本地原始应用程序的注册请求;其中,所述注册请求中包含所述原始应用程序Pro的通信地址;通信地址包括但不限于应用程序名称、端口号、IP地址和应用程序版本号。Behavior 1: The original application program Pro sends a registration request of the local original application program to the registration center; wherein, the registration request contains the communication address of the original application program Pro; the communication address includes but is not limited to the application program name, port number, IP address and application version number.
所述字节码增强插件AE(Pro)拦截所述注册请求,并将所述注册请求发送给所述注册中心,由所述注册中心记录该原始应用程序Pro的通信地址;The bytecode enhancement plug-in AE (Pro) intercepts the registration request, and sends the registration request to the registration center, and the registration center records the communication address of the original application program Pro;
行为2:所述字节码增强插件AE(Pro)与所述代理服务端的服务端上行代理端口S3之间建立向上代理本地隧道;Behavior 2: Establish an upward proxy local tunnel between the bytecode enhancement plug-in AE (Pro) and the server uplink proxy port S3 of the proxy server;
步骤3,原始应用程序Pro向云端网络发送消息的通信过程:Step 3, the communication process of the original application program Pro sending a message to the cloud network:
本发明中,云端网络包括微服务、数据库、消息队列和缓存。原始应用程序Pro通过向微服务、数据库、消息队列或缓存发送消息,实现对微服务、数据库、消息队列或缓存的资源请求和资源访问。In the present invention, the cloud network includes microservices, databases, message queues and caches. The original application Pro implements resource requests and resource access to microservices, databases, message queues or caches by sending messages to microservices, databases, message queues or caches.
步骤3.1,在原始应用程序Pro运行的整个生命周期中,当所述原始应用程序Pro发送网络请求消息时,均被所述字节码增强插件AE(Pro)拦截;Step 3.1, during the entire life cycle of the original application program Pro running, when the original application program Pro sends a network request message, it is intercepted by the bytecode enhancement plug-in AE (Pro);
步骤3.2,所述字节码增强插件AE(Pro)判断拦截到的所述网络请求消息的类型,如果是对本地资源的请求消息,则直接转发到本地目的地址;如果是对云端网络资源的网络请求消息,则所述字节码增强插件AE(Pro)将所述网络请求消息通过已建立的向上代理本地隧道,发送给所述代理服务端;Step 3.2, the bytecode enhancement plug-in AE (Pro) judges the type of the intercepted network request message, if it is a request message to a local resource, it is directly forwarded to the local destination address; if it is a request message to a cloud network resource network request message, then the bytecode enhancement plug-in AE (Pro) sends the network request message to the proxy server through the established upward proxy local tunnel;
步骤3.3,所述代理服务端通过已建立的向上代理隧道,将所述网络请求消息发送给所述云端跳板机;Step 3.3, the proxy server sends the network request message to the cloud springboard machine through the established upward proxy tunnel;
步骤3.4,所述云端跳板机将所述网络请求消息发送给云端网络,由此实现原始应用程序Pro向云端网络发送消息的通信过程;Step 3.4, the cloud springboard machine sends the network request message to the cloud network, thereby realizing the communication process of the original application program Pro sending a message to the cloud network;
步骤4,云端网络访问原始应用程序Pro的通信过程:Step 4, the communication process of the cloud network accessing the original application Pro:
步骤4.1,当云端网络需要访问原始应用程序Pro时,云端网络查找所述注册中心,获得需访问的原始应用程序Pro的通信地址;Step 4.1, when the cloud network needs to access the original application program Pro, the cloud network searches the registration center to obtain the communication address of the original application program Pro to be accessed;
步骤4.2,云端网络与云端跳板机的跳板机下行监听端口C3建立临时云端传输隧道,通过临时云端传输隧道,向云端跳板机发送对原始应用程序Pro的访问请求;Step 4.2, the cloud network establishes a temporary cloud transmission tunnel with the downlink monitoring port C3 of the cloud springboard machine, and sends an access request to the original application program Pro to the cloud springboard machine through the temporary cloud transmission tunnel;
当云端网络为微服务时,可采用以下方式实现:When the cloud network is a microservice, it can be implemented in the following ways:
微服务配置有微服务字节码增强插件;The microservice configuration has a microservice bytecode enhancement plug-in;
当所述微服务发起请求时,该请求被所述微服务字节码增强插件拦截,所述微服务字节码增强插件判断该请求的类型,如果是对云端网络中其他设备的请求,则直接转发给目的设备;如果是对本地应用的请求,则将所述请求通过临时云端传输隧道转发给所述云端跳板机。When the microservice initiates a request, the request is intercepted by the microservice bytecode enhancement plug-in, and the microservice bytecode enhancement plug-in judges the type of the request. If it is a request to other devices in the cloud network, then directly forward to the destination device; if it is a request for a local application, then forward the request to the cloud springboard machine through a temporary cloud transmission tunnel.
步骤4.3,云端跳板机通过已建立的向下代理隧道,向代理服务端转发对原始应用程序Pro的访问请求;Step 4.3, the cloud springboard machine forwards the access request to the original application program Pro to the proxy server through the established downward proxy tunnel;
步骤4.4,代理服务端接收到对原始应用程序Pro的访问请求时,根据原始应用程序Pro的通信地址,建立代理服务端到原始应用程序Pro的临时本地传输隧道,通过临时本地传输隧道,将访问请求发送给原始应用程序Pro,然后,代理服务端关闭临时本地传输隧道,同时,通知云端跳板机关闭临时云端传输隧道,实现云端网络访问原始应用程序Pro的通信过程。Step 4.4, when the proxy server receives an access request to the original application Pro, it establishes a temporary local transmission tunnel from the proxy server to the original application Pro according to the communication address of the original application Pro, and through the temporary local transmission tunnel, the access The request is sent to the original application Pro, and then the proxy server closes the temporary local transmission tunnel, and at the same time, notifies the cloud springboard to close the temporary cloud transmission tunnel, so as to realize the communication process of the cloud network accessing the original application Pro.
本发明中,对于每一个原始应用程序,均绑定唯一对应的字节码增强插件,原始应用程序向外发出的每条请求,均会被字节码增强插件拦截,由字节码增强插件将对云端网络的请求,通过向上代理本地隧道发送给代理服务端;而对于原始应用程序接收到的每条请求,字节码增强插件不会拦截。In the present invention, for each original application program, a unique corresponding bytecode enhancement plug-in is bound, and each request sent out by the original application program will be intercepted by the bytecode enhancement plug-in, and the bytecode enhancement plug-in The request to the cloud network is sent to the proxy server through the upward proxy local tunnel; for each request received by the original application, the bytecode enhancement plug-in will not intercept it.
同样的,微服务也可配置一个微服务字节码增强插件,微服务向外发出的每条请求,均会被微服务字节码增强插件拦截,由微服务字节码增强插件将对本地应用的请求,通过临时云端传输隧道,发送给云端跳板机;而对于微服务接收到的每条请求,微服务字节码增强插件不会拦截。Similarly, microservices can also be configured with a microservice bytecode enhancement plug-in. Every request sent out by the microservice will be intercepted by the microservice bytecode enhancement plug-in, and the microservice bytecode enhancement plug-in will The application request is sent to the cloud springboard through the temporary cloud transmission tunnel; and for each request received by the microservice, the microservice bytecode enhancement plug-in will not intercept it.
本发明中,在代理服务端和云端跳板机启动后,代理服务端和云端跳板机之间的向上代理隧道和向下代理隧道,持续保持开启状态,用于代理服务端和云端跳板机之间传输请求。In the present invention, after the agent server and the cloud springboard machine are started, the upward agent tunnel and the downward agent tunnel between the agent server end and the cloud springboard machine are continuously kept open for use between the agent server end and the cloud springboard machine Transfer request.
对于字节码增强插件和代理服务端之间的向上代理本地隧道,在字节码增强插件绑定的原始应用程序的整个生命周期,均保持开启状态,因此,只要当原始应用程序需要请求云端网络时,即可快速通过已建立的向上代理本地隧道,向上发送请求。只有当原始应用程序退出下线时,才会关闭向上代理本地隧道,及时释放相应资源。For the up-proxy local tunnel between the bytecode enhancement plug-in and the proxy server, it remains open throughout the life cycle of the original application bound by the bytecode enhancement plug-in. Therefore, as long as the original application needs to request the cloud When connected to the network, the request can be sent upward quickly through the established upward proxy local tunnel. Only when the original application exits and goes offline, the up-proxy local tunnel will be closed and the corresponding resources will be released in time.
对于云端网络和云端跳板机之间的临时云端传输隧道,以及代理服务端和原始应用程序的临时本地传输隧道,这两条隧道的生命周期相同,当云端网络需要向某个原始应用程序发请求时,开启临时云端传输隧道和临时本地传输隧道;当本条请求传输完成时,关闭临时云端传输隧道和临时本地传输隧道,及时释放相应资源。For the temporary cloud transmission tunnel between the cloud network and the cloud springboard machine, and the temporary local transmission tunnel between the proxy server and the original application, the two tunnels have the same life cycle. When the cloud network needs to send a request to an original application , the temporary cloud transmission tunnel and the temporary local transmission tunnel are opened; when the transmission of this request is completed, the temporary cloud transmission tunnel and the temporary local transmission tunnel are closed, and the corresponding resources are released in time.
本发明提供的本地和云端网络通信的方法,具有以下优点:The method for local and cloud network communication provided by the present invention has the following advantages:
(1)通过使用各种隧道,实现本地应用访问云端网络,以及云端网络访问本地应用,因此,软件开发人员在本地即可完成应用程序的开发和不断调试过程,享受到本地和云端网络无差别的开发体验。(1) Through the use of various tunnels, the local application can access the cloud network, and the cloud network can access the local application. Therefore, software developers can complete the application development and continuous debugging process locally, and enjoy no difference between the local and cloud networks development experience.
(2)提升开发效率:由于本地可直接连接云端网络,开发人员免持续集成即可运行程序,节省大量的构建、发布时间,将更多时间投入到程序业务本身上来。(2) Improve development efficiency: Since the local area can be directly connected to the cloud network, developers can run the program without continuous integration, saving a lot of time for building and publishing, and investing more time in the program business itself.
(3)提升调试效率:开发人员可以直接在本地运行应用程序,并实时调试修复。(3) Improve debugging efficiency: Developers can directly run applications locally and debug and repair them in real time.
(4)线上问题精准定位:利用代理服务端的“向下代理”功能,可以很方便的将线上已经运行的程序请求转发到本地,可在不停机的前提下,快速精准的定位到线上问题。(4) Precise positioning of online problems: Using the "downward proxy" function of the proxy server, it is very convenient to forward the program requests that have been running online to the local, and quickly and accurately locate the online problem without stopping the machine. on the question.
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that, for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications can also be made. It should be regarded as the protection scope of the present invention.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210824358.0A CN115208884B (en) | 2022-07-13 | 2022-07-13 | Local and cloud network communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210824358.0A CN115208884B (en) | 2022-07-13 | 2022-07-13 | Local and cloud network communication method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115208884A CN115208884A (en) | 2022-10-18 |
CN115208884B true CN115208884B (en) | 2023-04-25 |
Family
ID=83580857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210824358.0A Active CN115208884B (en) | 2022-07-13 | 2022-07-13 | Local and cloud network communication method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115208884B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011103840A2 (en) * | 2011-04-19 | 2011-09-01 | 华为技术有限公司 | Virtual private cloud connection method and tunnel proxy server |
CN104243210A (en) * | 2014-09-17 | 2014-12-24 | 湖北盛天网络技术股份有限公司 | Method and system for remotely having access to administrative web pages of routers |
CN105376303A (en) * | 2015-10-23 | 2016-03-02 | 深圳前海达闼云端智能科技有限公司 | Docker implementation system and communication method thereof |
CN107483558A (en) * | 2017-07-27 | 2017-12-15 | 中兴软创科技股份有限公司 | A kind of high in the clouds platform is to AP configuration managements and the method to wireless terminal Access Control |
EP3699766A1 (en) * | 2019-02-25 | 2020-08-26 | Zcaler, Inc. | Systems and methods for monitoring, analyzing, and improving digital user experience |
CN113766019A (en) * | 2021-09-01 | 2021-12-07 | 江苏信臣健康科技股份有限公司 | Internet of things system based on combination of cloud and edge calculation |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019183522A1 (en) * | 2018-03-22 | 2019-09-26 | Akamai Technologies, Inc. | Traffic forwarding and disambiguation by using local proxies and addresses |
US11625280B2 (en) * | 2020-03-31 | 2023-04-11 | Bmc Software, Inc. | Cloud-native proxy gateway to cloud resources |
-
2022
- 2022-07-13 CN CN202210824358.0A patent/CN115208884B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011103840A2 (en) * | 2011-04-19 | 2011-09-01 | 华为技术有限公司 | Virtual private cloud connection method and tunnel proxy server |
CN104243210A (en) * | 2014-09-17 | 2014-12-24 | 湖北盛天网络技术股份有限公司 | Method and system for remotely having access to administrative web pages of routers |
CN105376303A (en) * | 2015-10-23 | 2016-03-02 | 深圳前海达闼云端智能科技有限公司 | Docker implementation system and communication method thereof |
CN107483558A (en) * | 2017-07-27 | 2017-12-15 | 中兴软创科技股份有限公司 | A kind of high in the clouds platform is to AP configuration managements and the method to wireless terminal Access Control |
EP3699766A1 (en) * | 2019-02-25 | 2020-08-26 | Zcaler, Inc. | Systems and methods for monitoring, analyzing, and improving digital user experience |
CN113766019A (en) * | 2021-09-01 | 2021-12-07 | 江苏信臣健康科技股份有限公司 | Internet of things system based on combination of cloud and edge calculation |
Non-Patent Citations (3)
Title |
---|
孙绵 ; 任安虎 ; 马健翔 ; .仓库远程实时视频监测系统研究设计.机械与电子.2017,(09),全文. * |
聂佳 ; 琚长江 ; 陈淑芳 ; .用于电机生产线的低成本远程调试系统的开发与应用.电机与控制应用.2019,(03),全文. * |
陈修环,石岩,王栋.增强使用TELNET协议的安全性.计算机工程与应用.1999,(02),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN115208884A (en) | 2022-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7975024B2 (en) | Virtual personal computer access over multiple network sites | |
US20200228433A1 (en) | Computer-readable recording medium including monitoring program, programmable device, and monitoring method | |
Ashok et al. | Leveraging service meshes as a new network layer | |
CN105959228B (en) | Traffic processing method and transparent cache system | |
US7313635B1 (en) | Method and apparatus for simulating a load on an application server in a network | |
CN113297133B (en) | Service migration quality guarantee method and system | |
CN103973785A (en) | Log reading system based on P2P and method thereof | |
Liu et al. | An open and scalable emulation infrastructure for large-scale real-time network simulations | |
CN115208884B (en) | Local and cloud network communication method | |
CN106953770B (en) | A lightweight network function virtualization system and virtualization method thereof | |
CN114489781A (en) | Method, device, device and storage medium for editing layout template in cloud platform | |
CN102104609B (en) | Method for analyzing safety defect of network protocol | |
Loesing et al. | Evaluation of a libutp-based Tor datagram implementation | |
Raza et al. | Highly available service access through proactive events execution in LTE NFV | |
Sukapuram et al. | Enhanced algorithms for consistent network updates | |
Huang et al. | Stateful traffic replay for web application proxies | |
Femminella et al. | Advanced caching for distributing sensor data through programmable nodes | |
CN116633832A (en) | Hypertext transfer security protocol test method, apparatus, software program and medium | |
Tsubouchi et al. | Low overhead TCP/UDP socket-based tracing for discovering network services dependencies | |
Kellaway | Accelerating the SCION IP Gateway using programmable data planes | |
CN118041819B (en) | Data processing method, device, equipment and computer readable storage medium | |
Xu et al. | State-Compute Replication: Parallelizing High-Speed Stateful Packet Processing | |
CN111510300A (en) | Data processing method, device, equipment and computer readable storage medium | |
McClurg | Correct-by-construction network programming for stateful data-planes | |
CN111385249A (en) | A Vulnerability Detection Method |
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 |