CN109491929A - A kind of data cached reading/writing method and system - Google Patents
A kind of data cached reading/writing method and system Download PDFInfo
- Publication number
- CN109491929A CN109491929A CN201811356110.6A CN201811356110A CN109491929A CN 109491929 A CN109491929 A CN 109491929A CN 201811356110 A CN201811356110 A CN 201811356110A CN 109491929 A CN109491929 A CN 109491929A
- Authority
- CN
- China
- Prior art keywords
- data
- reading
- clustered node
- read
- client
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0866—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
- G06F12/0868—Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A kind of data cached reading/writing method and system, comprising: receive reading and writing data using dynamic proxy and instruct;Controlling the dynamic proxy, the performance objective in destination client operates according to reading and writing data instruction;The destination client is single machine client and/or cluster client terminal, and the object run is to read data manipulation and/or data writing operation.Implement the embodiment of the present invention, it only needs to send to dynamic proxy and instruct, the read-write operation of data can be realized in single machine client using dynamic proxy, it can realize the read-write operation of data in cluster client terminal using dynamic proxy again, data cached read-write mode is simplified with this, improves the efficiency of data cached read-write.
Description
Technical field
The present invention relates to technical field of data storage more particularly to a kind of data cached reading/writing method and systems.
Background technique
Currently, existing cache mode includes single machine cache mode and cluster cache mode both of which, it is common, for
Data under single machine cache mode can only be written and read by single machine client, and only for the data under cluster cache mode
It can be written and read by cluster client terminal.In practice, it has been found that present data cached read-write had often both been related to single machine caching
Reading and writing data under mode further relates to the reading and writing data under cluster cache mode, at this time data cached read-write while needs pair
Single machine client and cluster client terminal are operated.As it can be seen that there is cumbersome, effects for current data cached read-write mode
The low problem of rate.
Summary of the invention
The embodiment of the present invention discloses a kind of data cached reading/writing method and system, can simplify the operation of data cached read-write
Process, and improve the efficiency of data cached read-write.
First aspect of the embodiment of the present invention discloses a kind of data cached reading/writing method, comprising:
Reading and writing data is received using dynamic proxy to instruct;
Controlling the dynamic proxy, the performance objective in destination client operates according to reading and writing data instruction;The mesh
Marking client is single machine client and/or cluster client terminal, and the object run is to read data manipulation and/or data writing operation.
As an alternative embodiment, in first aspect of the embodiment of the present invention, the control dynamic proxy
According to reading and writing data instruction, performance objective is operated in destination client, comprising:
Determine the destination client and object run that the reading and writing data instruction matches;
When the destination client is single machine client and the object run is to read data manipulation, in the single machine visitor
The reading data manipulation is executed in the end of family;
When the destination client is the single machine client and the object run is data writing operation, in the list
Write data operation is executed in machine client;
When the destination client is cluster client terminal and the object run is the reading data manipulation, in the collection
The reading data manipulation is executed in group's client;
When the destination client is the cluster client terminal and the object run is write data operation, in institute
It states and executes write data operation in cluster client terminal.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described in the cluster client terminal
It is middle to execute the reading data manipulation, comprising:
Obtain the bottom clustered node of the cluster client terminal;
Judge the target data read in the bottom clustered node with the presence or absence of the reading data operation instruction;
When judging to read the target data there are when the target data in the bottom clustered node;
When judging that the target data is not present in the bottom clustered node, judge in the bottom cluster section
It whether there is the target data in upper one layer of clustered node of point;
When judging to read the target data there are when the target data in upper one layer of clustered node;
When judging that the target data is not present in upper one layer of clustered node, by upper one layer of cluster section
Point is determined as the bottom clustered node, and executes the judgement in upper one layer of clustered node of the bottom clustered node
With the presence or absence of the target data.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described in the cluster client terminal
It is middle to execute the reading data manipulation, comprising:
Determine the index information in the reading and writing data instruction;
According to the index information clustered node information that inquiry matches with the index information in default concordance list;
The target clustered node that the clustered node information matches is determined in the cluster client terminal;
The reading data manipulation is executed in the target clustered node.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described to be received using dynamic proxy
Reading and writing data instruction, comprising:
Reading and writing data is received according to timing and instruction priority using dynamic proxy to instruct.
Second aspect of the embodiment of the present invention discloses a kind of data cached read-write system, comprising:
Receiving unit is instructed for receiving reading and writing data using dynamic proxy;
Control unit executes mesh according to reading and writing data instruction for controlling the dynamic proxy in destination client
Mark operation;The destination client be single machine client and/or cluster client terminal, the object run be read data manipulation and/
Or data writing operation.
As an alternative embodiment, in second aspect of the embodiment of the present invention, described control unit includes:
Subelement is determined, for determining that the reading and writing data instructs the destination client to match and object run;
First reading subunit, for working as, the destination client is single machine client and the object run is to read data
When operation, the reading data manipulation is executed in the single machine client;
First write-in subelement, for working as, the destination client is the single machine client and the object run is to write
When data manipulation, write data operation is executed in the single machine client;
Second reading subunit, for working as, the destination client is cluster client terminal and the object run is the reading
When data manipulation, the reading data manipulation is executed in the cluster client terminal;
Second write-in subelement, for working as, the destination client is the cluster client terminal and the object run is institute
When stating data writing operation, write data operation is executed in the cluster client terminal.
As an alternative embodiment, second reading subunit is used in second aspect of the embodiment of the present invention
In the mode for executing the reading data manipulation in the cluster client terminal specifically:
Second reading subunit, for obtaining the bottom clustered node of the cluster client terminal;Judge at the bottom
The target data read in layer clustered node with the presence or absence of the reading data operation instruction;When judging in the bottom cluster section
There are when the target data in point, the target data is read;When judging in the bottom clustered node there is no institute
When stating target data, judge in upper one layer of clustered node of the bottom clustered node with the presence or absence of the target data;When
Judge to read the target data there are when the target data in upper one layer of clustered node;When judging in institute
It states in one layer of clustered node there is no when the target data, upper one layer of clustered node is determined as the bottom cluster
Node, and execute the judgement and whether there is the number of targets in upper one layer of clustered node of the bottom clustered node
According to.
As an alternative embodiment, second reading subunit is used in second aspect of the embodiment of the present invention
In the mode for executing the reading data manipulation in the cluster client terminal specifically:
Second reading subunit, for determining the index information in the reading and writing data instruction;According to the index
The information clustered node information that inquiry matches with the index information in default concordance list;In the cluster client terminal really
The target clustered node that the fixed clustered node information matches;The reading data behaviour is executed in the target clustered node
Make.
As an alternative embodiment, the receiving unit is for utilizing in second aspect of the embodiment of the present invention
Dynamic proxy receives the mode of reading and writing data instruction specifically:
The receiving unit is instructed for receiving reading and writing data according to timing and instruction priority using dynamic proxy.
The third aspect of the embodiment of the present invention discloses a kind of computer program product, when the computer program product is calculating
When being run on machine, so that the computer executes some or all of any one method of first aspect step.
Fourth aspect of the embodiment of the present invention discloses a kind of using distribution platform, and the application distribution platform is for issuing calculating
Machine program product, wherein when the computer program product is run on computers, so that the computer executes first party
Some or all of any one method in face step.
Compared with prior art, the embodiment of the present invention has the advantages that
In the embodiment of the present invention, reading and writing data is received using dynamic proxy and is instructed;Dynamic proxy is controlled according to reading and writing data
Instruction performance objective in destination client operates;Destination client is single machine client and/or cluster client terminal, object run
To read data manipulation and/or data writing operation.This process is only needed to send to dynamic proxy and be instructed, so that it may utilize dynamic proxy
The read-write operation of data is realized in single machine client, and can realize that the read-write of data is grasped in cluster client terminal using dynamic proxy
Make, data cached read-write mode is simplified with this, improves the efficiency of data cached read-write.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ability
For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is a kind of flow diagram of data cached reading/writing method disclosed by the embodiments of the present invention;
Fig. 2 is the flow diagram of the data cached reading/writing method of another kind disclosed by the embodiments of the present invention;
Fig. 3 is the flow diagram of the data cached reading/writing method of another kind disclosed by the embodiments of the present invention;
Fig. 4 is a kind of structural schematic diagram of data cached read-write system disclosed by the embodiments of the present invention;
Fig. 5 is the structural schematic diagram of the data cached read-write system of another kind disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that the described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.Based on this
Embodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative efforts
Example is applied, shall fall within the protection scope of the present invention.
It should be noted that term " includes " and " having " and their any changes in the embodiment of the present invention and attached drawing
Shape, it is intended that cover and non-exclusive include.Such as contain the process, method of a series of steps or units, system, product or
Equipment is not limited to listed step or unit, but optionally further comprising the step of not listing or unit or optional
Ground further includes the other step or units intrinsic for these process, methods, product or equipment.
The embodiment of the present invention discloses a kind of data cached reading/writing method and system, can simplify the operation of data cached read-write
Process, and improve the efficiency of data cached read-write.It is described in detail separately below.
Embodiment one
Referring to Fig. 1, Fig. 1 is a kind of flow diagram of data cached reading/writing method disclosed by the embodiments of the present invention.Such as
Shown in Fig. 1, which be may comprise steps of:
101, data cached read-write system receives reading and writing data using dynamic proxy and instructs.
In the embodiment of the present invention, the instruction of data can be written in reading and writing data instruction for instruction to single machine client, can also
Think that the instruction of data is read in instruction from single machine client, or indicate the instruction that data are written to cluster client terminal,
Can for instruction from cluster client terminal read data instruction, or any combination in above-metioned instruction, the present invention in not
It limits.
102, data cached read-write system control dynamic proxy executes mesh according to reading and writing data instruction in destination client
Mark operation;Destination client is single machine client and/or cluster client terminal, and object run is reading data manipulation and/or writes data
Operation.
As an alternative embodiment, data cached read-write system control dynamic proxy is instructed according to reading and writing data
Performance objective, which operates, in destination client may include:
Data cached read-write system control dynamic proxy determines that reading and writing data instructs the destination client to match;
When destination client is single machine client, data cached read-write system is instructed according to reading and writing data in single machine client
Corresponding object run is executed in end;
When destination client is cluster client terminal, data cached read-write system is instructed according to reading and writing data in cluster client
Corresponding object run is executed in end;
When destination client is single machine client and cluster client terminal, data cached read-write system refers to according to reading and writing data
Order executes corresponding object run in single machine client and cluster client terminal.
By implementing this optional embodiment, it can first determine destination client, mesh is executed in destination client
Mark operation, for example, if user wants to read certain data, the data comprising reading certain data can be triggered to dynamic proxy
Read write command is called dynamic proxy that can read the data in single machine client but also read in cluster client terminal and is somebody's turn to do with this
Data, or can also call dynamic proxy that data are not only written in single machine client but also data, energy is written in cluster client terminal
Enough realizations are more convenient simultaneously to the reading and writing data of single machine client and cluster client terminal.
As it can be seen that implementing data cached reading/writing method described in Fig. 1, it is only necessary to send and instruct to dynamic proxy, so that it may benefit
The read-write operation of data is realized in single machine client with dynamic proxy, and can realize data in cluster client terminal using dynamic proxy
Read-write operation, data cached read-write mode is simplified with this, improves the efficiency of data cached read-write.
Embodiment two
Referring to Fig. 2, Fig. 2 is the flow diagram of the data cached reading/writing method of another kind disclosed by the embodiments of the present invention.
As shown in Fig. 2, the data cached reading/writing method may comprise steps of:
201, data cached read-write system receives reading and writing data according to timing and instruction priority using dynamic proxy and refers to
It enables.
In the embodiment of the present invention, timing can be the sending time sequencing of reading and writing data instruction, and instruction priority can be
The importance degree mark of reading and writing data instruction, reading and writing data instruct its more important corresponding instruction priority higher.
As an alternative embodiment, data cached read-write system is excellent according to timing and instruction using dynamic proxy
First grade receives reading and writing data instruction
Data cached read-write system instructs each reading and writing data according to the sending time that reading and writing data to be received instructs
First weighted value is set, and sending time more early first weighted value of reading and writing data instruction is higher;
Data cached read-write system instructs corresponding instruction priority to refer to each reading and writing data according to above-mentioned reading and writing data
The second weighted value of setting is enabled, higher second weighted value of instruction priority of reading and writing data instruction is higher;
It is corresponding that data cached read-write system combines the first weighted value and the second weighted value to obtain each reading and writing data instruction
Target weight value, and using target weight value as foundation, reading and writing data instruction is received according to the sequence of target weight value from high to low.
It, can be according to the sending time and reading and writing data that reading and writing data instructs by implementing this optional embodiment
The instruction priority of instruction receives the sequence of reading and writing data instruction to determine, with this there are multiple reading and writing datas to be received to refer to
It is successively received when enabling according to this rule, reduces the probability that the conflict situations between reading and writing data instruction occur, improve number
According to the reliability of read-write.
202, data cached read-write system determines the destination client and object run that reading and writing data instruction matches.
203, when destination client is single machine client and object run is to read data manipulation, data cached read-write system
It is executed in single machine client and reads data manipulation.
204, when destination client is single machine client and object run is data writing operation, data cached read-write system
Data writing operation is executed in single machine client.
205, when destination client is cluster client terminal and object run is data writing operation, data cached read-write system
Data writing operation is executed in cluster client terminal.
206, when destination client is cluster client terminal and object run is to read data manipulation, data cached read-write system
Obtain the bottom clustered node of cluster client terminal.
It may include several clustered nodes in the embodiment of the present invention, in cluster client terminal, and these clustered nodes can be with
It is stored in cluster client terminal according to hierarchical relationship, it, can be from bottom cluster section when cluster client terminal executes reading data manipulation
Point begins stepping through lookup and reads.
207, data cached read-write system judges in bottom clustered node with the presence or absence of reading data operation instruction reading
Target data, if so, step 208 is executed, if not, executing step 209.
208, data cached read-write system reads target data.
209, data cached read-write system judges in upper one layer of clustered node of bottom clustered node with the presence or absence of target
Data, if so, step 210 is executed, if not, executing step 211.
210, data cached read-write system reads target data.
211, upper one layer of clustered node is determined as bottom clustered node by data cached read-write system.
In the embodiment of the present invention, after executing the step 211, step 209 can be repeated, is realized bottom-up
Clustered node traversal reads data, until finally getting target data.
As it can be seen that implementing data cached reading/writing method described in Fig. 2, it is only necessary to send and instruct to dynamic proxy, so that it may benefit
The read-write operation of data is realized in single machine client with dynamic proxy, and can realize data in cluster client terminal using dynamic proxy
Read-write operation, data cached read-write mode is simplified with this, improves the efficiency of data cached read-write.
In addition, implement data cached reading/writing method described in Fig. 2, it can also be according to the clustered node in cluster client terminal
Distributed architecture traversal queries and reads corresponding target data upwards in turn from bottom clustered node, so as to improve target is obtained
The efficiency of data.
In addition, implementing data cached reading/writing method described in Fig. 2, according to timing and can also be referred to using dynamic proxy
It enables priority receive reading and writing data instruction, priority two dimensions with timing and is instructed when there are the instruction of multiple reading and writing datas with this
Degree instructs to obtain reading and writing data, reduces the probability that the case where generating conflict between multiple reading and writing datas instructions occurs.
Embodiment three
Referring to Fig. 3, Fig. 3 is the flow diagram of the data cached reading/writing method of another kind disclosed by the embodiments of the present invention.
As shown in figure 3, the data cached reading/writing method may comprise steps of:
301, data cached read-write system receives reading and writing data according to timing and instruction priority using dynamic proxy and refers to
It enables.
302, data cached read-write system determines the destination client and object run that reading and writing data instruction matches.
303, when destination client is single machine client and object run is to read data manipulation, data cached read-write system
It is executed in single machine client and reads data manipulation.
304, when destination client is single machine client and object run is data writing operation, data cached read-write system
Data writing operation is executed in single machine client.
305, when destination client is cluster client terminal and object run is data writing operation, data cached read-write system
Data writing operation is executed in cluster client terminal.
306, when destination client is cluster client terminal and object run is to read data manipulation, data cached read-write system
Determine the index information in reading and writing data instruction.
In the embodiment of the present invention, index information can be the certain characteristic informations for the data for needing to read, such as data type
Information, data address information etc..
307, according to index information, in default concordance list inquiry matches data cached read-write system with index information
Clustered node information.
It may include several index informations and its cluster section for corresponding to storage in the embodiment of the present invention, in default concordance list
Point information.Different data distributions can such as be stored in different clustered nodes according to data type, root when reading data
Corresponding clustered node information can be inquired in default concordance list according to data type information included by index information, from
And it is quickly executed in the target clustered node that the clustered node information matches and reads data manipulation.
308, data cached read-write system determines the target cluster section that clustered node information matches in cluster client terminal
Point.
309, data cached read-write system executes in target clustered node reads data manipulation.
Data behaviour is read as an alternative embodiment, executing in target clustered node in data cached read-write system
Before work, following steps can also be performed:
Data cached read-write system judges whether the authority information of the data read command allows according to data read command
Data read operation is executed in target clustered node;
Data manipulation is read if so, executing above-mentioned data cached read-write system and executing in target clustered node.
By implementing this optional embodiment, it can be executed in target clustered node and read first to sentence before data manipulation
It is disconnected whether to there is the permission for executing in the target clustered node and reading data manipulation, it is just executed if having and reads data behaviour
Make.This process increases the authentications for reading data, so that reading data is safer.
As it can be seen that data cached reading/writing method described in implementing Fig. 3, it is only necessary to send and instruct to dynamic proxy, so that it may benefit
The read-write operation of data is realized in single machine client with dynamic proxy, and can realize data in cluster client terminal using dynamic proxy
Read-write operation, data cached read-write mode is simplified with this, improves the efficiency of data cached read-write.
In addition, data cached reading/writing method described in implementing Fig. 3, can also be instructed according to reading and writing data in index letter
Breath executes in target clustered node and reads data manipulation, so as to improve the efficiency for obtaining target data.
In addition, data cached reading/writing method described in implementing Fig. 3, according to timing and can also be referred to using dynamic proxy
It enables priority receive reading and writing data instruction, priority two dimensions with timing and is instructed when there are the instruction of multiple reading and writing datas with this
Degree instructs to obtain reading and writing data, reduces the probability that the case where generating conflict between multiple reading and writing datas instructions occurs.
Example IV
Referring to Fig. 4, Fig. 4 is a kind of structural schematic diagram of data cached read-write system disclosed by the embodiments of the present invention.Its
In, as shown in figure 4, the data cached read-write system 400 may include:
Receiving unit 401 is instructed for receiving reading and writing data using dynamic proxy.
In the embodiment of the present invention, the instruction of data can be written in reading and writing data instruction for instruction to single machine client, can also
Think that the instruction of data is read in instruction from single machine client, or indicate the instruction that data are written to cluster client terminal,
Can for instruction from cluster client terminal read data instruction, or any combination in above-metioned instruction, the present invention in not
It limits.
Control unit 402, for controlling dynamic proxy, according to reading and writing data instruction, the performance objective in destination client is grasped
Make;Destination client is single machine client and/or cluster client terminal, and object run is to read data manipulation and/or data writing operation.
It is instructed according to reading and writing data in target as an alternative embodiment, control unit 402 controls dynamic proxy
Performance objective, which operates, in client may include:
Control unit 402 controls dynamic proxy and determines that reading and writing data instructs the destination client to match;
When destination client is single machine client, control unit 402 instructs in single machine client according to reading and writing data
Execute corresponding object run;
When destination client is cluster client terminal, control unit 402 instructs in cluster client terminal according to reading and writing data
Execute corresponding object run;
When destination client is single machine client and cluster client terminal, control unit 402 is instructed according to reading and writing data
Corresponding object run is executed in single machine client and cluster client terminal.
By implementing this optional embodiment, it can first determine destination client, mesh is executed in destination client
Mark operation, for example, if user wants to read certain data, the data comprising reading certain data can be triggered to dynamic proxy
Read write command is called dynamic proxy that can read the data in single machine client but also read in cluster client terminal and is somebody's turn to do with this
Data, or can also call dynamic proxy that data are not only written in single machine client but also data, energy is written in cluster client terminal
Enough realizations are more convenient simultaneously to the reading and writing data of single machine client and cluster client terminal.
As it can be seen that implementing data cached read-write system described in Fig. 4, it is only necessary to send and instruct to dynamic proxy, so that it may benefit
The read-write operation of data is realized in single machine client with dynamic proxy, and can realize data in cluster client terminal using dynamic proxy
Read-write operation, data cached read-write mode is simplified with this, improves the efficiency of data cached read-write.
Embodiment five
Referring to Fig. 5, Fig. 5 is the structural schematic diagram of the data cached read-write system of another kind disclosed by the embodiments of the present invention.
Wherein, data cached read-write system shown in fig. 5 is that data cached read-write system as shown in Figure 4 optimizes, with Fig. 4 institute
The data cached read-write system shown is compared, and in data cached read-write system 400 shown in Fig. 5, control unit 402 includes:
Subelement 4021 is determined, for determining that reading and writing data instructs the destination client to match and object run.
First reading subunit 4022, for working as, destination client is single machine client and object run is to read data manipulation
When, it is executed in single machine client and reads data manipulation.
First write-in subelement 4023, for working as, destination client is single machine client and object run is data writing operation
When, data writing operation is executed in single machine client.
Second reading subunit 4024, for working as, destination client is cluster client terminal and object run is to read data manipulation
When, it is executed in cluster client terminal and reads data manipulation.
Second write-in subelement 4025, for working as, destination client is cluster client terminal and object run is data writing operation
When, data writing operation is executed in cluster client terminal.
Optionally, in data cached read-write system 400 shown in Fig. 5,
Second reading subunit 4024 reads the mode of data manipulation for executing in cluster client terminal specifically:
Second reading subunit 4024, for obtaining the bottom clustered node of cluster client terminal;Judge in bottom cluster section
With the presence or absence of the target data for reading the reading of data operation instruction in point;When judging that there are target datas in bottom clustered node
When, read target data;When judging that target data is not present in bottom clustered node, judge in bottom clustered node
It whether there is target data in upper one layer of clustered node;When judging in upper one layer of clustered node to read there are when target data
Take target data;When judging that target data is not present in upper one layer of clustered node, upper one layer of clustered node is determined as
Bottom clustered node, and above-mentioned judgement is executed in upper one layer of clustered node of bottom clustered node with the presence or absence of number of targets
According to.
It may include several clustered nodes in the embodiment of the present invention, in cluster client terminal, and these clustered nodes can be with
It is stored in cluster client terminal according to hierarchical relationship, it, can be from bottom cluster section when cluster client terminal executes reading data manipulation
Point begins stepping through lookup and reads.
It is further alternative, in data cached read-write system 400 shown in Fig. 5,
Second reading subunit 4024 is specifically as follows for executing the mode of reading data manipulation in cluster client terminal:
Second reading subunit 4024, for determining the index information in reading and writing data instruction;According to index information pre-
If inquiring the clustered node information to match with index information in concordance list;Clustered node information phase is determined in cluster client terminal
Matched target clustered node;It is executed in target clustered node and reads data manipulation.
Data are read as an alternative embodiment, executing in target clustered node in the second reading subunit 4024
Before operation, the second reading subunit 4024 be can be also used for:
Second reading subunit 4024 judges whether the authority information of the data read command is permitted according to data read command
Perhaps data read operation is executed in target clustered node;
Data manipulation is read if so, executing above-mentioned data cached read-write system and executing in target clustered node.
By implementing this optional embodiment, it can be executed in target clustered node and read first to sentence before data manipulation
It is disconnected whether to there is the permission for executing in the target clustered node and reading data manipulation, it is just executed if having and reads data behaviour
Make.This process increases the authentications for reading data, so that reading data is safer.
It is further alternative, in data cached read-write system 400 shown in Fig. 5,
Receiving unit 401 is used in the way of dynamic proxy reception reading and writing data instruction specifically:
Receiving unit 401 is instructed for receiving reading and writing data according to timing and instruction priority using dynamic proxy.
In the embodiment of the present invention, timing can be the sending time sequencing of reading and writing data instruction, and instruction priority can be
The importance degree mark of reading and writing data instruction, reading and writing data instruct its more important corresponding instruction priority higher.
As an alternative embodiment, receiving unit 401 is using dynamic proxy according to timing and instruction priority
Receiving reading and writing data instruction may include:
The sending time that receiving unit 401 is instructed according to reading and writing data to be received is to each reading and writing data instruction setting the
Sending time more early first weighted value of one weighted value, reading and writing data instruction is higher;
Receiving unit 401 instructs corresponding instruction priority to instruct setting to each reading and writing data according to above-mentioned reading and writing data
Higher second weighted value of instruction priority of second weighted value, reading and writing data instruction is higher;
Receiving unit 401 combines the first weighted value and the second weighted value to obtain each reading and writing data and instructs corresponding target power
Weight values, and using target weight value as foundation, reading and writing data instruction is received according to the sequence of target weight value from high to low.
It, can be according to the sending time and reading and writing data that reading and writing data instructs by implementing this optional embodiment
The instruction priority of instruction receives the sequence of reading and writing data instruction to determine, with this there are multiple reading and writing datas to be received to refer to
It is successively received when enabling according to this rule, reduces the probability that the conflict situations between reading and writing data instruction occur, improve number
According to the reliability of read-write.
As it can be seen that implementing data cached read-write system described in Fig. 5, it is only necessary to send and instruct to dynamic proxy, so that it may benefit
The read-write operation of data is realized in single machine client with dynamic proxy, and can realize data in cluster client terminal using dynamic proxy
Read-write operation, data cached read-write mode is simplified with this, improves the efficiency of data cached read-write.
In addition, implement Fig. 5 described in data cached read-write system, can also be instructed according to reading and writing data in index letter
Breath executes in target clustered node and reads data manipulation, so as to improve the efficiency for obtaining target data.
In addition, implementing data cached read-write system described in Fig. 5, according to timing and can also be referred to using dynamic proxy
It enables priority receive reading and writing data instruction, priority two dimensions with timing and is instructed when there are the instruction of multiple reading and writing datas with this
Degree instructs to obtain reading and writing data, reduces the probability that the case where generating conflict between multiple reading and writing datas instructions occurs.
The embodiment of the present invention discloses a kind of computer readable storage medium, stores computer program, wherein the computer
Program makes computer execute any one data cached reading/writing method of FIG. 1 to FIG. 3.
A kind of computer program product is also disclosed in the embodiment of the present invention, wherein when computer program product on computers
When operation, so that computer executes some or all of the method in such as above each method embodiment step.
The embodiment of the present invention is also disclosed a kind of using distribution platform, wherein using distribution platform for issuing computer journey
Sequence product, wherein when computer program product is run on computers, so that computer executes such as the above each method embodiment
In some or all of method step.
In various embodiments of the present invention, it should be appreciated that magnitude of the sequence numbers of the above procedures are not meant to execute suitable
Successively, the execution sequence of each process should be determined by its function and internal logic the certainty of sequence, without coping with the embodiment of the present invention
Implementation process constitutes any restriction.
In embodiment provided by the present invention, it should be appreciated that " B corresponding with A " indicates that B is associated with A, can be with according to A
Determine B.It is also to be understood that determine that B is not meant to determine B only according to A according to A, it can also be according to A and/or other information
Determine B.
In addition, each functional unit in various embodiments of the present invention can integrate in one processing unit, it is also possible to
Each unit physically exists alone, and can also be integrated in one unit with two or more units.Above-mentioned integrated unit
Both it can take the form of hardware realization, can also realize in the form of software functional units.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product,
It can store in a retrievable memory of computer.Based on this understanding, technical solution of the present invention substantially or
Person says all or part of of the part that contributes to existing technology or the technical solution, can be in the form of software products
It embodies, which is stored in a memory, including several requests are with so that a computer is set
Standby (can be personal computer, server or network equipment etc., specifically can be the processor in computer equipment) executes
Some or all of each embodiment above method of the invention step.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage
Medium include read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory,
RAM), programmable read only memory (Programmable Read-only Memory, PROM), erasable programmable is read-only deposits
Reservoir (Erasable Programmable Read Only Memory, EPROM), disposable programmable read-only memory (One-
Time Programmable Read-Only Memory, OTPROM), the electronics formula of erasing can make carbon copies read-only memory
(Electrically-Erasable Programmable Read-Only Memory, EEPROM), CD-ROM (Compact
Disc Read-Only Memory, CD-ROM) or other disc memories, magnetic disk storage, magnetic tape storage or can
For carrying or any other computer-readable medium of storing data.
A kind of data cached reading/writing method disclosed by the embodiments of the present invention and system are described in detail above, herein
In apply that a specific example illustrates the principle and implementation of the invention, the explanation of above example is only intended to sides
Assistant solves method and its core concept of the invention;At the same time, for those skilled in the art, think of according to the present invention
Think, there will be changes in the specific implementation manner and application range, and to sum up, the content of the present specification should not be construed as to this hair
Bright limitation.
Claims (10)
1. a kind of data cached reading/writing method characterized by comprising
Reading and writing data is received using dynamic proxy to instruct;
Controlling the dynamic proxy, the performance objective in destination client operates according to reading and writing data instruction;The target visitor
Family end is single machine client and/or cluster client terminal, and the object run is to read data manipulation and/or data writing operation.
2. the method according to claim 1, wherein the control dynamic proxy is according to the reading and writing data
Instruction performance objective in destination client operates, comprising:
Determine the destination client and object run that the reading and writing data instruction matches;
When the destination client is single machine client and the object run is to read data manipulation, in the single machine client
It is middle to execute the reading data manipulation;
When the destination client is the single machine client and the object run is data writing operation, in the single machine visitor
Write data operation is executed in the end of family;
When the destination client is cluster client terminal and the object run is the reading data manipulation, in the cluster visitor
The reading data manipulation is executed in the end of family;
When the destination client is the cluster client terminal and the object run is write data operation, in the collection
Write data operation is executed in group's client.
3. according to the method described in claim 2, it is characterized in that, described execute the reading data in the cluster client terminal
Operation, comprising:
Obtain the bottom clustered node of the cluster client terminal;
Judge the target data read in the bottom clustered node with the presence or absence of the reading data operation instruction;
When judging to read the target data there are when the target data in the bottom clustered node;
When judging that the target data is not present in the bottom clustered node, judge in the bottom clustered node
It whether there is the target data in upper one layer of clustered node;
When judging to read the target data there are when the target data in upper one layer of clustered node;
It is when judging that the target data is not present in upper one layer of clustered node, upper one layer of clustered node is true
Be set to the bottom clustered node, and execute the judgement in upper one layer of clustered node of the bottom clustered node whether
There are the target datas.
4. according to the method described in claim 2, it is characterized in that, described execute the reading data in the cluster client terminal
Operation, comprising:
Determine the index information in the reading and writing data instruction;
According to the index information clustered node information that inquiry matches with the index information in default concordance list;
The target clustered node that the clustered node information matches is determined in the cluster client terminal;
The reading data manipulation is executed in the target clustered node.
5. method according to any one of claims 1 to 4, which is characterized in that described to receive data reading using dynamic proxy
Write command, comprising:
Reading and writing data is received according to timing and instruction priority using dynamic proxy to instruct.
6. a kind of data cached read-write system characterized by comprising
Receiving unit is instructed for receiving reading and writing data using dynamic proxy;
Control unit, for controlling the dynamic proxy, according to reading and writing data instruction, the performance objective in destination client is grasped
Make;The destination client is single machine client and/or cluster client terminal, and the object run is to read data manipulation and/or write
Data manipulation.
7. system according to claim 6, which is characterized in that described control unit includes:
Subelement is determined, for determining that the reading and writing data instructs the destination client to match and object run;
First reading subunit, for working as, the destination client is single machine client and the object run is to read data manipulation
When, the reading data manipulation is executed in the single machine client;
First write-in subelement, for working as, the destination client is the single machine client and the object run is to write data
When operation, write data operation is executed in the single machine client;
Second reading subunit, for working as, the destination client is cluster client terminal and the object run is the reading data
When operation, the reading data manipulation is executed in the cluster client terminal;
Second write-in subelement, for working as, the destination client is the cluster client terminal and the object run is described writes
When data manipulation, write data operation is executed in the cluster client terminal.
8. system according to claim 7, which is characterized in that second reading subunit is used in the cluster client
The mode for reading data manipulation is executed in end specifically:
Second reading subunit, for obtaining the bottom clustered node of the cluster client terminal;Judge in the bottom collection
The target data read in group node with the presence or absence of the reading data operation instruction;When judging in the bottom clustered node
There are when the target data, the target data is read;When judging in the bottom clustered node there is no the mesh
When marking data, judge in upper one layer of clustered node of the bottom clustered node with the presence or absence of the target data;Work as judgement
The target data is read there are when the target data in upper one layer of clustered node out;When judging on described
When the target data being not present in one layer of clustered node, upper one layer of clustered node is determined as the bottom cluster section
Point, and execute the judgement and whether there is the target data in upper one layer of clustered node of the bottom clustered node.
9. system according to claim 7, which is characterized in that second reading subunit is used in the cluster client
The mode for reading data manipulation is executed in end specifically:
Second reading subunit, for determining the index information in the reading and writing data instruction;According to the index information
The clustered node information that inquiry matches with the index information in default concordance list;Institute is determined in the cluster client terminal
State the target clustered node that clustered node information matches;The reading data manipulation is executed in the target clustered node.
10. according to the described in any item systems of claim 6 to 9, which is characterized in that the receiving unit is used to utilize dynamic generation
Reason receives the mode of reading and writing data instruction specifically:
The receiving unit is instructed for receiving reading and writing data according to timing and instruction priority using dynamic proxy.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811356110.6A CN109491929A (en) | 2018-11-15 | 2018-11-15 | A kind of data cached reading/writing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811356110.6A CN109491929A (en) | 2018-11-15 | 2018-11-15 | A kind of data cached reading/writing method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109491929A true CN109491929A (en) | 2019-03-19 |
Family
ID=65695999
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811356110.6A Pending CN109491929A (en) | 2018-11-15 | 2018-11-15 | A kind of data cached reading/writing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109491929A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110795221A (en) * | 2019-04-19 | 2020-02-14 | 成都海光集成电路设计有限公司 | Cache management method, cache controller, processor and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5963632A (en) * | 1997-02-10 | 1999-10-05 | Genesys Telecommunications Laboratories, Inc. | Agent-initiated dynamic requeing of misrouted calls in call-routing systems |
US20070254648A1 (en) * | 2006-04-14 | 2007-11-01 | Zhang David X | Fixed mobile roaming service solution |
CN102355596A (en) * | 2011-10-11 | 2012-02-15 | 浪潮电子信息产业股份有限公司 | Cache server deployment method suitable for video services |
CN102571834A (en) * | 2010-12-15 | 2012-07-11 | 金华六度信息科技有限公司 | WEB instant messaging system based on server push technology, and method |
CN103248656A (en) * | 2012-02-10 | 2013-08-14 | 联想(北京)有限公司 | Method for achieving data reading and writing as well as DSF (distributed file system) and client side |
CN104601720A (en) * | 2015-01-30 | 2015-05-06 | 乐视网信息技术(北京)股份有限公司 | Cache access control method and device |
CN105243033A (en) * | 2015-09-28 | 2016-01-13 | 联想(北京)有限公司 | Data processing method and electronic device |
-
2018
- 2018-11-15 CN CN201811356110.6A patent/CN109491929A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5963632A (en) * | 1997-02-10 | 1999-10-05 | Genesys Telecommunications Laboratories, Inc. | Agent-initiated dynamic requeing of misrouted calls in call-routing systems |
US20070254648A1 (en) * | 2006-04-14 | 2007-11-01 | Zhang David X | Fixed mobile roaming service solution |
CN102571834A (en) * | 2010-12-15 | 2012-07-11 | 金华六度信息科技有限公司 | WEB instant messaging system based on server push technology, and method |
CN102355596A (en) * | 2011-10-11 | 2012-02-15 | 浪潮电子信息产业股份有限公司 | Cache server deployment method suitable for video services |
CN103248656A (en) * | 2012-02-10 | 2013-08-14 | 联想(北京)有限公司 | Method for achieving data reading and writing as well as DSF (distributed file system) and client side |
CN104601720A (en) * | 2015-01-30 | 2015-05-06 | 乐视网信息技术(北京)股份有限公司 | Cache access control method and device |
CN105243033A (en) * | 2015-09-28 | 2016-01-13 | 联想(北京)有限公司 | Data processing method and electronic device |
Non-Patent Citations (1)
Title |
---|
丛佩丽: "《网络操作***管理与应用》", 31 December 2016 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110795221A (en) * | 2019-04-19 | 2020-02-14 | 成都海光集成电路设计有限公司 | Cache management method, cache controller, processor and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20050262150A1 (en) | Object-based storage | |
CN104618482B (en) | Access method, server, conventional memory device, the system of cloud data | |
CN106155577B (en) | Access method, equipment and the system of exented memory | |
CN106911743B (en) | Small documents write polymerization, read polymerization and system and client | |
CN104160397B (en) | Position unique file | |
CN109416681A (en) | The data de-duplication of workload optimization is carried out using ghost fingerprint | |
CN105224255B (en) | A kind of storage file management method and device | |
CN107436725A (en) | A kind of data are write, read method, apparatus and distributed objects storage cluster | |
CN104184812B (en) | A kind of multipoint data transmission method based on private clound | |
CN106775446A (en) | Based on the distributed file system small documents access method that solid state hard disc accelerates | |
US20070033370A1 (en) | Continuous data protection | |
CN105593828A (en) | Method for managing files, distributed storage system and management node | |
JP2007334612A5 (en) | ||
CN110321325A (en) | File inode lookup method, terminal, server, system and storage medium | |
CN106874356B (en) | Geographical location information management method and device | |
CN106817388A (en) | The system that virtual machine, host obtain the method, device and access data of data | |
CN107122130A (en) | A kind of data delete method and device again | |
CN110221959A (en) | Test method, equipment and the computer-readable medium of application program | |
CN109471843A (en) | A kind of metadata cache method, system and relevant apparatus | |
CN106095332A (en) | A kind of data heavily delete method and device | |
CN110008197A (en) | A kind of data processing method, system and electronic equipment and storage medium | |
CN110007858A (en) | Memory allocation method and device | |
CN110109845A (en) | Data cached management method, device, computer equipment and storage medium | |
CN114827178A (en) | Data processing method, device and equipment and readable storage medium | |
CN109491929A (en) | A kind of data cached reading/writing method and system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190319 |
|
RJ01 | Rejection of invention patent application after publication |