Distributed global serial number implementation method and sequence dispatcher

A serial number and distributor technology, applied in the field of distributed global serial number implementation method and serial distributor, can solve the problem of large workload of coding and configuration, and achieve the effect of low workload

Pending Publication Date: 2020-11-17
BANK OF CHINA
View PDF0 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The current mainstream solutions include Snowflake Algorithm, Redis Global Cache, etc. Snowflake Algorithm needs to be developed and deployed in combination with applications that requir

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
  • Distributed global serial number implementation method and sequence dispatcher
  • Distributed global serial number implementation method and sequence dispatcher
  • Distributed global serial number implementation method and sequence dispatcher

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments and descriptions of the present invention are used to explain the present invention, but not to limit the present invention.

[0023] The embodiment of the present invention provides a method for implementing a distributed global serial number, which is applied to at least one serial distributor in a distributed system, such as figure 1 As shown, the distributed system also includes a database and a sequence client, and the sequence distributor is connected to the database and the sequence client respectively. The application accesses the global sequence acquisition service through the sequence client. There are multiple sequence distributors in the global sequence acquisition service. The nu...

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 discloses a distributed global serial number implementation method and a sequence dispatcher. The method is applied to at least one sequence dispatcher in a distributed system, the distributed system further comprises a database and a sequence client, and the sequence dispatcher is connected with the database and the sequence client. The method comprises the steps that when the sequence dispatcher does not obtain a sequence from the database for the first time, sequence attributes and current sequence values of the sequence with the same ID are obtained from the database according to the ID of the sequence which is dispatched for the last time, wherein the sequence attributes comprise the sequence maximum value, the sequence minimum value, the step length, the cache number and whether circulation is supported or not; a sequence number is generated according to the sequence attribute and the sequence current value; and when a serial number distribution request of the sequence client is received, the generated serial numbers are distributed to the sequence client. The invention can provide a global serial number implementation scheme with low coding and configuration workload.

Description

technical field [0001] The invention relates to the technical field of distributed architecture, in particular to a method for realizing a distributed global serial number and a serial distributor. Background technique [0002] This section is intended to provide a background or context to embodiments of the invention that are recited in the claims. The descriptions herein are not admitted to be prior art by inclusion in this section. [0003] Under the distributed architecture, the problem of how to generate the unique serial number is a problem that is often encountered when designing various applications in a system, especially when the database uses sub-databases and sub-tables. When the database is divided into several sub-tables, how to quickly obtain a unique serial number for each table data in each sub-table is a problem that needs to be considered. [0004] The current mainstream solutions include Snowflake Algorithm, Redis Global Cache, etc. Snowflake Algorithm ...

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): G06F16/27G06F16/21
CPCG06F16/27G06F16/21
Inventor 钱峰
Owner BANK OF CHINA
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