CN103024084A - System and method for refreshing caches on basis of HTTP (hypertext transfer protocol) - Google Patents

System and method for refreshing caches on basis of HTTP (hypertext transfer protocol) Download PDF

Info

Publication number
CN103024084A
CN103024084A CN2013100051390A CN201310005139A CN103024084A CN 103024084 A CN103024084 A CN 103024084A CN 2013100051390 A CN2013100051390 A CN 2013100051390A CN 201310005139 A CN201310005139 A CN 201310005139A CN 103024084 A CN103024084 A CN 103024084A
Authority
CN
China
Prior art keywords
host
monitor
scheduling device
main frame
http
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.)
Granted
Application number
CN2013100051390A
Other languages
Chinese (zh)
Other versions
CN103024084B (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.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology Co 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 Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN201310005139.0A priority Critical patent/CN103024084B/en
Publication of CN103024084A publication Critical patent/CN103024084A/en
Application granted granted Critical
Publication of CN103024084B publication Critical patent/CN103024084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a system for refreshing caches on the basis of an HTTP (hypertext transfer protocol). The system is communicated with at least one host monitor, and comprises a host information table module, a host display page module, a cache scheduler, a refreshing monitor and a cache information table module; the host information table module is used for storing URLs (uniform resource locators) of all the host monitors and comprises host IPs (internet protocols) and refreshing ports corresponding to the host IPs; the host display page module is used for reading the URLs of the host monitors and displaying the host IPs and the refreshing ports corresponding to the host IPs to a user; the cache scheduler is used for analyzing the certain host IP selected by the user and the refreshing port corresponding to the certain host IP to form HTTP information, and then transmits the HTTP information to the refreshing monitor; the refreshing monitor is used for calling the HTTP information transmitted by the cache scheduler and reading HTTP information, which is processed by the corresponding port, in the cache information table module; and the cache information table module is used for storing all refreshable ports. The system has the advantage that the caches can be remotely refreshed in real time in a batch manner.

Description

A kind of cache flush system and buffer memory method for refreshing based on http protocol
Technical field
The present invention relates to the caching process technical field, particularly relate to a kind of cache flush system based on http protocol and buffer memory method for refreshing.
Background technology
The most application for performance considered all can adopt caching technology at present, generally is that the data that some are commonly used read out former data and be cached from the data sources such as configuration file when starting in system, needs flush buffers if former data have modification.
Each channel can recognize that existing cache flush mainly passes through dual mode by inquiry:
One, periodic refreshing, it adopts the apache-configuration framework, and this framework provides FileChangedReloadingStrategy periodic refreshing scheme, namely is configured at set intervals the inspection of file modification date.Its drawback is: 1. the bad control of refresh interval, arrange too smallly, and the consumption useless to system is larger; Arrange excessively, then real-time is very poor, and buffer memory can not get in time refreshing.2. it can only be for the configuration of document form, if adopt the buffer memory of other form of database then helpless.
Two, staff refreshes, namely when former data modification, certain monitoring URL of artificial access triggers and refreshes, its real-time is very strong, but drawback is: each interface has the URL that refreshes of a correspondence, needs manually to carry out URL to each interface to be refreshed and calls, if in the more situation of the interface that refreshes, very waste of manpower also easily makes mistakes.Especially under cluster environment, need to carry out time operation of M interface of N platform main frame *.。
Summary of the invention
Technical problem to be solved by this invention provides a kind of cache flush system based on http protocol and buffer memory method for refreshing, is used for solving existing cache flush efficient and the lower problem of practicality.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of cache flush system based on http protocol, it is communicated by letter with at least one main frame monitor, comprises host information table module, main frame displayed page module, buffer scheduling device, refreshes monitor and cache information table module;
Described host information table module, it is used for depositing the URL(Uniform/Universal Resource Locator of All hosts monitor, URL(uniform resource locator)), and the URL of described main frame monitor comprise host ip and refresh port corresponding to described host ip;
Described main frame displayed page module, it is used for reading the URL of main frame monitor, and shows the user to select host ip and refresh port corresponding to host ip; Here, the host ip that shows and corresponding refresh port thereof namely provide refreshable host ip and the refresh port thereof to the user, and the refresh port that is host ip to be refreshed and correspondence thereof that the user chooses;
Described buffer scheduling device, it is used for host ip and the refresh port corresponding to host ip of user selection are resolved to HTTP message, sends this HTTP message to the described monitor that refreshes again;
The described monitor that refreshes, it is used for calling the HTTP message that described buffer scheduling device sends, and reads the corresponding interface from described cache information table module, and processes HTTP message by method corresponding to this interface;
Described cache information table module, it is used for depositing refreshable total interface, and each interface corresponding method that realizes cache flush that is useful on separately.
On the basis of technique scheme, the present invention can also do following improvement.
Further, described buffer scheduling device also is sent to HTTP message each main frame monitor, and described each main frame monitor is to described buffer scheduling device feedback http response result.
Further, described buffer scheduling device adopts the httpclient technology to send http message or receives the http response results.
Further, described buffer scheduling device adopts the httpclient technology that host ip and the refresh port corresponding to host ip of user selection are resolved to HTTP message.
Further, the described monitor that refreshes adopts beanshell real-time calling technology to call the corresponding interface.
Further, described buffer scheduling device adopts servlet buffer scheduling device or struts2_action buffer scheduling device.
The corresponding above-mentioned cache flush of the present invention system, its technical scheme also comprises a kind of cache flush method based on http protocol, comprises;
Step 1, host information table module is deposited the URL of All hosts monitor, and the URL of described main frame monitor comprises host ip and refresh port corresponding to described host ip;
Step 2, the cache information table module is deposited refreshable total interface, and each interface corresponding method that realizes cache flush that is useful on separately;
Step 3, main frame displayed page module reads the URL of main frame monitor, and shows the user to select wherein host ip and refresh port corresponding to host ip;
Step 4, the buffer scheduling device resolves to HTTP message with host ip and the refresh port corresponding to host ip of user selection, sends this HTTP message to the described monitor that refreshes again;
Step 5 refreshes monitor and calls the HTTP message that described buffer scheduling device sends, and read the corresponding interface from described cache information table module, and processes HTTP message by method corresponding to this interface.
On the basis of technique scheme, with above-mentioned cache flush system, this cache flush method also comprises following improvement.
Further, described buffer scheduling device also is sent to HTTP message each main frame monitor, and described each main frame monitor is to described buffer scheduling device feedback http response result.
Further, described buffer scheduling device adopts the httpclient technology to send http message or receives the http response results, and adopts the httpclient technology that host ip to be refreshed and the refresh port corresponding to host ip of user selection are resolved to HTTP message.
Further, the described monitor that refreshes adopts beanshell real-time calling technology to call the corresponding interface.
The invention has the beneficial effects as follows: carry out cache flush between each main frame and enjoy equal rights, namely in cluster environment and outer net, can carry out the cache flush operation by any main frame, and can be not influential to the application of cache flush after any main frame is delayed machine.Cache flush system of the present invention and cache flush method use general http protocol and each main frame mutual, and good fail safe and ease for use are arranged.In addition, the favorable expandability of cache flush of the present invention system, when increasing main frame, as long as in the host information table, increase delegation's information, when increasing cache information, as long as in cache information table increase by one line item.To sum up, the present invention can realize in bulk, remotely buffer memory be refreshed in real time.
Description of drawings
Fig. 1 is the structural representation of cache flush of the present invention system;
Fig. 2 is the schematic flow sheet of cache flush of the present invention system.
Embodiment
Below in conjunction with accompanying drawing principle of the present invention and feature are described, institute gives an actual example and only is used for explaining the present invention, is not be used to limiting scope of the present invention.
As shown in Figure 1, the present embodiment relates to a kind of cache flush system based on http protocol, comprises host information table module, main frame displayed page module, buffer scheduling device, refreshes monitor and cache information table module; Described host information table module, it is used for depositing the URL URL(uniform resource locator) of All hosts monitor, and the URL of described main frame monitor comprises host ip and refresh port corresponding to host ip; Described main frame displayed page module, it is used for reading the URL of main frame monitor, and shows the user to select wherein host ip and refresh port corresponding to host ip.
Described buffer scheduling device, it is used for host ip and the refresh port corresponding to host ip of user selection are resolved to HTTP message, sends this HTTP message to the described monitor that refreshes again.In addition, described buffer scheduling device also is sent to HTTP message each main frame monitor, and described each main frame monitor is to described buffer scheduling device feedback http response result.Here, adopt the httpclient technology to send http message or http response results, and adopt the httpclient technology that host ip and its corresponding refresh port of host ip of user selection are resolved to HTTP message.
The described monitor that refreshes, the described monitor that refreshes, it is used for receiving the HTTP message that described buffer scheduling device sends, and calls the corresponding interface from described cache information table module, and processes HTTP message by method corresponding to this interface.Here, the described monitor that refreshes adopts beanshell real-time calling technology to call the corresponding interface.And described cache information table module, it is used for depositing described each interface that monitor calls that refreshes.
As shown in Figure 2, corresponding above-mentioned cache flush system, the present embodiment gives a kind of cache flush method based on http protocol, comprises;
Step 1, host information table module is deposited the URL of All hosts monitor, and the URL of described main frame monitor comprises host ip and refresh port corresponding to host ip;
Step 2, the cache information table module is deposited refreshable total interface, and each interface corresponding method that realizes cache flush that is useful on separately;
Step 3, main frame displayed page module reads the URL of main frame monitor, and shows the user to select host ip and refresh port corresponding to host ip;
Step 4, the buffer scheduling device resolves to HTTP message with host ip and the refresh port corresponding to host ip of user selection, sends this HTTP message to the described monitor that refreshes again;
Step 5 refreshes monitor and receives the HTTP message that described buffer scheduling device sends, and call the corresponding interface from described cache information table module, and processes HTTP message by method corresponding to this interface.
Corresponding above-mentioned cache flush system and cache flush method, the specific implementation process of the present embodiment is:
One, initialization data: set up two tables:
1, host information allocation list: deposit all main frame monitor URL, its main field comprises major key ID, host ip and refresh port.
2, cache information allocation list: deposit and refresh each interface that calls, its main field comprises major key ID, interface content and interface class.
For the cache information allocation list, and concrete field description is as follows:
Interface class: value 1,2.The interface content is deposited the JAVA code segment when being 1, carry out by the BEAN_SHELL real time parsing on the backstage, and be the SPRING Service name when being 2, obtain respective service and call corresponding method by SPRING_API on the backstage.The like can expand other interface mode.
Two, use coding.
1, writes a JSP: from the host information allocation list, read All hosts and corresponding port and show the user to select to refresh.
2, write backstage ACTION: for the treatment of the host port information to be refreshed of user's submission, carry out long-range URL by following code and call (this code example has been used the java.net.URLConnection of JRE, and the user can adopt the httpclient framework according to actual needs):
Figure BDA00002711450300061
Figure BDA00002711450300071
3, write monitoring ACTION: be used for monitoring the message that previous step is sent, this step reads interface content and interface class to be refreshed and calls from buffer memory information configuration table.
Three, application deployment: can with the application deployment put up to servlet container (tomcat, weblogic etc.) arbitrarily, also can be in the middle of the group of planes, then to start container and get final product;
Four, concrete operations: access (if access any machine in Intranet, if at outer net then by outer net IP) entrance JSP, then select machine to be refreshed to click submission and get final product.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. cache flush system based on http protocol, it is communicated by letter with at least one main frame monitor, it is characterized in that, comprises host information table module, main frame displayed page module, buffer scheduling device, refreshes monitor and cache information table module;
Described host information table module, it is used for depositing the URL URL(uniform resource locator) of All hosts monitor, and the URL of described main frame monitor comprises host ip and refresh port corresponding to host ip;
Described main frame displayed page module, it is used for reading the URL of main frame monitor, and shows the user to select wherein host ip and refresh port corresponding to host ip;
Described buffer scheduling device, it is used for host ip and the refresh port corresponding to host ip of user selection are resolved to HTTP message, sends this HTTP message to the described monitor that refreshes again;
The described monitor that refreshes, it is used for calling the HTTP message that described buffer scheduling device sends, and reads the corresponding interface from described cache information table module, and processes HTTP message by method corresponding to this interface;
Described cache information table module, it is used for depositing refreshable total interface, and each interface corresponding method that realizes cache flush that is useful on separately.
2. cache flush according to claim 1 system is characterized in that, described buffer scheduling device also is sent to HTTP message each main frame monitor, and described each main frame monitor is to described buffer scheduling device feedback http response result.
3. cache flush according to claim 1 and 2 system is characterized in that, described buffer scheduling device adopts the httpclient technology to send http message or receives the http response results.
4. cache flush according to claim 1 system is characterized in that, described buffer scheduling device adopts the httpclient technology that host ip and the refresh port corresponding to host ip of user selection are resolved to HTTP message.
5. cache flush according to claim 1 system is characterized in that, the described monitor that refreshes adopts beanshell real-time calling technology to call the corresponding interface.
6. cache flush according to claim 1 system is characterized in that, described buffer scheduling device adopts servlet buffer scheduling device or struts2_action buffer scheduling device.
7. the cache flush method based on http protocol is characterized in that, comprises;
Step 1, host information table module is deposited the URL of All hosts monitor, and the URL of described main frame monitor comprises host ip and refresh port corresponding to host ip;
Step 2, the cache information table module is deposited refreshable total interface, and each interface corresponding method that realizes cache flush that is useful on separately;
Step 3, main frame displayed page module reads the URL of main frame monitor, and shows the user to select wherein host ip and refresh port corresponding to host ip;
Step 4, the buffer scheduling device resolves to HTTP message with host ip and the refresh port corresponding to host ip of user selection, sends this HTTP message to the described monitor that refreshes again;
Step 5 refreshes monitor and calls the HTTP message that described buffer scheduling device sends, and read the corresponding interface from described cache information table module, and processes HTTP message by method corresponding to this interface.
8. cache flush method according to claim 1 is characterized in that, described buffer scheduling device also is sent to HTTP message each main frame monitor, and described each main frame monitor is to described buffer scheduling device feedback http response result.
9. according to claim 7 or 8 described cache flush methods, it is characterized in that, described buffer scheduling device adopts the httpclient technology to send http message or receives the http response results, and adopts the httpclient technology that host ip and the refresh port corresponding to host ip of user selection are resolved to HTTP message.
10. cache flush method according to claim 1 is characterized in that, the described monitor that refreshes adopts beanshell real-time calling technology to call the corresponding interface.
CN201310005139.0A 2013-01-07 2013-01-07 A kind of cache flush system and buffer memory method for refreshing based on http protocol Active CN103024084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310005139.0A CN103024084B (en) 2013-01-07 2013-01-07 A kind of cache flush system and buffer memory method for refreshing based on http protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310005139.0A CN103024084B (en) 2013-01-07 2013-01-07 A kind of cache flush system and buffer memory method for refreshing based on http protocol

Publications (2)

Publication Number Publication Date
CN103024084A true CN103024084A (en) 2013-04-03
CN103024084B CN103024084B (en) 2016-05-11

Family

ID=47972208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310005139.0A Active CN103024084B (en) 2013-01-07 2013-01-07 A kind of cache flush system and buffer memory method for refreshing based on http protocol

Country Status (1)

Country Link
CN (1) CN103024084B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294566A (en) * 2016-07-26 2017-01-04 努比亚技术有限公司 Cache management system and implementation method
CN109344353A (en) * 2018-09-12 2019-02-15 福建天泉教育科技有限公司 A kind of the local cache method for refreshing and terminal of configurableization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037392A1 (en) * 2000-04-28 2001-11-01 Lg Electronics Inc. Information display apparatus and display method of the same
CN1484155A (en) * 2002-08-13 2004-03-24 �Ҵ���˾ System and method for updating network proxy cache server object
CN1620012A (en) * 2003-11-19 2005-05-25 国际商业机器公司 Method and system for updating/reloading the content of pages browsed over a network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037392A1 (en) * 2000-04-28 2001-11-01 Lg Electronics Inc. Information display apparatus and display method of the same
CN1484155A (en) * 2002-08-13 2004-03-24 �Ҵ���˾ System and method for updating network proxy cache server object
CN1620012A (en) * 2003-11-19 2005-05-25 国际商业机器公司 Method and system for updating/reloading the content of pages browsed over a network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294566A (en) * 2016-07-26 2017-01-04 努比亚技术有限公司 Cache management system and implementation method
CN109344353A (en) * 2018-09-12 2019-02-15 福建天泉教育科技有限公司 A kind of the local cache method for refreshing and terminal of configurableization

Also Published As

Publication number Publication date
CN103024084B (en) 2016-05-11

Similar Documents

Publication Publication Date Title
Canales et al. Methods for handling left-censored data in quantitative microbial risk assessment
CN103002010B (en) A kind of data-updating method based on incremental data, device and system
GB2386531A (en) A collaborative, fault-tolerant, scaleable, flexible, interactive real-time display and processing method and apparatus
NO20085142L (en) Methods, systems and computer-readable media to display high-resolution content related to exploration and production of geographic resources in a thin-client computer network
WO2010085663A3 (en) Reducing network connection latency
EP2357558A3 (en) Independent access to virtual machine desktop content
MY144258A (en) System and method for producing and comunicating requested data among networked application programs
JP2010536075A5 (en)
CN104053072B (en) Distribution control system, dissemination system and distribution control method
CN104954501A (en) Cross-domain information interactive method, device thereof and system thereof
CN102523103A (en) Industrial monitoring network data collection node
CN103685433A (en) Virtual document transmission system and virtual document transmission method thereof
JP4554723B2 (en) Managing network response buffering behavior
CN103024084A (en) System and method for refreshing caches on basis of HTTP (hypertext transfer protocol)
CN104572816B (en) Information processing method and electronic equipment
GB0619887D0 (en) Data processing system and method
Macilwain The time is right to confront misconduct
TW200723046A (en) Method and apparatus for managing multi-stream input/output requests in a network file server
CN105468629B (en) The implementation method of mobile device number reporting system, apparatus and system
JP2015138401A (en) data management device, data distribution system
CN204808320U (en) Big data information management device
CN203301746U (en) Wireless information loading system
CN110413573A (en) Log storage controlling method, device, computer equipment and storage medium
CN117082124B (en) Data transmission method, device, equipment, medium and product
CN106657339A (en) Data transmission method, server and client

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant