CN106921648A - Date storage method, application server and remote storage server - Google Patents

Date storage method, application server and remote storage server Download PDF

Info

Publication number
CN106921648A
CN106921648A CN201611021493.2A CN201611021493A CN106921648A CN 106921648 A CN106921648 A CN 106921648A CN 201611021493 A CN201611021493 A CN 201611021493A CN 106921648 A CN106921648 A CN 106921648A
Authority
CN
China
Prior art keywords
data
application server
read
mark
remote storage
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
Application number
CN201611021493.2A
Other languages
Chinese (zh)
Inventor
华洁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201611021493.2A priority Critical patent/CN106921648A/en
Publication of CN106921648A publication Critical patent/CN106921648A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application is related to field of computer technology, more particularly to a kind of date storage method, application server and remote storage server, in a kind of date storage method, a certain application server in application server cluster it is determined that after data to be written, be written into data Cun Chudao local caches first.It is rear to remote storage server send far call ask, remote storage server receive far call request after, be written into the corresponding memory cell of data Cun Chudao remote storage servers.It can thus be seen that the application is in combination with local cache and remotely stores two ways, to be stored to data, thus, the access efficiency of the data of whole application server cluster can be both improved, the problem of data focus can be avoided again.

Description

Date storage method, application server and remote storage server
Technical field
The application is related to computer memory technical field, more particularly to a kind of date storage method, application server and remote Journey storage server.
Background technology
In conventional art, in order to improve the access efficiency of data, application server would generally be stored to partial data, The mode of its data storage mainly has the following two kinds:
First way is, the mode of local cache, namely application server by above-mentioned data Cun Chudao local caches ( That is internal memory) in, however, because the data in internal memory can not be realized sharing, therefore, even belong to same with the application server The other application server of application server cluster can not access above-mentioned data, in fact, in same application server cluster Each application server when being provided commonly for disposing same operation system, its storage and the data needed for reading are completely the same. It can thus be seen that this kind of mode of data storage can only improve the access efficiency of the data of current application server, and cannot Improve the access efficiency of the data of whole application server cluster.
The second way is, the mode of long-range storage, also will be in above-mentioned data Cun Chudao remote storage servers.When should When desiring access to the data with server, remote procedure call (Remote is sent by remote storage server Procedure Call, RPC) mode of request reads the data.In this kind of data storage method, although, long-range storage Data on server can by same application server cluster in all application servers access, but, have when simultaneously When multiple application servers desire access to the same data in remote storage server, the visit of remote storage server just occurs The problem of bottleneck is asked, namely hot spot data problem occurs, this can reduce the performance of remote server.
The content of the invention
This application describes a kind of date storage method, application server and remote storage server, can improve whole The access efficiency of the data of application server cluster.
A kind of first aspect, there is provided date storage method, including:
First application server determines data to be written, and first application server is for disposing same operation system Application server cluster in any application server;
By in the data Cun Chudao local caches to be written;
The first far call is sent to remote storage server to ask, the first far call request includes described to be written Enter data, first far call is asked for indicating the remote storage server by the data Cun Chudao institutes to be written In stating the corresponding memory cell of remote storage server.
A kind of second aspect, there is provided date storage method, including:
Remote storage server receives the first application server and is sent after data Cun Chudao local caches are written into The first far call request, first application server is for disposing in the application server cluster of same operation system Any application server, first far call request includes the data to be written;
Asked according to first far call, by remote storage server correspondence described in the data Cun Chudao to be written Memory cell in.
A kind of third aspect, there is provided application server, including:
Determining unit, for determining data to be written;
Memory cell, in the data Cun Chudao local caches described to be written that determine the determining unit;
Transmitting element, asks for sending the first far call to remote storage server, and first far call please Ask including the data to be written, first far call is asked for indicating the remote storage server will be described to be written In entering remote storage server described in data Cun Chudao.
A kind of fourth aspect, there is provided remote storage server, including:
Receiving unit, for receiving what the first application server sent after data Cun Chudao local caches are written into First far call is asked, and first application server is for disposing in the application server cluster of same operation system Any application server, the first far call request includes the data to be written;
Memory cell, for being asked according to first far call, stores the data to be written.
Date storage method, application server and remote storage server that the application is provided, in application server cluster A certain application server it is determined that after data to be written, being written into first in data Cun Chudao local caches.It is backward Remote storage server sends far call request, and remote storage server, will be to be written after far call request is received In entering the corresponding memory cell of data Cun Chudao remote storage servers.It can thus be seen that the application is in combination with this Ground is cached and remotely stores two ways, to be stored to data, thus, can both improve whole application server cluster The access efficiency of data, can avoid the problem of data focus again.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will use needed for embodiment description Accompanying drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill of field, on the premise of not paying creative work, can also obtain other according to these accompanying drawings Accompanying drawing.
The application scenarios schematic diagram of the date storage method that Fig. 1 is provided for the application;
The date storage method flow chart that Fig. 2 is provided for a kind of embodiment of the application;
The date storage method flow chart that Fig. 3 is provided for the application another kind embodiment;
The schematic diagram of the application server that Fig. 4 is provided for a kind of embodiment of the application;
The schematic diagram of the remote storage server that Fig. 5 is provided for the application another kind embodiment.
Specific embodiment
Below in conjunction with the accompanying drawings, embodiments of the invention are described.
Date storage method, application server and remote storage server that the embodiment of the present application is provided, it is adaptable to apply The scene of the application server for storage data in server cluster, the application server cluster is used to dispose same operation system (e.g., Taobao's transaction system and Alipay account system etc.), it can include more than two application servers.
The application scenarios schematic diagram of the date storage method that Fig. 1 is provided for the application, in Fig. 1, same operation system is simultaneously It is deployed on two application servers, namely application server cluster 10 can include two application servers, this two applications Server is respectively:Application server 101 and application server 102, wherein, the Internet protocol address of application server 101 (Internet Protocol Address, IP) is:IP1, the IP of application server 102 are:IP2.Two application servers Composition structure it is identical, by taking application server 101 as an example for, its can include caching component (component) and locally delay (also referred to as internal memory or local data center) is deposited, the associated component of local cache is encapsulated in caching component simultaneously and is remotely delayed The associated component deposited, it is used for the data storage in local cache, is additionally operable to the data storage in remote storage server.One In individual example, caching component is to carry out data storage in the form of key-value pair (Key-Vlaue) in local cache, e.g.,< Key1, data1>,<Key2, data2>...,<Keyn, datan>, wherein, data1, data2 ..., datan refer to storage Data true, and key1, key2 ..., keyn refers to the mark of above-mentioned data, and it is typically by operation system according to industry The most frequently used use condition is engaged in set.Such as, the operation system disposed on application server cluster 10 is transaction system of Taobao During system, the mark of data can be the unique mark (identifier, ID) of commodity, and be disposed on application server cluster 10 Operation system be Alipay account system when, above-mentioned data mark can be user ID (user_id).
Remote storage server 20 in Fig. 1 can include control unit 201 (also referred to as control centre) and memory cell 202 (also referred to as data center), control unit 201 is used to record the ground for having set up the application server being connected with remote storage server Location, and for recording the gap marker of remote storage server and the communication channel of the application server.In one example, on Stating address can corresponding storage with gap marker.Memory cell 202 is used to store the data of application server transmission, and it can be Refer to that internal memory may also mean that external memory, when memory cell 202 is external memory, the external memory can be disk etc..It is understood that depositing Data in storage unit 202 can also be stored in the form of key-value pair.
The date storage method flow chart that Fig. 2 is provided for a kind of embodiment of the application.The executive agent of methods described can be with It is the equipment with disposal ability:Server or system or device, the application server in such as Fig. 1.As shown in Fig. 2 institute Stating method can specifically include:
Step 210, the first application server determines data to be written.
The first application server herein can be for appointing for disposing in the application server cluster of same operation system One application server.Such as, can be any application server for disposing in the application server cluster of Taobao's transaction system, Can also be for disposing any application server in Alipay account systematic difference server cluster.
In step 210, the first application server can determine data to be written by two ways:First way It is that the first application server is wanted to improve the access efficiency of a certain data, then the data can be defined as into data to be written.The Two kinds of modes are that the first application server receives the write data requests of called side, and the write data requests include the number of request write-in According to, then can by the request write data be defined as data to be written.
Alternatively, it is determined that after data to be written, the mark of the data to be written can also be determined.In an example In, the first application server can determine above-mentioned mark according to the most frequently used use condition of business.Such as, in application server collection Group 10 on dispose operation system be Taobao's transaction system when, it is determined that data to be written mark can be commodity ID, And on application server cluster 10 dispose operation system be Alipay account system when, it is determined that data to be written mark It can be the ID of user to know.
Step 220, is written into data Cun Chudao local caches.
Local cache herein can refer to the internal memory of the first application server.
Alternatively, the data in local cache can be stored in queue.Data in local cache are storages When in queue, the first application server can first judge the length of queue before data Cun Chudao local caches are written into Whether degree exceedes predetermined threshold value, if not less than predetermined threshold value, being directly written into the afterbody of queue described in data Cun Chudao;And If exceeding predetermined threshold value, algorithm can be removed according to default data, the data in queue are removed, such as, according to Data in queue are removed by first in first out (First In FirstOut, FIFO) algorithm, and data are written into afterwards Store remove data after queue in.
Certainly, in actual applications, the first application server can also by another way safeguard the queue of internal memory, The application is not construed as limiting to this.Such as, the first application server can periodically judge data in queue whether over-time threshold Value, if over-time threshold value, the data is removed.
It should be noted that in the case where the mark of data to be written is also determined, the first application server can also be by The mark is also stored into the queue of local cache.In one example, the mark of data and to be written can be written into Data in the form of the key-value pair storage in the queue of local cache.Such as,<KEY, DATA>, wherein, KEY refers to data to be written Mark, DATA refers to data to be written.
Step 230, sends the first far call and asks to remote storage server.
Wherein, the first far call request can include data to be written, and the first far call is asked long-range for indicating Storage server is written into the corresponding memory cell of data Cun Chudao remote storage servers.
It should be noted that in the case where the mark of data to be written is also determined, the first application server can also be by The mark is sent to remote storage server, so that remote storage server can be by the mark and data to be written with key assignments To form storage in corresponding memory cell.In one example, above-mentioned first far call request can be:put (keyi, datai), wherein, keyi is the mark of data to be written, and datai is data to be written.
Alternatively, above-mentioned first far call request can also include the address (e.g., IP) of the first application server. When the request of one far call also includes the address of the first application server, remote storage server is receiving the first far call After request, the first application server can be searched from control unit according to the address, if finding, be written into number According to or data to be written and mark storage in memory cell;If not finding, remote storage server can be attempted Communication channel is set up with the first application server, and for the communication channel assignment channel is identified, is recorded in a control unit afterwards The corresponding relation of address above mentioned and gap marker, further, it is also possible to individually record address above mentioned.In one example, control single The address recorded in unit can be:[IP1, IP2, IP3 ..., IPN], and the address recorded in control unit and gap marker Corresponding relation can be:<IP1, gap marker 1>,<IP2, gap marker 2>...,<IPM, gap marker M>.Individually recording After the corresponding relation of address above mentioned or record address above mentioned and gap marker, remote storage server can be written into number According to or data to be written and mark storage in memory cell.
To sum up, because the application is written into data Cun Chudao remote storage servers, and the long-range storage service Device can be accessed by whole application server cluster, thus, it is possible to improve the access of the data of whole application server cluster Efficiency.Additionally, the application is also written into data Cun Chudao local caches, when the application service in application server cluster Device can search the data from local cache first when data are read, and search less than in the case of, just from long-range storage clothes Searched in business device, it is possible thereby to avoid when in application server cluster while when having the same data of multiple application server access, The data hot issue for causing.
After completion above-mentioned steps 210- steps 230 are performed;Or, according to the first application server local cache with And in remote storage server data storage mode, when the other application server in application server cluster is in local cache And in the memory cell of remote storage server in the form of the key-value pair after data storage and corresponding mark, the application Embodiment can also comprise the following steps:
Step A:Receive the read data request that called side sends.
Herein, can be that the read data request that called side sends is received by the first application server, the read data request can With the first mark including data to be read.
Step B:According to the first mark, data to be read are searched from local cache.
Such as, data to be read can be searched from the queue of local cache according to the first mark.
Step C:If finding data to be read, the reading data are returned into called side.
Thus, it is possible to improve the access efficiency of the data of the first application server.
Step D:If not finding data to be read, send the second far call to remote storage server and ask.
Wherein, the second far call request can include the first mark, and the second far call is asked for indicating remotely to deposit Storage server searches data to be read according to the first mark from memory cell.
Specifically, remote storage server, can be according to the second long-range tune after the request of the second far call is received With the second mark in request, data to be read are searched from memory cell, if not finding data to be read, directly to the One application server is returned searches failure for expression, then is used to this by the first application server represent that lookup fails Message be transmitted to called side.If finding data to be read, the data to be read are returned to by remote storage server One application server.
Step E:Receive the data to be read that remote storage server sends.
Step F:By in data Cun Chudao local caches to be read, and data to be read are returned to called side.
First application server after data to be read are received, first by the data to be read or data to be read And second mark storage in local cache, so as to when the data to be read are accessed again, can directly from locally delaying Got in depositing.After data to be read are stored in the local cache, the first application server can return the data to be read Back to called side.
Alternatively, above-mentioned second far call request can also include the address of the first application server.It is long-range second When call request also includes the address of the first application server, remote storage server is searched from memory cell in execution and continued Before access evidence, the step of searching the first application server in a control unit is first carried out, and searched less than in the case of, held The address of row the first application server of record, the communication channel of foundation and the first application server, assignment channel are identified and remembered The step of corresponding relation of record address and gap marker, its specific implementation procedure is same as above, does not repeat again herein.In execution After stating step, then perform according to the second mark, the step of search data to be read from memory cell.
In can be seen that the application by above-mentioned steps A- steps F, when the application server in application server cluster is being read Access according to when, the data can be searched from local cache first, search less than in the case of, just from remote storage server Search, it is possible thereby to avoid when in application server cluster while when having the same data of multiple application server access, causing Data hot issue.
After completion above-mentioned steps 210- steps 230 are performed;Or, execution is completed after above-mentioned steps A- steps F;Or Person, according to the mode of the first application server data storage in local cache and remote storage server, works as application service Other application server in device cluster is in the memory cell of local cache and remote storage server with the shape of key-value pair After formula data storage and corresponding mark, embodiments herein can also comprise the following steps:
Step X:Determine the second mark of data to be deleted.
Herein, can determine that the second of data to be deleted identify by the first application server.In one example, when true Determine identical identify corresponding two data it is inconsistent when, then the corresponding data of the mark that will have been stored are defined as number to be deleted According to.Such as, it is assumed that the data for having stored are:<Key1, data1>, and the data for newly obtaining are:<Key1, data2>, then data1 be Data to be deleted.
Step Y:According to the second mark, data to be deleted are searched from local cache, and delete data to be deleted.
It should be noted that when stored in the form of key-value pair in local cache data to be deleted and second mark When, the key-value pair is directly deleted, e.g., delete<Key1, data1>.
Step Z:The 3rd far call is sent to remote storage server to ask.
Wherein, the 3rd far call request can include the second mark.In one example, the 3rd far call request can Think:Delete (keyj, dataj), wherein, keyj is the mark of data to be deleted, and datai is data to be deleted.
Remote storage server, can be according to the second mark, from memory cell after the 3rd call request is received Search and delete data to be deleted.Herein, when data to be deleted and second are stored in memory cell in the form of key-value pair During mark, the key-value pair is directly deleted.
After data to be deleted are deleted, there is the corresponding relation of the address and gap marker for having recorded in a control unit In the case of, remote storage server has been set up during application server cluster is obtained from control unit with remote storage server The address of the other application server of connection, and obtain the corresponding gap marker in the address.Afterwards, it is corresponding by gap marker Communication channel sends to other application server and indicates message, and the instruction message is used to indicate other application server from corresponding Data to be deleted are searched and deleted in local cache.As an example it is assumed that in Fig. 1, application server 101 and application server 102 establish with remote storage server and are connected, and the content of the control unit of remote storage server is as follows:[IP1, IP2];<IP1, gap marker 1>,<IP2, gap marker 2>.When the application server 101 in Fig. 1 is sent out to remote storage server When sending three call requests, remote storage server after data to be deleted are deleted according to the request of the 3rd far call because Get application server 102 and established with remote storage server and be connected, it is possible to obtained from control unit and application The corresponding gap marker of server 102:Gap marker 2, and by the corresponding communication channel of gap marker 2 to application server 102 send instruction message, and the instruction message can include the second mark.Application server 102 receive indicate message after, Identified according to second, data to be deleted are searched and deleted from local cache.
It is achieved that by above-mentioned steps X- steps Z same between the local cache of application server and remote storage server Step communication mechanism, it is possible thereby to ensure the uniformity of data between the two.
The date storage method flow chart that Fig. 3 is provided for the application another kind embodiment.The executive agent of methods described can Think the equipment with disposal ability:Server or system or device, the remote storage server in such as Fig. 1.Such as Fig. 3 institutes Show, methods described can specifically include:
Step 310, remote storage server receives the first application server and is being written into data Cun Chudao local caches The the first far call request for sending afterwards.
The first application server herein be for dispose in the application server cluster of same operation system it is any should Use server.Above-mentioned first far call request can include data to be written, in addition, it can include the mark of data to be written Know.
It should be noted that above-mentioned first application server is written into data Cun Chudao local caches can refer to:The One application server is written into the queue of data Cun Chudao local caches.Data are written into the first application server to deposit Before storing up the queue of local cache, can first judge whether the length of queue exceedes predetermined threshold value, if not less than predetermined threshold value, Then directly it is written into the afterbody of queue described in data Cun Chudao;And if exceed predetermined threshold value, can be according to default data Algorithm is removed, the data in queue are removed, be written into afterwards in the queue after data Cun Chudao removes data.
Also, it should be noted that when the request of the first far call also includes the mark of data to be written, the first application clothes Can also be also stored into the mark in the queue of local cache by business device.In one example, the mark of data can be written into Know and data to be written in the form of the key-value pair storage in the queue of local cache.
Step 320, asks according to the first far call, is written into that data Cun Chudao remote storage servers are corresponding to deposit In storage unit.
When the request of the first far call also includes the mark of data to be written, the first application server can also mark this Knowledge is sent to remote storage server, so that remote storage server can be by the mark and data to be written with key-value pair Form is stored in corresponding memory cell.
Alternatively, above-mentioned first far call request can also include the address (e.g., IP) of the first application server. When the request of one far call also includes the address of the first application server, remote storage server is receiving the first far call After request, the first application server can be searched from control unit according to the address, if finding, be written into number According to or data to be written and mark storage in memory cell;If not finding, remote storage server can be attempted Communication channel is set up with the first application server, and for the communication channel assignment channel is identified, is recorded in a control unit afterwards The corresponding relation of address above mentioned and gap marker, further, it is also possible to individually record address above mentioned.Individually record address above mentioned or Person is recorded after the corresponding relation of address above mentioned and gap marker, and remote storage server can be written into data or to be written Enter data and mark is stored in memory cell.
After completion above-mentioned steps 310- steps 320 are performed, embodiments herein can also comprise the following steps:
Step a, receives first mark of first application server in the data to be read sent according to called side, from local The the second far call request sent during data to be read is not found in caching.
The second far call request herein can include the first mark.
Step b, according to the first mark, searches data to be read from memory cell.
Step c:If not finding data to be read, directly returned for representing lookup failure to the first application server Message.
Afterwards, this is used to represent the first application server searching failure is transmitted to called side.
Step d:If finding data to be read, data to be read are returned to the first application server, for first Application server returns to data to be read by data Cun Chudao local caches to be read to called side.
First application server after data to be read are received, first by the data to be read or data to be read And second mark storage in local cache, so as to when the data to be read are accessed again, can directly from locally delaying Got in depositing.After data to be read are stored in the local cache, the first application server can return the data to be read Back to called side.
Alternatively, above-mentioned second far call request can also include the address of the first application server.It is long-range second When call request also includes the address of the first application server, remote storage server is searched from memory cell in execution and continued Before access evidence, the step of searching the first application server in a control unit is first carried out, and searched less than in the case of, held The address of row the first application server of record, the communication channel of foundation and the first application server, assignment channel are identified and remembered The step of corresponding relation of record address and gap marker, its specific implementation procedure is same as above, does not repeat again herein.In execution After stating step, then perform according to the second mark, the step of search data to be read from memory cell.
After completion above-mentioned steps 310- steps 320 are performed;Or, execution is completed after above-mentioned steps a- steps d, this The embodiment of application can also comprise the following steps:
Step w:The first application server is received according to the second of data to be deleted the mark, is searched simultaneously from local cache Delete the 3rd far call request sent after data to be deleted.
The 3rd far call request herein can include the second mark.
It should be noted that when stored in the form of key-value pair in local cache data to be deleted and second mark When, the first application server directly deletes the key-value pair.
Step x:Identified according to second, data to be deleted are searched and deleted from memory cell.
Remote storage server, can be according to the second mark, from memory cell after the 3rd call request is received Search and delete data to be deleted.Herein, when data to be deleted and second are stored in memory cell in the form of key-value pair During mark, the key-value pair is directly deleted.
Step y:Obtained from control unit and its that be connected has been set up with remote storage server in application server cluster The address of its application server, and obtain the corresponding gap marker in address.
After data to be deleted are deleted, there is the corresponding relation of the address and gap marker for having recorded in a control unit In the case of, remote storage server has been set up during application server cluster is obtained from control unit with remote storage server The address of the other application server of connection, and obtain the corresponding gap marker in the address.
Step z:Sent to other application server by the corresponding communication channel of gap marker and indicate message
The instruction message is used to indicate other application server to be searched from corresponding local cache and delete number to be deleted According to.
It is achieved that by above-mentioned steps w- steps z same between the local cache of application server and remote storage server Step communication mechanism, it is possible thereby to ensure the uniformity of data between the two.
With above-mentioned date storage method accordingly, a kind of application server that the embodiment of the present application is also provided, such as Fig. 4 institutes Show, the application server includes:
Determining unit 401, for determining data to be written.
Memory cell 402, in the data Cun Chudao local caches to be written that determine determining unit 401.
Memory cell 402 specifically can be used for:
Judge whether the length of the queue of local cache exceedes predetermined threshold value;
If exceeding predetermined threshold value, algorithm is removed according to default data, the data in queue are removed;
It is written into the queue after data Cun Chudao removes data.
Transmitting element 403, asks for sending the first far call to remote storage server, and first far call please Ask including data to be written, the first far call is asked long-range for indicating remote storage server to be written into data Cun Chudao In storage server.
Alternatively, the application server can also also include:
Receiving unit 404, the read data request for receiving called side transmission, read data request includes data to be read First mark.
First searching unit 405, for the first mark received according to receiving unit 404, searches from local cache and treats Read data.
Transmitting element 403, if being additionally operable to the first searching unit 405 does not find data to be read, takes to long-range storage Business device sends the request of the second far call, and the request of the second far call includes the first mark, and the second far call is asked for referring to Show that remote storage server, according to the first mark, searches data to be read.
Receiving unit 404, is additionally operable to receive the data to be read that remote storage server sends.
Memory cell 402, is additionally operable in the data Cun Chudao local caches to be read for receiving receiving unit 404, and to Called side returns to data to be read.
Alternatively, the application server can also include:Second searching unit 407.
Determining unit 401, is additionally operable to determine the second mark of data to be deleted.
Second finds unit 407, for the second mark determined according to determining unit 401, is searched from local cache Data to be deleted, and delete data to be deleted.
Transmitting element 403, is additionally operable to send the request of the 3rd far call to remote storage server, and the 3rd far call please Ask including the second mark, the 3rd far call asks, for indicating remote storage server according to the second mark, to search and delete Data to be deleted, determine the communication channel between remote storage server and other application server, and by communication channel to Other servers send and indicate message, indicate message to be treated for indicating other application server to be deleted from corresponding local cache Data are deleted, other application server refers to the application clothes set up with remote storage server in application server cluster and be connected Business device.
The function of each functional module of the embodiment of the present application device, can be by each step of above method embodiment come real It is existing, therefore, the specific work process of the device that the application is provided is not repeated again herein.
The application server that the embodiment of the present application is provided, determining unit 401 determines data to be written.Memory cell 402 will In data Cun Chudao local caches to be written.Transmitting element 403 sends the first far call and asks to remote storage server, should The request of first far call includes data to be written, and the first far call is asked for indicating remote storage server to be written into In data Cun Chudao remote storage servers.Thus, it is possible to improve the access efficiency of the data of whole application server cluster.
With above-mentioned date storage method accordingly, a kind of remote storage server that the embodiment of the present application is also provided, such as Fig. 5 Shown, the remote storage server includes:
Receiving unit 501, sends out for receiving the first application server after data Cun Chudao local caches are written into The first far call for sending is asked, and the first application server is for disposing in the application server cluster of same operation system Any application server, the first far call request includes data to be written.
Memory cell 502, for being asked according to the first far call, stores data to be written.
Alternatively, the first far call request also address including the first application server.
Memory cell 502 specifically for:
According to address, the first application server is searched from control unit;
If finding the first application server, data to be written are stored;
If not finding the first application server, the communication channel with the first application server is set up, be communication channel Assignment channel is identified, and recording address and the corresponding relation of gap marker in a control unit, stores data to be written.
Alternatively, the remote storage server can also include:First searching unit 503 and transmitting element 504.
Receiving unit 501, is additionally operable to receive the first application server the of the data to be read sent according to called side One mark, does not find the second far call request sent during data to be read from local cache, and the second far call please Ask including the first mark.
First searching unit 503, for the first mark received according to receiving unit 501, searches data to be read.
Transmitting element 504, if finding data to be read for the first searching unit 503, to the first application server Data to be read are returned, for the first application server by data Cun Chudao local caches to be read, and is returned to called side Return data to be read.
Alternatively, the second far call request also address including the first application server.
First searching unit 503 specifically for:
According to address, the first application server is searched from control unit;
If finding the first application server, according to the first mark, data to be read are searched;
If not finding the first application server, the communication channel with the first application server is set up, be communication channel Assignment channel is identified, and recording address and the corresponding relation of gap marker in a control unit, is identified according to first, and lookup is continued Access evidence.
Alternatively, the remote storage server can also include:Second searching unit 505 and acquiring unit 506.
Receiving unit 501, is additionally operable to receive the first application server according to the second of data to be deleted the mark, from local The 3rd far call request sent after data to be deleted is searched and deleted in caching, and the request of the 3rd far call includes second Mark.
Second searching unit 505, for the second mark received according to receiving unit 501, searches and deletes number to be deleted According to.
Acquiring unit 506, for built with remote storage server in the acquisition application server cluster from control unit The address of the other application server of vertical connection, and obtain the corresponding gap marker in address.
Transmitting element 504, the corresponding communication channel of gap marker for being additionally operable to be obtained by acquiring unit 506 should to other Sent with server and indicate message, indicate message to be used to indicate other application server to search and delete from corresponding local cache Except data to be deleted.
The function of each functional module of the embodiment of the present application device, can be by each step of above method embodiment come real It is existing, therefore, the specific work process of the device that the application is provided is not repeated again herein.
The remote storage server that the embodiment of the present application is provided, receiving unit 501 receives the first application server and will treat The the first far call request sent after write-in data Cun Chudao local caches, the first application server is same for disposing Any application server in the application server cluster of operation system, the first far call request includes data to be written.Deposit Storage unit 502 is asked according to the first far call, stores data to be written.Thus, it is possible to avoid the data focus of prior art Problem, such that it is able to improve the performance of remote storage server.
Those skilled in the art it will be appreciated that in said one or multiple example, work(described in the invention Be able to can be realized with hardware, software, firmware or their any combination.When implemented in software, can be by these functions Storage is transmitted in computer-readable medium or as one or more instructions on computer-readable medium or code.
Above-described specific embodiment, has been carried out further to the purpose of the present invention, technical scheme and beneficial effect Describe in detail, should be understood that and the foregoing is only specific embodiment of the invention, be not intended to limit the present invention Protection domain, it is all technical scheme basis on, any modification, equivalent substitution and improvements done etc. all should It is included within protection scope of the present invention.

Claims (18)

1. a kind of date storage method, it is characterised in that including:
First application server determines data to be written, and first application server is for disposing answering for same operation system With any application server in server cluster;
By in the data Cun Chudao local caches to be written;
The first far call is sent to remote storage server to ask, the first far call request includes the number to be written Asked for indicating the remote storage server remote described in the data Cun Chudao to be written according to, first far call In the corresponding memory cell of journey storage server.
2. method according to claim 1, it is characterised in that described by the data Cun Chudao local caches to be written In, including:
Judge whether the length of the queue of the local cache exceedes predetermined threshold value;
If exceeding predetermined threshold value, algorithm is removed according to default data, the data in the queue are removed;
By in the queue after the data Cun Chudao removals data to be written.
3. method according to claim 1, it is characterised in that also include:
The read data request that called side sends is received, the read data request includes the first mark of data to be read;
According to the described first mark, the data to be read are searched from the local cache;
If not finding the data to be read, send the second far call to the remote storage server and ask, it is described The request of second far call includes first mark, and second far call is asked for indicating the long-range storage service Device searches the data to be read according to the described first mark from the memory cell;
Receive the data described to be read that the remote storage server sends;
By in local cache described in the data Cun Chudao to be read, and the data to be read are returned to the called side.
4. the method according to claim any one of 1-3, it is characterised in that also include:
Determine the second mark of data to be deleted;
According to the described second mark, the data to be deleted are searched from the local cache, and delete the data to be deleted;
The 3rd far call is sent to the remote storage server to ask, the 3rd far call request includes described second Mark, the 3rd far call asks, for indicating the remote storage server according to the described second mark, to be deposited from described The data to be deleted are searched and deleted in storage unit, are determined between the remote storage server and other application server Communication channel, and instruction message is sent to described other servers by the communication channel, the instruction message is used to indicate The other application server deletes the data to be deleted from corresponding local cache;The other application server refers to The application server being connected has been set up with the remote storage server in the application server cluster.
5. a kind of date storage method, it is characterised in that including:
Remote storage server receives that the first application server sends after data Cun Chudao local caches are written into One far call is asked, and first application server is for appointing for disposing in the application server cluster of same operation system One application server, the first far call request includes the data to be written;
Asked according to first far call, deposited remote storage server is corresponding described in the data Cun Chudao to be written In storage unit.
6. method according to claim 5, it is characterised in that the first far call request also includes that described first should With the address of server;
It is described to be asked according to first far call, by remote storage server correspondence described in the data Cun Chudao to be written Memory cell in, including:
According to the address, first application server is searched from the control unit of the remote storage server;
If finding first application server, by remote storage server correspondence described in the data Cun Chudao to be written Memory cell in;
If not finding first application server, the communication channel with first application server is set up, be described Communication channel assignment channel is identified, and the corresponding relation of the address and the gap marker is recorded in described control unit, By in the corresponding memory cell of remote storage server described in the data Cun Chudao to be written.
7. method according to claim 5, it is characterised in that also include:
First mark of first application server in the data to be read sent according to called side is received, is locally delayed from described The the second far call request sent during the data to be read is not found in depositing, the second far call request includes institute State the first mark;
According to the described first mark, the data to be read are searched from the memory cell;
If finding the data to be read, the data to be read are returned to first application server, for institute The first application server is stated by local cache described in the data Cun Chudao to be read, and to the called side return described in treat Read data.
8. method according to claim 7, it is characterised in that the second far call request also includes that described first should With the address of server;
It is described that the data to be read are searched from the memory cell according to the described first mark, including:
According to the address, first application server is searched from the control unit of the remote storage server;
If finding first application server, according to the described first mark, treated described in lookup from the memory cell Read data;
If not finding first application server, the communication channel with first application server is set up, be described Communication channel assignment channel is identified, and the corresponding relation of the address and the gap marker is recorded in described control unit, According to the described first mark, the data to be read are searched from the memory cell.
9. the method according to claim 6 or 8, it is characterised in that also include:
First application server is received according to the second of data to be deleted the mark, is searched and is deleted from the local cache Except the 3rd far call request sent after the data to be deleted, the 3rd far call request includes that described second marks Know;
Identified according to described second, the data to be deleted are searched and deleted from the memory cell;
Obtained from described control unit and set up what is be connected with the remote storage server in the application server cluster The address of other application server, and obtain the corresponding gap marker in the address;
Sent to the other application server by the corresponding communication channel of the gap marker and indicate message, the instruction disappears Cease for indicating the other application server to be searched from corresponding local cache and deleting the data to be deleted.
10. a kind of application server, it is characterised in that including:
Determining unit, for determining data to be written;
Memory cell, in the data Cun Chudao local caches described to be written that determine the determining unit;
Transmitting element, asks, the first far call request bag for sending the first far call to remote storage server The data to be written are included, first far call is asked for indicating the remote storage server by the number to be written According in storage to the remote storage server.
11. application servers according to claim 10, it is characterised in that the memory cell specifically for:
Judge whether the length of the queue of the local cache exceedes predetermined threshold value;
If exceeding predetermined threshold value, algorithm is removed according to default data, the data in the queue are removed;
By in the queue after the data Cun Chudao removals data to be written.
12. application servers according to claim 10, it is characterised in that also include:
Receiving unit, the read data request for receiving called side transmission, the read data request includes the of data to be read One mark;
First searching unit, for first mark received according to the receiving unit, searches from the local cache The data to be read;
The transmitting element, if being additionally operable to first searching unit does not find the data to be read, to described long-range Storage server sends the request of the second far call, and the second far call request includes first mark, described second Far call asks, for indicating the remote storage server according to the described first mark, to search the data to be read;
The receiving unit, is additionally operable to receive the data described to be read that the remote storage server sends;
The memory cell, is additionally operable to local cache described in the data Cun Chudao described to be read of receiving unit reception In, and return to the data to be read to the called side.
13. application server according to claim any one of 10-12, it is characterised in that also include:Second searches list Unit;
The determining unit, is additionally operable to determine the second mark of data to be deleted;
Described second finds unit, for second mark determined according to the determining unit, from the local cache It is middle to search the data to be deleted, and delete the data to be deleted;
The transmitting element, is additionally operable to send the request of the 3rd far call to the remote storage server, and the described 3rd is long-range Call request includes the described second mark, and the 3rd far call is asked for indicating the remote storage server according to institute State the second mark, search and delete the data to be deleted, determine the remote storage server and other application server it Between communication channel, and sent to described other servers by the communication channel and indicate message, the instruction message is used for Indicate the other application server that the data to be deleted are deleted from corresponding local cache;The other application server Refer to that the application server being connected has been set up with the remote storage server in application server cluster.
A kind of 14. remote storage servers, it is characterised in that including:
Receiving unit, for receiving the first application server sends after data Cun Chudao local caches are written into first Far call is asked, and first application server is for disposing any in the application server cluster of same operation system Application server, the first far call request includes the data to be written;
Memory cell, for being asked according to first far call, stores the data to be written.
15. remote storage servers according to claim 14, it is characterised in that the first far call request is also wrapped Include the address of first application server;
The memory cell specifically for:
According to the address, first application server is searched from control unit;
If finding first application server, the data to be written are stored;
If not finding first application server, the communication channel with first application server is set up, be described Communication channel assignment channel is identified, and the corresponding relation of the address and the gap marker is recorded in described control unit, Store the data to be written.
16. remote storage servers according to claim 14, it is characterised in that also include:First searching unit and hair Send unit;
The receiving unit, is additionally operable to receive first application server the of the data to be read sent according to called side One mark, does not find the second far call request sent during the data to be read, described the from the local cache The request of two far calls includes first mark;
First searching unit, for first mark received according to the receiving unit, access of being continued described in lookup According to;
The transmitting element, if finding the data to be read for first searching unit, to the described first application Server returns to the data to be read, for first application server by described in the data Cun Chudao to be read In ground caching, and the data to be read are returned to the called side.
17. remote storage servers according to claim 16, it is characterised in that the second far call request is also wrapped Include the address of first application server;
First searching unit specifically for:
According to the address, first application server is searched from control unit;
If finding first application server, according to the described first mark, the data to be read are searched;
If not finding first application server, the communication channel with first application server is set up, be described Communication channel assignment channel is identified, and the corresponding relation of the address and the gap marker is recorded in described control unit, According to the described first mark, the data to be read are searched.
18. remote storage server according to claim 15 or 17, it is characterised in that also include:Second searching unit And acquiring unit;
The receiving unit, is additionally operable to reception first application server and is identified according to the second of data to be deleted, from institute State the 3rd far call request searched in local cache and delete and sent after the data to be deleted, the described 3rd long-range adjusts Include second mark with request;
Second searching unit, for second mark received according to the receiving unit, searches and deletes described treating Delete data;
The acquiring unit, takes for being obtained from described control unit in the application server cluster with the long-range storage Business device has set up the address of the other application server of connection, and obtains the corresponding gap marker in the address;
The transmitting element, is additionally operable to the corresponding communication channel of the gap marker obtained by the acquiring unit to described Other application server sends and indicates message, and the instruction message is used to indicating the other application server from corresponding local The data to be deleted are searched and deleted in caching.
CN201611021493.2A 2016-11-15 2016-11-15 Date storage method, application server and remote storage server Pending CN106921648A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611021493.2A CN106921648A (en) 2016-11-15 2016-11-15 Date storage method, application server and remote storage server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611021493.2A CN106921648A (en) 2016-11-15 2016-11-15 Date storage method, application server and remote storage server

Publications (1)

Publication Number Publication Date
CN106921648A true CN106921648A (en) 2017-07-04

Family

ID=59454030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611021493.2A Pending CN106921648A (en) 2016-11-15 2016-11-15 Date storage method, application server and remote storage server

Country Status (1)

Country Link
CN (1) CN106921648A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108833500A (en) * 2018-05-29 2018-11-16 阿里巴巴集团控股有限公司 Service calling method, service providing method, data transferring method and server
CN109151057A (en) * 2018-09-27 2019-01-04 郑州云海信息技术有限公司 A kind of method of intelligent distributed storage cluster management
CN109460182A (en) * 2017-09-06 2019-03-12 杭州海康威视系统技术有限公司 A kind of storage of data, read method and device
CN109818900A (en) * 2017-11-20 2019-05-28 高德软件有限公司 A kind of data management system and application server
CN114741177A (en) * 2022-04-21 2022-07-12 拉扎斯网络科技(上海)有限公司 Information acquisition method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090401A (en) * 2007-05-25 2007-12-19 金蝶软件(中国)有限公司 Data buffer store method and system at duster environment
CN101493826A (en) * 2008-12-23 2009-07-29 中兴通讯股份有限公司 Database system based on WEB application and data management method thereof
CN102682037A (en) * 2011-03-18 2012-09-19 阿里巴巴集团控股有限公司 Data acquisition method, system and device
CN102790801A (en) * 2012-06-20 2012-11-21 浪潮(北京)电子信息产业有限公司 Asynchronous remote copy system and method for maintaining data consistency thereof
CN103338243A (en) * 2013-06-20 2013-10-02 新浪网技术(中国)有限公司 Method and system for updating cache data of Web node
CN103473267A (en) * 2013-08-09 2013-12-25 深圳市中科新业信息科技发展有限公司 Data storage query method and system
CN103716343A (en) * 2012-09-29 2014-04-09 重庆新媒农信科技有限公司 Distributed service request processing method and system based on data cache synchronization
CN104142896A (en) * 2013-05-10 2014-11-12 阿里巴巴集团控股有限公司 Cache control method and system
CN105245560A (en) * 2014-07-11 2016-01-13 阿里巴巴集团控股有限公司 Method, device and system for realizing distributed cache

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101090401A (en) * 2007-05-25 2007-12-19 金蝶软件(中国)有限公司 Data buffer store method and system at duster environment
CN101493826A (en) * 2008-12-23 2009-07-29 中兴通讯股份有限公司 Database system based on WEB application and data management method thereof
CN102682037A (en) * 2011-03-18 2012-09-19 阿里巴巴集团控股有限公司 Data acquisition method, system and device
CN102790801A (en) * 2012-06-20 2012-11-21 浪潮(北京)电子信息产业有限公司 Asynchronous remote copy system and method for maintaining data consistency thereof
CN103716343A (en) * 2012-09-29 2014-04-09 重庆新媒农信科技有限公司 Distributed service request processing method and system based on data cache synchronization
CN104142896A (en) * 2013-05-10 2014-11-12 阿里巴巴集团控股有限公司 Cache control method and system
CN103338243A (en) * 2013-06-20 2013-10-02 新浪网技术(中国)有限公司 Method and system for updating cache data of Web node
CN103473267A (en) * 2013-08-09 2013-12-25 深圳市中科新业信息科技发展有限公司 Data storage query method and system
CN105245560A (en) * 2014-07-11 2016-01-13 阿里巴巴集团控股有限公司 Method, device and system for realizing distributed cache

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱琦: "《分布式应用系统运维理论与实践》", 31 October 2014 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109460182A (en) * 2017-09-06 2019-03-12 杭州海康威视系统技术有限公司 A kind of storage of data, read method and device
CN109460182B (en) * 2017-09-06 2020-10-30 杭州海康威视系统技术有限公司 Data storage and reading method and device
CN109818900A (en) * 2017-11-20 2019-05-28 高德软件有限公司 A kind of data management system and application server
CN109818900B (en) * 2017-11-20 2021-11-26 阿里巴巴(中国)有限公司 Data management system and application server
CN108833500A (en) * 2018-05-29 2018-11-16 阿里巴巴集团控股有限公司 Service calling method, service providing method, data transferring method and server
CN108833500B (en) * 2018-05-29 2021-03-30 创新先进技术有限公司 Service calling method, service providing method, data transmission method and server
CN109151057A (en) * 2018-09-27 2019-01-04 郑州云海信息技术有限公司 A kind of method of intelligent distributed storage cluster management
CN114741177A (en) * 2022-04-21 2022-07-12 拉扎斯网络科技(上海)有限公司 Information acquisition method and device

Similar Documents

Publication Publication Date Title
CN106921648A (en) Date storage method, application server and remote storage server
CN103392167B (en) The caching method of distributed memory system, node
JP7056893B2 (en) Application programming interface Methods, devices, API gateways, and programs for transmitting API requests.
CN105224255B (en) A kind of storage file management method and device
CN102035815B (en) Data acquisition method, access node and system
US20190182270A1 (en) System and method for inquiring ioc information by p2p protocol
CN101442558B (en) Method and system for providing index service for P2SP network
CN110489388A (en) A kind of implementation method and equipment locked for SCSI in distributed network storage system
CN101771723A (en) Data synchronization method
CN106331153A (en) Service request filtering method, service request filtering device and service request filtering system
CN110909030B (en) Information processing method and server cluster
CN108429785A (en) A kind of generation method, reptile recognition methods and the device of reptile identification encryption string
CN107992270B (en) Method and device for globally sharing cache of multi-control storage system
CN101778131A (en) Data synchronization system
CN101789963A (en) Data synchronization system
US8464331B2 (en) Data transmission management server and method
CN107483637B (en) NFS-based client link management method and device
CN102594787A (en) Data grab method, system and routing server
CN103685367A (en) Offline download system and offline download method
JP2003345709A (en) Cache device and network system using the same
KR20060117149A (en) File distribution method and system based on p2p technology
CN113347050B (en) Method and device for block chain node to exit node set
KR101986850B1 (en) A method for managing information of M2M system and apparatus therefor
CN117093639B (en) Socket connection processing method and system based on audit service
CN105357279A (en) Domain name service (DNS) request message processing 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
TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20170704

RJ01 Rejection of invention patent application after publication