CN105468624A - Website interaction caching method and system - Google Patents
Website interaction caching method and system Download PDFInfo
- Publication number
- CN105468624A CN105468624A CN201410447713.2A CN201410447713A CN105468624A CN 105468624 A CN105468624 A CN 105468624A CN 201410447713 A CN201410447713 A CN 201410447713A CN 105468624 A CN105468624 A CN 105468624A
- Authority
- CN
- China
- Prior art keywords
- caching server
- data
- application node
- caching
- database
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention discloses a website interaction caching system and a corresponding caching data method used in a web portal. The website interaction caching system provided by the present invention comprises a cache server connected to each application node, a database one-to-one connected to the cache sever, a cache server reading unit, a cache server query unit, a database data query unit, and a data cache unit. Compared with the prior art, the website interaction caching method and the system provided by the present invention solve a cache synchronization problem of a plurality of application nodes in large web portal applications, subsume cache data of each application node onto one server, reduce pressure of a database, and reduce costs of cache maintenance.
Description
Technical field
The present invention relates to networking technology area, be specifically related to the mutual caching method in a kind of website and system.
Background technology
Today of web technology high speed development, caching technology has become a gordian technique of large-scale portal website, the speed of a website visiting of caching design quality direct relation, and purchases the quantity of server, even has influence on the experience of user.Different according to the place of depositing, client-cache, service end buffer memory can be divided into.Wherein, service end buffer memory is divided into: page cache, data buffer storage, database caches.Must be provided with multiple application node in traditional large-scale portal website system, when realizing buffer memory, these web station systems often open up the internal memory of current system as system cache.When the number of nodes in portal website's system is too much, just need the cache synchronization problem maintaining each node.Take a large amount of server resources and easily make mistakes.
Summary of the invention
The object of this invention is to provide the mutual caching method in a kind of website and system, to solve above-described technical matters.
The invention provides the mutual caching method in a kind of website, concrete technical scheme is as follows:
The mutual caching method in a kind of website, there are multiple application node and database in described portal website, also comprises a caching server, and the data buffer storage of each application node is summed up on this caching server, and this caching server is connected one to one with described database; Described application node data buffer storage is as follows to the step on this caching server:
S1: whether application node initiates inquiry request, search caching server and exist; If so, perform S2, if not, perform S3;
S2: whether application node exists to checking in caching server data query with inquiry SQL statement, if so, return data, and Query Result is returned application node; If not, S3 is performed;
S3: be whether empty to these data of data base querying, if Query Result be empty, Query Result returns application node, if Query Result non-NULL, execution S4;
S4: whether query caching server exists, if so, with SQL statement be key by Query Result stored in caching server, if not, Query Result is returned to application node.
By adopting in this way, caching server
Preferably, described caching server has and restarts function separately.
By adopting in this way, this caching server can be restarted separately.
Present invention also offers the mutual caching system in a kind of website, the concrete scheme of employing is as follows:
The mutual caching system in a kind of website, comprises a caching server be connected with each application node, and with the database that this caching server is connected one to one, also comprise:
Caching server reading unit, whether it exists for searching caching server;
Caching server data query unit, whether it exists for searching data in caching server with SQL statement;
Database data query unit, whether it exists for searching data in database;
Data buffer storage unit, its for SQL statement be key by Query Result stored in buffer service.
Compared with prior art, technique effect of the present invention is: data cachedly sum up one independently on caching server by what produced by each application node, solve the cache synchronization problem of multiple application node in the application of large-scale portal website, alleviate the pressure of database, reduce the cost of cache maintenance.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the mutual caching method in website of the present invention;
Fig. 2 is the structural representation of the mutual caching system in website of the present invention.
Embodiment
For making technical scheme of the present invention clearly understand, below in conjunction with accompanying drawing and embodiment, the present invention is described in more detail.Below be described as exemplary and not limitation of the present invention.In addition, in the following description, the description to known features and technology is eliminated, to avoid unnecessarily obscuring concept of the present invention.
Fig. 1 shows the schematic flow sheet of the mutual caching method in website of the present invention.
As shown in Figure 1, the mutual caching method in a kind of website, there are multiple application node and database in described portal website, also comprises a caching server, the data buffer storage of each application node is summed up on this caching server, and this caching server is connected one to one with described database; Described application node data buffer storage is as follows to the step on this caching server:
S1: whether application node initiates inquiry request, search caching server exist by caching server reading unit; If so, perform S2, if not, perform S3;
S2: whether application node initiates inquiry request, existed, if so, return data, and Query Result is returned application node by caching server data query unit with inquiry SQL statement to checking in caching server data query; If not, S3 is performed;
S3: be whether empty to these data of data base querying by database data query unit, if Query Result be empty, Query Result returns application node, if Query Result non-NULL, execution S4;
S4: whether existed by caching server reading unit query caching server, if so, by data buffer storage unit with SQL statement be key by Query Result stored in caching server, if not, Query Result is returned to application node.
By adopting above-mentioned flow process, what produced by each application node needs the data of buffer memory and does not need the data separating of buffer memory, needing of being produced by each application node, the data of buffer memory are unified summed up independently on caching server, carried out data interaction with caching server and database.Thus, the cache synchronization problem of each application node has been evaded.
Fig. 2 shows the structural representation of the mutual caching system in website of the present invention.
As shown in Figure 2, the mutual caching system in a kind of website, comprises a caching server be connected with each application node, the database be connected one to one with this caching server, for searching the caching server reading unit whether caching server exists; For searching the caching server data query unit whether data in caching server exist with SQL statement; For searching the database data query unit whether data in database exist; For being that key is by the data buffer storage unit of Query Result stored in buffer service with SQL statement.
Its workflow is as follows: first, and whether application node initiates inquiry request, search caching server exist by caching server reading unit; Exist when checking in caching server, whether application node initiates inquiry request, existed with inquiry SQL statement by caching server data query unit to caching server data query; Whether do not exist when checking in caching server, be empty by database data query unit to these data of data base querying.
Exist when caching server data query unit checks in these data with inquiry SQL statement to caching server, return data, and Query Result is returned application node; Whether do not exist when checking in these data, be empty by database data query unit to these data of data base querying.
When by database data query unit to these data of data base querying be sky, Query Result returns application node; Check in these data not for empty, again whether existed by caching server reading unit query caching server.
Exist when again checking in caching server by caching server reading unit, by data buffer storage unit with SQL statement be key by Query Result stored in caching server; Do not exist when checking in caching server, Query Result is returned to application node.
Thus, what produced by each application node needs the data of buffer memory and does not need the data separating of buffer memory, and needing of being produced by each application node, the data of buffer memory are unified summed up independently on caching server, carried out data interaction with caching server and database.Thus evaded the cache synchronization problem of each application node.
Claims (3)
1. the mutual caching method in website, there are multiple application node and database in described website, it is characterized in that: also comprise a caching server, the data buffer storage of application node is summed up on this caching server, and this caching server is connected one to one with described database; Described application node data buffer storage is as follows to the step on this caching server:
S1: whether application node initiates inquiry request, search caching server and exist; If so, perform S2, if not, perform S3;
S2: whether application node exists to checking in caching server data query with inquiry SQL statement, if so, return data, and Query Result is returned application node; If not, S3 is performed;
S3: be whether empty to these data of data base querying, if Query Result be empty, Query Result returns application node, if Query Result non-NULL, execution S4;
S4: whether query caching server exists, if so, with SQL statement be key by Query Result stored in caching server, if not, Query Result is returned to application node.
2. the mutual caching method in website as claimed in claim 1, is characterized in that: described caching server has restarts function separately.
3. the mutual caching system in website, is characterized in that: comprise a caching server be connected with each application node, and with the database that this caching server is connected one to one, also comprise:
Caching server reading unit, whether it exists for searching caching server;
Caching server data query unit, whether it exists for searching data in caching server with SQL statement;
Database data query unit, whether it exists for searching data in database;
Data buffer storage unit, its for SQL statement be key by Query Result stored in buffer service.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410447713.2A CN105468624A (en) | 2014-09-04 | 2014-09-04 | Website interaction caching method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410447713.2A CN105468624A (en) | 2014-09-04 | 2014-09-04 | Website interaction caching method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105468624A true CN105468624A (en) | 2016-04-06 |
Family
ID=55606331
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410447713.2A Pending CN105468624A (en) | 2014-09-04 | 2014-09-04 | Website interaction caching method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105468624A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2823187A1 (en) * | 2010-12-30 | 2012-07-05 | Facebook, Inc. | Distributed cache for graph data |
CN102682037A (en) * | 2011-03-18 | 2012-09-19 | 阿里巴巴集团控股有限公司 | Data acquisition method, system and device |
CN103379159A (en) * | 2012-04-24 | 2013-10-30 | 阿里巴巴集团控股有限公司 | Distributed web site data synchronization method |
CN104021200A (en) * | 2014-06-16 | 2014-09-03 | 北京京东尚科信息技术有限公司 | Data synchronizing method and device of database |
-
2014
- 2014-09-04 CN CN201410447713.2A patent/CN105468624A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2823187A1 (en) * | 2010-12-30 | 2012-07-05 | Facebook, Inc. | Distributed cache for graph data |
CN102682037A (en) * | 2011-03-18 | 2012-09-19 | 阿里巴巴集团控股有限公司 | Data acquisition method, system and device |
CN103379159A (en) * | 2012-04-24 | 2013-10-30 | 阿里巴巴集团控股有限公司 | Distributed web site data synchronization method |
CN104021200A (en) * | 2014-06-16 | 2014-09-03 | 北京京东尚科信息技术有限公司 | Data synchronizing method and device of database |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI671643B (en) | Configuration change method, device and system | |
CN101969468B (en) | Inquiry server cluster system and inquiry method | |
CN102999522B (en) | A kind of date storage method and device | |
CN102843426B (en) | Based on Web cache resources shared system and the method for intelligent father node | |
CN102629941A (en) | Caching method of a virtual machine mirror image in cloud computing system | |
CN102169507A (en) | Distributed real-time search engine | |
CN103823846A (en) | Method for storing and querying big data on basis of graph theories | |
CN103761102B (en) | A kind of uniform data service platform and its implementation | |
CN103116627B (en) | A kind of method and system of high concurrent SOA technology access database | |
CN104820717A (en) | Massive small file storage and management method and system | |
CN103631623A (en) | Method and device for allocating application software in trunking system | |
CN102663007A (en) | Data storage and query method supporting agile development and lateral spreading | |
CN105354250A (en) | Data storage method and device for cloud storage | |
CN102609464A (en) | Method and device for associative table query of MONGODB shards | |
WO2017092384A1 (en) | Clustered database distributed storage method and device | |
CN103744913A (en) | Database retrieval method based on search engine technology | |
CN102710763A (en) | Method and system for pooling, slicing and fault transfer of distributed cache | |
CN109271449A (en) | A kind of distributed storage inquiry system file-based and querying method | |
CN109753244A (en) | A kind of application method of Redis cluster | |
CN106919696B (en) | SEO site construction method and SEO request response method | |
US10171606B2 (en) | System and method for providing data as a service (DaaS) in real-time | |
CN105718592A (en) | Data calling method and system based on Redis | |
CN103136294B (en) | File operating method and device | |
CN103761255A (en) | Method and system for optimizing data storage of NoSQL mode | |
CN102945270B (en) | Parallel distribution type network public opinion data management method and 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160406 |
|
RJ01 | Rejection of invention patent application after publication |