Method for realizing dynamic change of micro-service routing based on memory database and storage medium

A database and micro-service technology, applied in the direction of database update, data exchange network, structured data retrieval, etc., can solve the problems of not providing routing data persistence solutions, not providing routing data dynamic management solutions, etc., to simplify development work, Facilitate maintenance and ensure continuous operation

Inactive Publication Date: 2021-03-26
SHANDONG UNIV
View PDF8 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] At present, the traditional microservice routing system or product does not provide a dynamic management solution for routing data, nor does it provide a persistence solution for routing data. All its data comes from in

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for realizing dynamic change of micro-service routing based on memory database and storage medium
  • Method for realizing dynamic change of micro-service routing based on memory database and storage medium
  • Method for realizing dynamic change of micro-service routing based on memory database and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] A method for dynamically changing microservice routes based on an in-memory database. The implementation architecture of the method includes local routers, remote routers, routing information management service units, local databases or file systems, local routers, remote routers, and routing information. The management service unit is connected cyclically in turn, and the routing information management service unit is connected to the local database or file system; the remote routing terminal is used to cache routing information; the routing information management service unit is used to provide an interface for updating routing information, publish routing information, and publish The final routing information is persisted to the local database or file system; for example figure 1 shown.

[0039] Refers to: update the published routing information to the remote routing terminal in real time. The routing information includes routing data and its corresponding version n...

Embodiment 2

[0041] According to a method for implementing dynamic change of microservice routing based on an in-memory database described in Embodiment 1, the difference lies in:

[0042] The API gateway based on Spring Cloud Gateway 2.2.3.RELEASE (an API gateway open source component) is used as the local routing end, and it needs to be combined with the remote routing end Memcached (a memory database) and routing information management services to realize routing data dynamics The changed function, the specific flow diagram is as follows figure 2 , image 3 shown, including the following steps:

[0043] (1) Create a new microservice in the microservice routing system, and introduce Spring Cloud Gateway2.2.3.RELEASE, based on this, create an API gateway service as a local routing end, and at the same time, according to the Spring CloudGateway 2.2.3.RELEASE version Routing data model, create a corresponding routing data model in the routing information management service.

[0044] (2)...

Embodiment 3

[0084] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for realizing dynamic change of microservice routing based on an in-memory database in Embodiment 1 or 2 are implemented.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a method for realizing dynamic change of micro-service routing based on a memory database, and a storage medium, and the realization architecture comprises a local routing end, a remote routing end, a routing information management service unit, and a local database or a file system, and comprises the following steps: released routing information is updated to the remote routing end in real time; and the local routing end regularly pulls the routing information from the remote routing end and compares the routing information with the version number in the routing information in the local routing end, if the routing information is inconsistent with the version number in the routing information in the local routing end, the routing information in the local routing end is updated, the routing configuration is enabled to take effect, the dynamic change of the micro-service routing is realized, and otherwise, the routing information is continuously and regularly pulled from the remote routing end. The situation that configuration files or codes need to be modified and the routing system needs to be restarted for updating the routing information in a traditionalmicro-service routing system is changed, dynamic change and effectiveness of the routing information in the micro-service routing system are supported, the configuration files and the codes do not need to be written, and the routing system does not need to be restarted.

Description

technical field [0001] The invention relates to a method and a storage medium for realizing dynamic change of microservice routing based on an in-memory database, and belongs to the technical field of microservice routing in microservice / distributed systems. Background technique [0002] Distributed system refers to dividing a large system into multiple business modules, which are deployed on different machines, and data interaction between each business module through the interface. The subtle difference between microservices and distributed services is that the application of microservices is not necessarily scattered on multiple servers, but it can also be the same server. The architecture of distributed and microservices is very similar, but the deployment method is different. Distributed systems focus on dispersing the pressure of the entire system, while microservice systems focus on dispersing the capabilities of the entire system. [0003] Microservices architecture...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04L12/751H04L12/24G06F16/2455G06F16/23H04L45/02
CPCH04L45/02H04L41/50G06F16/24552G06F16/2365
Inventor 贾坤戴鸿君孙岩刘至理
Owner SHANDONG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products