Supercharge Your Innovation With Domain-Expert AI Agents!

Method for persisting data into memory database in request log form

A database and persistence technology, which is applied in the direction of data error detection, electrical digital data processing, special data processing applications, etc., can solve the problems of complex use, complex data relationship, and traditional database complexity.

Pending Publication Date: 2022-02-15
上海那一科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, complex data relationships cannot be described by relational models or key-value pairs
In this case, using a traditional database becomes especially complicated
[0003] In addition, the data of the traditional database is stored in the file, and the operation on the data must pass the file I / O, and the speed is relatively slow.
Traditional databases are often equipped with a series of data management programs, and data operations need to pass through these management programs, which are more complicated to use
[0004] Traditional in-memory database persistence generally adopts two methods, one is to store data in disk, and the other is to record data in logs. These two methods are not suitable for processing data with complex structures or user-defined structures.

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 persisting data into memory database in request log form
  • Method for persisting data into memory database in request log form
  • Method for persisting data into memory database in request log form

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] In a specific embodiment 1, such as figure 1 As shown, a method for persisting data to an in-memory database in the form of a request log includes the following steps,

[0035] A, Server startup; in this step the server starts running.

[0036] B. The server receives the client request;

[0037] C. The server side processes the request and obtains or modifies the data in the memory database; the server side processes the request sent by the client, and processing the request may need to obtain data from the memory database or modify the data in the memory database. If the request is unsuccessful, proceed to step B; if the request is a GET request, the data in the memory database has not been modified, and proceed to step B. If the request is successful and not a GET request, step D is performed.

[0038] D. The server side records the request in step C into a log.

[0039] The output result in this embodiment is a log file, which can be used for recovery of the memo...

Embodiment 2

[0042] In a preferred embodiment 2, such as figure 2 As shown, a method for persisting data to an in-memory database in the form of a request log includes the following steps,

[0043] A, Server startup; in this step the server starts running.

[0044] E, recover data from the log. In this step, the server side reads the log file, and rebuilds the database in memory according to the log.

[0045] B. The server receives the client request;

[0046] C. The server side processes the request and obtains or modifies the data in the memory database; the server side processes the request sent by the client, and processing the request may need to obtain data from the memory database or modify the data in the memory database. If the request is unsuccessful, proceed to step B; if the request is a GET request, the data in the memory database has not been modified, and proceed to step B. If the request is successful and not a GET request, step D is performed.

[0047] D. The server ...

Embodiment 3

[0051] In a preferred embodiment 3, such as figure 2 and image 3 As shown, A, the server starts; in this step, the server starts to run.

[0052] E, recover data from the log. In this step, the server side reads the log file, and rebuilds the database in memory according to the log.

[0053] E1, open the log file; first open the log file, if it fails, then end step E, if it succeeds, then continue to execute step E2.

[0054] E2, read a line of requests; first read a line of requests from the log file, if EOF (end of document) occurs, then end step E, if EOF does not occur, then continue to execute step E3.

[0055] E3, the server replays the request and continues to execute E2. The server processes the read request in step E2 and generates data in the memory database.

[0056] B. The server receives the client request;

[0057] C. The server side processes the request and obtains or modifies the data in the memory database; the server side processes the request sent b...

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 provides a method for persisting data into a memory database in a request log form. The method comprises the following steps: A, starting a server; B, enabling the server side to receive a client side request; C, enabling the server side to process the request and obtains or modifies data in the memory database; and D, recording the request in a log by the server side. The method has the beneficial effects that the persistence of the data with the complex structure can be simplified, and the method is suitable for processing the data with the complex structure or the structure customized by a user.

Description

technical field [0001] The invention relates to the field of computer software, in particular to a method for persisting data in a memory database in the form of a request log. Background technique [0002] There are two types of traditional databases: relational and non-relational. Relational databases use a relational model to organize and store data, while non-relational databases organize and store data in the form of key-value pairs. However, complex data relationships cannot be described by relational models or key-value pairs. In this case, working with traditional databases becomes especially complicated. [0003] In addition, data in traditional databases is stored in files, and operations on data must be performed through file I / O, which is slow. Traditional databases are often equipped with a series of data management programs, and data operations need to go through these management programs, which are more complicated to use. [0004] Traditional in-memory da...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/18G06F11/14
CPCG06F16/1815G06F11/1471
Inventor 贾枭孙振东
Owner 上海那一科技有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More