CN105245560B - A kind of method, apparatus and system for realizing distributed caching - Google Patents

A kind of method, apparatus and system for realizing distributed caching Download PDF

Info

Publication number
CN105245560B
CN105245560B CN201410331467.4A CN201410331467A CN105245560B CN 105245560 B CN105245560 B CN 105245560B CN 201410331467 A CN201410331467 A CN 201410331467A CN 105245560 B CN105245560 B CN 105245560B
Authority
CN
China
Prior art keywords
data
cache
change
version
version information
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.)
Active
Application number
CN201410331467.4A
Other languages
Chinese (zh)
Other versions
CN105245560A (en
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
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 CN201410331467.4A priority Critical patent/CN105245560B/en
Priority to CN201910846547.6A priority patent/CN110505310B/en
Publication of CN105245560A publication Critical patent/CN105245560A/en
Application granted granted Critical
Publication of CN105245560B publication Critical patent/CN105245560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The purpose of the caching for the cache client that timely updates is realized this application discloses a kind of method for realizing distributed caching.For example, the method for the cache client side disclosed in the present application applied to distributed cache system may include: active period to the cache server side of distributed cache system issue obtain change after data version information request;The cache server side is received for the version information of the request feedback;According to the version information, the data after obtaining the change in data source;By data buffer storage after acquired change to the cache client side.In addition, disclosed herein as well is a kind of apparatus and systems for realizing distributed caching.

Description

A kind of method, apparatus and system for realizing distributed caching
Technical field
The present invention relates to distributed caching field more particularly to a kind of method, apparatus and system for realizing distributed caching.
Background technique
Distributed caching refers to each cache client local memory for storing data into distributed cache system deployment Caching method.Distributed cache system is usually made of cache server end and each cache client.
In order to realize that data are synchronous, existing distributed cache system is usually by cache server end by changed data Data source is written, then notifies each distributed caching client that changed data are flushed to client by cache server end It is local.In order to allow cache server end to notify cache client, it usually needs in the record sheet at cache server end The information such as IP and the host name of each cache client are recorded, so that cache server can traverse recorded IP and host Name, gives notice to cache client one by one.
But as the quantity of cache client is increasing, the time-consuming that cache server end sends notice is increasing, Some cache clients are possibly even caused to update not in time.Moreover, often have cache client due to various reasons and under Line, and cache server end sends notice to these offline cache clients still according to record sheet, leads to not synchronize Cache client it is more and more, finally threaten the stability of entire distributed cache system.
Summary of the invention
In view of this, the application's is designed to provide a kind of method, apparatus for realizing distributed caching and system with reality The purpose of the caching for the cache client that now timely updates.
In the first aspect of the embodiment of the present application, a kind of cache client applied to distributed cache system is provided The method of the realization distributed caching of side.For example, this method may include: active period to the slow of distributed cache system Deposit the request that server side issues the version information of data after acquisition is changed;The cache server side is received for the request The version information of feedback;According to the version information, the data after obtaining the change in data source;After acquired change Data buffer storage is to the cache client side.
In the second aspect of the embodiment of the present application, a kind of cache client for being configured at distributed cache system is provided The device of the realization distributed caching of side.For example, the apparatus may include: activly request unit can be used for active period The request of the version information of data after ground issues acquisition change to the cache server side of distributed cache system;Receive version list Member can be used for receiving the cache server side for the version information of the request feedback;Obtain data cell, Ke Yiyong According to the version information, the data after obtaining the change in data source;Buffer update unit, can be used for will be acquired Change after data buffer storage to the cache client side.
In terms of the third of the embodiment of the present application, a kind of cache server applied to distributed cache system is provided The method of the realization distributed caching of side.For example, this method may include: to receive the cache client side of distributed cache system The request of the version information of data after the acquisition change issued to active period;It requests for described to the cache client Version information is fed back in side, so that the cache client lateral root is according to version information, the data after obtaining change in data source, with And by data buffer storage after acquired change to the cache client side.
At the 4th aspect of the embodiment of the present application, a kind of cache server for being configured at distributed cache system is provided The device of the realization distributed caching of side.For example, the apparatus may include: request unit is received, for receiving distributed caching The request of the version information of data after the acquisition change issued to the cache client side active period of system;Version feedback Member, for requesting to feed back version information to the cache client side for described, so that the cache client lateral root is according to version This information, the data after obtaining change in data source, and, by data buffer storage after acquired change to the cache client Side.
At the 5th aspect of the embodiment of the present application, a kind of distributed cache system is provided.For example, the system can wrap Include: cache client side issues to the cache server side of distributed cache system and obtains change in which can be used for active period The request of the version information of rear data receives the version information that the cache server side is fed back for the request, according to The version information, the data after obtaining the change in data source, by data buffer storage after acquired change to locally;Caching Server side, after the acquisition change issued with can be used for receiving the cache client side active period of distributed cache system The request of the version information of data requests to feed back version information to the cache client for described.
It can be seen that the application has the following beneficial effects:
Since the embodiment of the present application is in cache client side active period to the buffer service of distributed cache system Device side issues the request of the version information of data after acquisition is changed, and therefore, actively can obtain version letter from caching server side Breath according to version information from data after acquisition change in data source, and carries out cache flush, without waiting cache server End notifies each cache client one by one, and time-consuming problem caused by a large amount of notices can be sent to avoid cache server side, makes to delay The data cached of client is deposited to be timely updated.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The some embodiments recorded in application, for those of ordinary skill in the art, in the premise of not making the creative labor property Under, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is one of the structural schematic diagram of distributed cache system disclosed in the embodiment of the present application;
Fig. 2 is that the method flow of the disclosed realization distributed caching applied to cache client side of the embodiment of the present application shows It is intended to;
Fig. 3 be the invention relates to change after data schematic diagram;
Fig. 4 is the second structural representation of distributed cache system disclosed in the embodiment of the present application;
Fig. 5 is that the apparatus structure for the realization distributed caching for being configured at cache client side disclosed in the embodiment of the present application shows It is intended to;
Fig. 6 is that the method flow of the disclosed realization distributed caching applied to cache server side of the embodiment of the present application shows It is intended to;
Fig. 7 is that the apparatus structure for the realization distributed caching for being configured at cache server side disclosed in the embodiment of the present application shows It is intended to.
Specific embodiment
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with the application reality The attached drawing in example is applied, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described implementation Example is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field is common Technical staff's every other embodiment obtained without creative efforts, all should belong to protection of the present invention Range.
The IP of record sheet record is relied on for prior art cache server end and host name sends to cache client and becomes The problem of cache client caused by more notifying is updated not in time, the inventor of the present application discovered that actively all in cache client side The request of the version information of data after obtaining change, Ke Yizhu are issued to phase property to the cache server side of distributed cache system It is dynamic to obtain version information from caching server side, according to version information from data after acquisition change in data source, and cached Refresh, without waiting cache server end to notify each cache client one by one, can be sent to avoid cache server side Time-consuming problem, makes the data cached of cache client be timely updated caused by a large amount of notices.In addition, due to cache client Side actively obtains the version information of data after change from caching server side, and therefore, offline cache client is equivalent to Automatically the demand of buffer update is eliminated, therefore, the offline of cache client will not lead to not synchronous cache client increasing It is more, keep distributed cache system more stable.
Based on above-mentioned analysis, the embodiment of the present application provides the method, apparatus and system of following realization distributed caching.
For example, as shown in Figure 1, being the networking schematic diagram of the embodiment of the present application distributed cache system.As shown in Figure 1, this Application embodiment distributed cache system may include cache server side 101, several cachings visitor of cache client side 102 Family end 1021 and data source 103.For example, data source 103 can be the database for store data long term.Cache client End 1021 can be the functional unit being deployed in host's server, for providing data buffer storage writing function.It is distributed at one It may include multiple host's servers in formula caching system, one or more caching visitors can be disposed on host's server Family end.
In the following, in conjunction with Fig. 2 to the embodiment of the present application be applied to cache client side realization distributed caching method into Row is described in detail.For example, this method may include:
The version of data after obtaining change is issued to S210, active period to the cache server end of distributed cache system The request of this information.
For example, in some possible embodiments, client heartbeat triggering has can be set in the cache client side Module.For example, a client heartbeat trigger module can be arranged with host's server.The client heartbeat trigger module can To establish connection with cache server.From the client heartbeat trigger module in a manner of heartbeat active period to distribution The cache server side of formula caching system issues the request of the version information of data after acquisition is changed.For another example other can In the embodiment of energy, timer event can be set in cache client, by each cache client determining by itself When device event difference active period to the cache server end of distributed cache system issue obtain change after data version The request of this information.
Wherein, after change data version information, can for change after data latest edition mark, alternatively, can be The latest edition of data identifies the knot compared with the data cached current version identifications of the cache client itself after change Version scope is changed determined by fruit.
S220, the cache server end is received for the version information of the request feedback.
S230, according to the version information, the data after obtaining the change in data source.
In some possible implementations, the version information of data can be the latest edition of data after change after change Mark, cache client can identify acquired latest edition and data cached current of the cache client itself Version identifier is compared to determine and change version scope, and the corresponding data of the change version scope are obtained from data source. For example, it is assumed that received version information be change after data latest edition mark [1924], cache client itself has been delayed The current version identifications of deposit data are [1915].By being compared two version identifiers, change version scope can be determined For (1915,1924], so read out from data source version scope as shown in Figure 3 (1915,1924] in data.It needs Illustrate, which is only partial schematic diagram, and the present invention is to the content of data, format and to the version of data The set-up mode of this mark is simultaneously not limited.
In other possible implementations, the version information of data can be the latest edition of data after change after change Version is changed determined by the comparison result of this mark and the data cached current version identifications of the cache client itself Range, then cache client side can obtain the corresponding data of the change version scope from data source.
S240, by data buffer storage after acquired change to the cache client side.
For example, for the embodiment in cache client side setting client heartbeat trigger module, from data source Obtain after change after data, client heartbeat trigger module can trigger the cache client disposed on host's server into The operation of row cache flush, and then cache client can be by data buffer storage after acquired change to locally.It should be noted that Host's server where local herein can refer to cache client is the local storage space of cache client distribution.
Since the embodiment of the present application is in cache client side active period to the buffer service of distributed cache system Device side issues the request of the version information of data after acquisition is changed, and cache client side can actively be obtained from caching server side Version information according to version information from data after acquisition change in data source, and carries out cache flush, caches without waiting Server side notifies each cache client one by one, and time-consuming caused by a large amount of notify can be sent to avoid cache server side and is asked Topic, makes the data cached of cache client be timely updated.
In some possible embodiments, in order to not influence cache server side to the read/write speed of data source, this Shen Please embodiment by data source read/write and to cache client side request response be deployed in two different services respectively On device.As shown in figure 4, the cache server side of the distributed cache system may include caching central server 1011 and Version management server 1012.Wherein:
Central server 1011 is cached, can be used for being written changed data data source 103, and, active period Property to version management server 1012 send change after data latest edition mark.For example, as shown in figure 4, can be slow Setting server heartbeat trigger module 105 at central server 1011 is deposited, caching central server 1011 can be by number after change According to latest edition mark submit to server heartbeat trigger module 105, the server heartbeat trigger module 105 and version management Server 1012 establishes connection, sends the latest edition to version management server 1012 to active period in a manner of heartbeat Mark.
Version management server 1012 is sent in which can be used for receiving 1011 active period of caching central server Change after data latest edition mark, the version letter of data after the change is saved according to institute's received latest edition mark Breath.For example, version management server 1012, which can will cache the latest edition mark that central server 1011 is sent, is used as change The version information of data preserves afterwards.For example, version management server 1012 save information may include data type, Title, the latest edition of data mark of data etc..
In this embodiment, it can in cache client side active period be sent out to the version management server 1012 The request for obtaining the version information of data after changing out receives the version management server 1012 for the version of the request feedback This information.For example, as shown in figure 4, can be by client heartbeat trigger module 104 that cache client side is arranged in a manner of heartbeat The request for obtaining the version information is issued to active period to version management server 1012, receives version management server The version information of 1012 feedbacks is obtaining after change after data from data source 103 according to version information, is triggering cache client 1021 will change after data buffer storage to local.
Since the caching central server of the embodiment does not need the request that processing cache client obtains version information, The request that cache client obtains version information, therefore, version pipe are received and handled by special version management server Reason server can share the pressure of caching central server, not influence to cache central server to the read or write speed of data source, The request of cache client can also be responded in time, improve the stability of distributed cache system.
It is corresponding with the realization method of distributed caching of the above-mentioned cache client side applied to distributed cache system , the embodiment of the present application also provides a kind of devices for realizing distributed caching, are configured at the caching visitor of distributed cache system Family end side.
It is the realization distributed caching that cache client side is configured at disclosed in the embodiment of the present application for example, with reference to Fig. 5 Apparatus structure schematic diagram.As shown in figure 5, the apparatus may include:
Activly request unit 510 is sent out in which can be used for active period to the cache server side of distributed cache system The request of the version information of data after changing is obtained out.For example, in some possible embodiments, the cache client side Client heartbeat trigger module can be set.The activly request unit 510 can be used for touching by the client heartbeat Send out number after module issues acquisition change to the cache server side of distributed cache system to active period in a manner of heartbeat According to version information request.Version unit 520 is received, can be used for receiving the cache server side please negate for described The version information of feedback.Data cell 530 is obtained, can be used for obtaining the change from data source according to the version information Data afterwards.Buffer update unit 540 can be used for data buffer storage after acquired change to cache client side sheet Ground.
Since the activly request unit 510 of the embodiment of the present application is in cache client side active period slow to distribution The cache server side of deposit system issues the request of the version information of data after acquisition is changed, and receiving version unit 520 can lead It is dynamic to obtain version information from caching server side, and then obtained from data source by acquisition data cell 530 according to version information Data after change, and cache flush is carried out by buffer update unit 540, without waiting cache server side to notify one by one respectively A cache client can send time-consuming problem caused by a large amount of notices to avoid cache server side, make the slow of cache client Deposit data is timely updated.
In some possible embodiments, the version information of data can be the latest edition of data after change after change Mark, the acquisition data cell 530 can be used for acquired latest edition mark and the cache client side itself Data cached current version identifications are compared to determine and change version scope, and the change version is obtained from data source The corresponding data of range.
In some possible embodiments, in order to not influence cache server side to the read/write speed of data source, this Shen Please embodiment by data source read/write and to cache client side request response be deployed in two different services respectively On device.As shown in figure 4, the cache server side of the distributed cache system may include caching central server 1011 and Version management server 1012.Wherein, the caching central server 1011, can be used for being written changed data described in Data source, and, the latest edition mark of data after sending change to version management server to active period.The version Management server 1012, data are most after the change that sends with can be used for receiving the caching central server active period New version mark, according to the version information of data after institute's received latest edition mark preservation change.Correspondingly, the application The activly request unit 510 of device disclosed in embodiment, with can be used for active period to the version of the cache server side This management server issues the request of the version information of data after acquisition is changed.The reception version unit 520, can be used for connecing The version management server is received for the version information of the request feedback.
In addition, the embodiment of the present application also provides a kind of realizations of cache server side applied to distributed cache system The method of distributed caching.It is the disclosed realization applied to cache server side point of the embodiment of the present application for example, with reference to Fig. 6 The method flow schematic diagram of cloth caching.As shown in fig. 6, this method may include:
S610, receive distributed cache system cache client side active period issue acquisition change after data Version information request.
For example, the cache server side of distributed cache system can be from management end interface or any other informed source Data source is written in changed data by the event for receiving data change, and, version identifier is defined for changed data, Save the version information of data after changing.
S620, it requests to feed back version information to the cache client side for described, so as to the cache client side According to version information, the data after obtaining change in data source, and, by data buffer storage after acquired change to the caching Client-side is local.
In some possible implementations, the version information of data can be the latest edition of data after change after change Mark.
In other possible implementations, the version information of data can be the latest edition of data after change after change Version is changed determined by the comparison result of this mark and the data cached current version identifications of the cache client itself Range.In this implementation, cache server side can recorde the data cached current version mark of each cache client Know, after defining latest edition mark for changed data, which can be identified objective with each caching respectively The data cached current version identifications in family end itself are compared, and correspondence obtains the change version model of each cache client It encloses.
Since the cache server side of the embodiment of the present application issues in which can receive cache client side active period Acquisition change after data version information request, therefore, only need to for the request feed back version information, cache client side Can be according to version information from data after acquisition change in data source, and cache flush is carried out, without waiting buffer service Device side notifies each cache client one by one, and time-consuming problem caused by a large amount of notices can be sent to avoid cache server side, is made The data cached of cache client is timely updated.
In some possible embodiments, in order to not influence cache server side to the read/write speed of data source, this Shen Please embodiment by data source read/write and to cache client side request response be deployed in two different services respectively On device.As shown in figure 4, the cache server side of the distributed cache system may include caching central server 1011 and Version management server 1012.The method of the realization distributed caching can be applied to version management server 1012.Wherein, institute State caching central server 1011, can be used for being written changed data the data source, and, active period to The version management server sends the latest edition mark of data after change.For example, can central server 1011 in the buffer Place's setting server heartbeat trigger module 105, caching central server 1011 can identify the latest edition of data after change Server heartbeat trigger module 105 is submitted to, the server heartbeat trigger module 105 and version management server 1012 are established and connected It connects, sends latest edition mark to version management server 1012 to active period in a manner of heartbeat.Correspondingly, described Number after the change that version management server 1012 is sent in which can also receive caching 1011 active period of central server According to latest edition mark, according to the version information of data after institute's received latest edition mark preservation change.
Since the caching central server of the embodiment does not need the request that processing cache client obtains version information, The request that cache client obtains version information, therefore, version pipe are received and handled by special version management server Reason server can share the pressure of caching central server, not influence to cache central server to the read or write speed of data source, The request of cache client can also be responded in time, improve the stability of distributed cache system.
It is corresponding with the realization method of distributed caching of the above-mentioned cache server side applied to distributed cache system , the embodiment of the present application also provides a kind of devices for realizing distributed caching, are configured at the caching clothes of distributed cache system Business device side.
It is the realization distributed caching that cache server side is configured at disclosed in the embodiment of the present application for example, with reference to Fig. 7 Apparatus structure schematic diagram.As shown in fig. 7, the apparatus may include:
Request unit 710 is received, with can be used for receiving the cache client side active period of distributed cache system The request of the version information of data after the acquisition change of sending.Version feedback unit 720 can be used for requesting for described to institute Cache client side feedback version information is stated to obtain and become from data source so that the cache client lateral root is according to version information Rear data, and, by data buffer storage after acquired change to the cache client side.
In some possible embodiments, in order to not influence cache server side to the read/write speed of data source, this Shen Please embodiment by data source read/write and to cache client side request response be deployed in two different services respectively On device.As shown in figure 4, the cache server side of the distributed cache system may include caching central server 1011 and Version management server 1012.The device of the realization distributed caching can be configured at version management server 1012.Wherein, institute Cache central server 1011, can be used for being written changed data the data source, and, active period to institute State the latest edition mark that version management server sends data after change, the dress for being configured at version management server 1012 Setting can also include version storage unit 730, send with can be used for receiving the caching central server active period The latest edition mark of data after change, the version letter of data after the change is saved according to institute's received latest edition mark Breath.
Version management server in the embodiment can share the pressure of caching central server, not influence in caching Central server can also respond the read or write speed of data source, the request of cache client in time, improve distributed slow The stability of deposit system.
Corresponding with the method for above-mentioned realization distributed caching, the embodiment of the present application also provides a kind of distributed cachings System.It is the structural schematic diagram of distributed cache system disclosed in the embodiment of the present application for example, with reference to Fig. 1.As shown in Figure 1, should System may include: cache client side 102, with can be used for active period to the cache server of distributed cache system Side issues the request of the version information of data after acquisition is changed, and receives the cache server side for the version of the request feedback This information, according to the version information, the data after obtaining the change in data source, by data buffer storage after acquired change To local.Cache server side 101 is sent out in which can be used for receiving the cache client side active period of distributed cache system The request of the version information of data after acquisition change out, requests to feed back version information to the cache client for described.
Wherein, cache client side 102 may include several cache clients 1021.Cache client 1021 can be The functional unit being deployed in host's server, for providing data buffer storage writing function.In a distributed cache system, It may include multiple host's servers, one or more cache clients can be disposed on host's server.
In some possible embodiments, the read/write speed of data source is such as schemed in order to not influence cache server side Shown in 4, cache server side 101 described in the embodiment of the present application may include caching central server 1011 and version management clothes Business device 1012.
Wherein, the caching central server 1011, specifically can be used for that the data source is written changed data into, And active period to version management server send change after data latest edition mark.
Wherein, it is actively all specifically to can be used for receiving the caching central server for the version management server 1012 The latest edition mark of data after the change sent to phase property counts after saving the change according to the received latest edition mark of institute According to version information;And receive distributed cache system cache client side active period issue acquisition change The request of the version information of data afterwards requests to feed back version information to the cache client for described.
In this embodiment, version management server can share the pressure of caching central server, not influence to cache Central server can also respond the read or write speed of data source, the request of cache client in time, improve distribution The stability of caching system.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when invention.
As seen through the above description of the embodiments, those skilled in the art can be understood that the present invention can It realizes by means of software and necessary general hardware platform.Based on this understanding, technical solution of the present invention essence On in other words the part that contributes to existing technology can be embodied in the form of software products, the computer software product It can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer equipment (can be personal computer, server or the network equipment etc.) executes the certain of each embodiment or embodiment of the invention Method described in part.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The present invention can be used in numerous general or special purpose computing system environments or configuration.Such as: personal computer, service Device computer, handheld device or portable device, laptop device, multicomputer system, microprocessor-based system, top set Box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer, including any of the above system or equipment Distributed computing environment etc..
The present invention can describe in the general context of computer-executable instructions executed by a computer, such as program Module.Generally, program module includes routines performing specific tasks or implementing specific abstract data types, programs, objects, group Part, data structure etc..The present invention can also be practiced in a distributed computing environment, in these distributed computing environments, by Task is executed by the connected remote processing devices of communication network.In a distributed computing environment, program module can be with In the local and remote computer storage media including storage equipment.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (15)

1. a kind of method for realizing distributed caching, which is characterized in that applied to the cache client side of distributed cache system, The described method includes:
The version information of data after obtaining change is issued to active period to the cache server side of distributed cache system Request;The version information of data includes the latest edition mark and the cache client itself of data after change after the change Version scope is changed determined by the comparison result of data cached current version identifications;
The cache server side is received for the version information of the request feedback;
According to the version information, the data after obtaining the change in data source;The data source is for storing number for a long time According to database;
By data buffer storage after acquired change to the cache client side.
2. the method according to claim 1, wherein
It is described according to version information, data include: by acquired latest edition mark and institute after obtaining change in data source The data cached current version identifications in cache client side itself are stated to be compared to determine and change version scope, from data source It is middle to obtain the corresponding data of the change version scope.
3. method according to claim 1 or 2, which is characterized in that the cache client side is provided with client heartbeat Trigger module, the client heartbeat trigger module in a manner of heartbeat active period to distributed cache system Cache server side issues the request of the version information of data after acquisition is changed.
4. method according to claim 1 or 2, which is characterized in that the active period to distributed cache system Cache server side issue obtain change after data version information request include: active period to the caching clothes The version management server of business device side issues the request of the version information of data after acquisition is changed;
The reception cache server end includes: to receive the version management server for the version information of the request feedback For the version information of the request feedback;
The cache server side includes: caching central server and version management server;Wherein, genuinely convinced in the caching It is engaged in device, for the data source to be written in changed data, and, it sends to active period and becomes to version management server The latest edition of rear data identifies;The version management server, for receiving the caching central server active period Property the latest edition mark of data after the change that sends, data after the change are saved according to the received latest edition mark of institute Version information.
5. a kind of device for realizing distributed caching, which is characterized in that it is configured at the cache client side of distributed cache system, Described device includes:
Activly request unit for active period is issued to the cache server side of distributed cache system after obtaining change The request of the version information of data;
Version unit is received, for receiving the cache server side for the version information of the request feedback;
Data cell is obtained, is used for according to the version information, the data after obtaining the change in data source;The data source For the database for store data long term;
Buffer update unit, for by data buffer storage after acquired change to the cache client side.
6. device according to claim 5, which is characterized in that the version information of data is data after change after the change Latest edition mark;
The acquisition data cell, for acquired latest edition mark have been cached number with the cache client side itself According to current version identifications be compared to determine and change version scope, change version scope correspondence is obtained from data source Data.
7. device according to claim 5 or 6, which is characterized in that the cache client side is provided with client heartbeat Trigger module;
The activly request unit, for the client heartbeat trigger module in a manner of heartbeat active period to The cache server side of distributed cache system issues the request of the version information of data after acquisition is changed.
8. device according to claim 5 or 6, which is characterized in that the activly request unit, for active period The request of the version information of data after obtaining change is issued to the version management server of the cache server side;
The reception version unit, for receiving the version management server for the version information of the request feedback;
Wherein, the cache server side includes: caching central server and version management server;Wherein, the caching Central server, for the data source to be written in changed data, and, active period to version management server Send the latest edition mark of data after changing;The version management server, for receiving the caching central server master The latest edition mark of data after the dynamic change periodically sent saves the change according to the received latest edition mark of institute The version information of data afterwards.
9. a kind of method for realizing distributed caching, the cache server side applied to distributed cache system, which is characterized in that Include:
The version letter of data after the acquisition change issued with receiving the cache client side active period of distributed cache system The request of breath;The version information of data includes the latest edition mark and the cache client of data after change after the change Version scope is changed determined by the comparison result of itself data cached current version identifications;
It requests to feed back version information to the cache client side for described, so that the cache client lateral root is believed according to version Breath, the data after obtaining change in data source, and, by data buffer storage after acquired change to cache client side sheet Ground;The data source is the database for store data long term.
10. according to the method described in claim 9, it is characterized in that, the version information of data is number after change after the change According to latest edition mark.
11. method according to claim 9 or 10, which is characterized in that the method is applied to the cache server side Version management server;
Wherein, the cache server side further include: caching central server, for the data to be written in changed data Source, and, the latest edition mark of data after sending change to the version management server to active period;
Data after the change that the version management server is sent with also receiving the caching central server active period Latest edition mark, according to the version information of data after institute's received latest edition mark preservation change.
12. a kind of device for realizing distributed caching, is configured at the cache server side of distributed cache system, feature exists In, comprising:
Receive request unit, for receive distributed cache system cache client side active period the acquisition that issues become The request of the version information of rear data;
Version feedback unit, for requesting to feed back version information to the cache client side for described, so as to the caching Client-side is according to version information, the data after obtaining change in data source, and, data buffer storage after acquired change is arrived The cache client side;The data source is the database for store data long term.
13. device according to claim 12, which is characterized in that described device is configured at the version of the cache server side This management server;
Wherein, the cache server side further include: caching central server, for the data to be written in changed data Source, and, the latest edition mark of data after sending change to the version management server to active period;
Described device further include: version storage unit, for what is sent with receiving the caching central server active period The latest edition mark of data after change, the version letter of data after the change is saved according to institute's received latest edition mark Breath.
14. a kind of distributed cache system characterized by comprising
Cache client side for active period is issued to the cache server side of distributed cache system after obtaining change The request of the version information of data receives the cache server side for the version information of the request feedback, according to described Version information, the data after obtaining the change in data source, by data buffer storage after acquired change to locally;The data Source is the database for store data long term;
Cache server side, for receive distributed cache system cache client side active period the acquisition that issues become The request of the version information of rear data requests to feed back version information to the cache client for described.
15. system according to claim 14, which is characterized in that wherein, the cache server side includes caching center Server and version management server;
Wherein, the caching central server, specifically for the data source is written in changed data, and, actively week The latest edition mark of data after sending change to version management server to phase property;
Wherein, the version management server, specifically for what is sent with receiving the caching central server active period The latest edition mark of data after change, the version letter of data after the change is saved according to institute's received latest edition mark Breath;And receive distributed cache system cache client side active period issue acquisition change after data version The request of this information requests to feed back version information to the cache client for described.
CN201410331467.4A 2014-07-11 2014-07-11 A kind of method, apparatus and system for realizing distributed caching Active CN105245560B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410331467.4A CN105245560B (en) 2014-07-11 2014-07-11 A kind of method, apparatus and system for realizing distributed caching
CN201910846547.6A CN110505310B (en) 2014-07-11 2014-07-11 Method, device and system for realizing distributed cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410331467.4A CN105245560B (en) 2014-07-11 2014-07-11 A kind of method, apparatus and system for realizing distributed caching

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201910846547.6A Division CN110505310B (en) 2014-07-11 2014-07-11 Method, device and system for realizing distributed cache

Publications (2)

Publication Number Publication Date
CN105245560A CN105245560A (en) 2016-01-13
CN105245560B true CN105245560B (en) 2019-11-08

Family

ID=55043060

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201410331467.4A Active CN105245560B (en) 2014-07-11 2014-07-11 A kind of method, apparatus and system for realizing distributed caching
CN201910846547.6A Active CN110505310B (en) 2014-07-11 2014-07-11 Method, device and system for realizing distributed cache

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201910846547.6A Active CN110505310B (en) 2014-07-11 2014-07-11 Method, device and system for realizing distributed cache

Country Status (1)

Country Link
CN (2) CN105245560B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105915612A (en) * 2016-04-19 2016-08-31 北京金山安全软件有限公司 Push message acquisition method, message push method and device
CN106921648A (en) * 2016-11-15 2017-07-04 阿里巴巴集团控股有限公司 Date storage method, application server and remote storage server
CN108650318B (en) * 2018-05-10 2021-04-30 北京奇艺世纪科技有限公司 Data acquisition method and device
CN109408751B (en) * 2018-09-27 2022-08-30 腾讯科技(成都)有限公司 Data processing method, terminal, server and storage medium
CN110941568B (en) * 2019-10-23 2022-03-01 支付宝(杭州)信息技术有限公司 Cache updating method, device, system, electronic equipment and medium
CN112016466B (en) * 2020-08-28 2024-05-28 中移(杭州)信息技术有限公司 Face recognition method, face recognition system, electronic equipment and computer storage medium
CN112350856B (en) * 2020-10-27 2023-04-07 中国联合网络通信集团有限公司 Distributed service sign-off method and equipment
CN112433960B (en) * 2020-12-08 2022-06-21 四川长虹电器股份有限公司 Asynchronous version control-based cascaded cache refreshing method
CN112668027A (en) * 2021-01-04 2021-04-16 中车青岛四方车辆研究所有限公司 Data downloading method for distributed system and TIAS system data downloading method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127783A (en) * 2007-09-28 2008-02-20 北京金山软件有限公司 A website buffering method and device
CN101146127A (en) * 2007-10-30 2008-03-19 金蝶软件(中国)有限公司 A client buffer update method and device in distributed system
CN101257485A (en) * 2007-03-02 2008-09-03 华为技术有限公司 Web applied system and method
CN103152367A (en) * 2011-12-06 2013-06-12 盛乐信息技术(上海)有限公司 Cache dynamic maintenance updating method and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2507235B2 (en) * 1994-06-24 1996-06-12 インターナショナル・ビジネス・マシーンズ・コーポレイション Client server computer system, its client computer, server computer, and object updating method
US6996584B2 (en) * 2002-05-14 2006-02-07 Pervasive Software, Inc. System and method of maintaining functional client side data cache coherence
TW200535697A (en) * 2004-04-30 2005-11-01 Hon Hai Prec Ind Co Ltd System and method for automatic updating program
US7870108B2 (en) * 2007-09-25 2011-01-11 Amadeus S.A.S. Method and apparatus for version management of a data entity
CN101576828B (en) * 2009-06-01 2014-08-13 中兴通讯股份有限公司 Software version upgrading method, device and server
US20100325363A1 (en) * 2009-06-22 2010-12-23 Microsoft Corporation Hierarchical object caching based on object version

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101257485A (en) * 2007-03-02 2008-09-03 华为技术有限公司 Web applied system and method
CN101127783A (en) * 2007-09-28 2008-02-20 北京金山软件有限公司 A website buffering method and device
CN101146127A (en) * 2007-10-30 2008-03-19 金蝶软件(中国)有限公司 A client buffer update method and device in distributed system
CN103152367A (en) * 2011-12-06 2013-06-12 盛乐信息技术(上海)有限公司 Cache dynamic maintenance updating method and system

Also Published As

Publication number Publication date
CN110505310A (en) 2019-11-26
CN110505310B (en) 2022-04-15
CN105245560A (en) 2016-01-13

Similar Documents

Publication Publication Date Title
CN105245560B (en) A kind of method, apparatus and system for realizing distributed caching
CN105897946B (en) A kind of acquisition methods and system of access address
US10439916B2 (en) Client-side fault tolerance in a publish-subscribe system
CN106657287B (en) Data access method and system
CN102333029B (en) Routing method in server cluster system
CN107707943B (en) A kind of method and system for realizing cloud service fusion
CN112565415B (en) Cross-region resource management system and method based on cloud edge cooperation
US7890622B2 (en) Real-time notification of device events
CN106055698A (en) Data migration method, agent node and database instance
CN102629938B (en) Method for carrying out video acceleration on network video loading and system thereof
CN102833337A (en) FTP (File Transfer Protocol) file uploading, downloading method and device
CN110308983A (en) Method for balancing resource load and system, service node and client
CN108712457A (en) Back-end server dynamic load method of adjustment and device based on Nginx reverse proxys
CN101860493A (en) Method, server and system for distributing application server address for clients
CN108989430A (en) Load-balancing method, device and storage medium
CN107888870A (en) A kind of monitoring method, apparatus and system
CN107404509A (en) Distributed Services configure system and approaches to IM
CN115640110B (en) Distributed cloud computing system scheduling method and device
CN104580432A (en) Memcached system, memory cache data provision method and device, memory cache data maintenance method and device as well as cluster maintenance method and device
CN105959420A (en) Multi-client metadata synchronous update method and device
CN100485629C (en) Assembling type computer system high speed cache data backup processing method and system
CN103067486A (en) Big-data processing method based on platform-as-a-service (PaaS) platform
CN102480524B (en) Web page crawler cooperating method
CN103338160A (en) Buffer queue-based polling service optimization system and optimization method
CN111382132A (en) Medical image data cloud storage system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191213

Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, British Cayman Islands

Patentee after: Innovative advanced technology Co., Ltd

Address before: Cayman Islands Grand Cayman capital building, a four storey No. 847 mailbox

Patentee before: Alibaba Group Holding Co., Ltd.