CN102510407A - Method and system for reading and writing microblog - Google Patents

Method and system for reading and writing microblog Download PDF

Info

Publication number
CN102510407A
CN102510407A CN2011103755705A CN201110375570A CN102510407A CN 102510407 A CN102510407 A CN 102510407A CN 2011103755705 A CN2011103755705 A CN 2011103755705A CN 201110375570 A CN201110375570 A CN 201110375570A CN 102510407 A CN102510407 A CN 102510407A
Authority
CN
China
Prior art keywords
web server
user
database
read
write
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011103755705A
Other languages
Chinese (zh)
Inventor
沈文策
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN2011103755705A priority Critical patent/CN102510407A/en
Publication of CN102510407A publication Critical patent/CN102510407A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a system for reading and writing a microblog, which are used for solving the problem that in the prior, the efficiency is quite low when the microblog is read and written. The method comprises the steps that: a load balance server receives a reading or writing request sent by a user; and according to a network which the user belongs to, a web server of a corresponding network is adopted to process the reading or writing request of the user. In the embodiment of the invention, the reading or writing request of the user is sent to the web server of the corresponding network according to the network which the user belongs to through the load balance server to process the reading or writing request, so that web servers which belong to different networks are prevented from processing the reading or writing request of the user, and the reading or writing efficiency is improved.

Description

A kind of blog is carried out reading and writing method of operating and system
Technical field
The present invention relates to Internet technical field, relate in particular to and a kind of blog is carried out reading and writing method of operating and system.
Background technology
Along with the develop rapidly of Internet technology, network has become the part of user's living and studying.Each institutional function situation is understood in the own website that the user can release through organizations such as education, enterprise, government and finance, and the user also can pass through network and exchange with other users, even has the personal website of oneself.
Blog is after Email, BBS, IM (instant messaging) instrument, the internet exchange mode that another that provides supplies the user to use, and the user can issue, propagate contents such as influential message, news, incident oneself to be the center.
When the user carried out the reading and writing operation to blog in the prior art, the user sent the read or write request to corresponding web server, after the web server receives user's read or write request, operates accordingly according to this read or write request.But at present; The user is when carrying out the reading and writing operation through the web server; This reading and writing operation directly sends to the web server; By this web server this user's reading and writing operation requests is handled, but possibility user and web server belong to various network, the efficient that therefore will cause blog being carried out the reading and writing operation reduces.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of blog is carried out reading and writing method of operating and system, the lower problem of efficient when in order to solve in the prior art blog being carried out the reading and writing operation.
A kind of method that blog is carried out read or write, said method comprises:
The master receives the read or write request that the user sends with load-balanced server, discerns the information of the network of this user attaching;
According to the network of this user attaching of discerning, in the web server cluster, select the web server of corresponding network;
This read or write request is sent to the said web server of selection, corresponding database is carried out read or write through said web server.
Said web server carries out write operation to corresponding database and comprises:
Said web server carries out write operation through the gateway mode to MDL.
Said web server carries out write operation to corresponding database, comprising:
Said web server carries out the blog identification information of write operation according to said user, searches the corresponding tables of data of this identification information, and this tables of data is carried out write operation.
Said method also comprises:
The Web backstage is synchronized to the write operation of user to said MDL from database.
Said web server carries out read operation to corresponding database and comprises:
Said web server is selected to postpone less database according to said MDL with from the delay of database, and the database less to this delay carries out read operation.
Said web server carries out read operation to corresponding database and comprises:
Said web server is searched the corresponding tables of data of this identification information according to the blog identification information that said user carries out read operation, and this tables of data is carried out read operation.
Said method also comprises:
When said master is broken down with load-balanced server, notify the reading and writing operation requests of subsequent use load-balanced server process user through HA.
A kind of system that blog is carried out read or write, said system comprises:
User side is used to send user's read or write request;
The master uses load-balanced server, is used to receive the read or write request that the user sends, and discerns the information of the network of this user attaching; According to the network of this user attaching of discerning, in the web server cluster, select the web server of corresponding network; This read or write request is sent to the said web server of selection;
The web server is used for corresponding database is carried out read or write.
Said web server specifically is used for through the gateway mode MDL being carried out write operation.
Said web server specifically is used for carrying out according to said user the identification information of the blog of write operation, searches the corresponding tables of data of this identification information, and this tables of data is carried out write operation.
Said system also comprises:
The Web backstage is used for the write operation to said MDL with the user, is synchronized to from database.
Said web server specifically is used for selecting to postpone less database according to said MDL with from the delay of database, and the database less to this delay carries out read operation.
Said web server specifically is used for carrying out according to said user the identification information of the blog of read operation, searches the corresponding tables of data of this identification information, and this tables of data is carried out read operation.
Said system also comprises:
Subsequent use load-balanced server, the HA that sends when being used to receive said master and breaking down notice, the reading and writing operation of process user with load-balanced server.
The embodiment of the invention provides a kind of blog has been carried out reading and writing method of operating and system; This method comprises: the main read or write request that receives user's transmission with load-balanced server; According to the network of user attaching, adopt the web server of map network that this user's read or write request is handled.Owing to pass through the network of load-balanced server according to user attaching in the embodiment of the invention; User's read or write request is sent to the web server of map network; This read or write request is handled; Thereby the web server of avoiding belonging to heterogeneous networks is handled user's read or write request, has improved the efficient that blog is read or write.
Description of drawings
A kind of process of blog being carried out write operation that Fig. 1 provides for the embodiment of the invention;
A kind of detailed process of blog being carried out write operation that Fig. 2 provides for the embodiment of the invention;
A kind of process of blog being carried out read operation that Fig. 3 provides for the embodiment of the invention;
A kind of detailed process of blog being carried out read operation that Fig. 4 provides for the embodiment of the invention;
A kind of system configuration sketch map that blog is carried out read or write that Fig. 5 provides for the embodiment of the invention.
Embodiment
In order to improve the efficient of blog being carried out the reading and writing operation; The invention provides and a kind of blog is carried out reading and writing method of operating and system; Through the network of load-balanced server according to user attaching; User's read or write request is sent to the web server of map network; Web server by this map network is handled this read or write request, thereby avoids the web server different with the user attaching network that user's read or write request is handled, and has improved the efficient that the user reads or writes blog.
Below in conjunction with Figure of description, the present invention is elaborated.
Fig. 1 carries out the process of write operation for a kind of of the embodiment of the invention to blog, and this process may further comprise the steps:
S101: the master discerns the information of the network of this user attaching with the user's of load-balanced server reception user side transmission write operation requests.
Receive the write operation requests that the user sends through load-balanced server in the present invention, load-balanced server is according to the information of the network of user attaching, the write operation requests of dispatch user.
In addition; In the present invention in order to guarantee the stability of system; Load-balanced server adopts active/standby mode, when the master is in normal condition with load-balanced server, receives the also write operation requests of dispatch user by main with load-balanced server; Can't operate as normal (power down, fault, the machine of delaying) time, inform that through HA communication subsequent use load-balanced server receives the also write operation requests of dispatch user with load-balanced server when main.
S102:, in the web server cluster, select the web server of corresponding network according to the network of this user attaching of discerning.
In the web server cluster, be provided with the web server that belongs to every kind of network among the present invention, and many web servers arranged to every kind of network settings.Main with the network of load-balanced server according to user attaching, select the web server of map network for this user.Promptly, select communication network web server,, mainly select the network web of Netcom server with load-balanced server when this user attaching during in Netcom's network when user attaching during in communication network.
S103: this write operation requests is sent to the web server of selection, corresponding database is carried out write operation through this web server.
Concrete, the web server comprises when corresponding database is carried out write operation: the web server carries out write operation through the gateway mode to MDL.The web server adopts the gateway mode that database is carried out write operation in embodiments of the present invention, can effectively improve data processing efficiency.
Owing to disposed the web server cluster in embodiments of the present invention, realize load balancing through load-balanced server, thereby alleviated the visit pressure of web server, therefore guaranteed the stability of web server.
In addition; This user's data table is set to each user in the prior art, more when same user's blog quantity, and Blog content more for a long time; Will cause the capacity of this tables of data very big, also can receive very big influence so call the speed of this tables of data.In order to improve the efficient of calling tables of data, blog is distinguished in the embodiment of the invention, and corresponding tables of data is set, this tables of data is kept in the database to each blog according to the identification information of each blog.
When the web server carried out write operation to corresponding database, the web server carried out the identification information of the blog of write operation according to said user, searched the corresponding tables of data of this identification information, and this tables of data is carried out write operation.The concrete corresponding tables of data of the identification information that can set up each blog in embodiments of the present invention.For example, the identification information of blog can be the ID of blog, behind the ID delivery to blog; The tables of data corresponding according to the information setting behind the ID delivery of this blog; And when carrying out write operation, carry out the ID of the blog of write operation according to the user who receives, to the ID delivery of this blog; Search the corresponding tables of data of information behind the ID delivery of this blog, this tables of data is carried out write operation get final product.
In addition; Can also further divide this tables of data in embodiments of the present invention; To the corresponding tables of data of the identification information of each blog; This tables of data is divided into first tables of data and second tables of data again, and wherein first tables of data supplies the user when browse operation, to use, and second tables of data supplies the user when concrete write operation, to use.
In order further to improve the efficient that the user carries out the reading and writing operation to blog, be provided with MDL in embodiments of the present invention and from database, the corresponding tables of data of each blog is kept at MDL and simultaneously from database.When the user carried out write operation to blog, the web server directly was written to these data in the corresponding tables of data of the identification information of this blog of MDL, and through the web backstage with the write operation of user to MDL, be synchronized to from database.The Web backstage can be carried out to MDL with from the simultaneous operation of database in real time, also can carry out at one's leisure, specifically can select flexibly as required.
Fig. 2 a kind ofly carries out the detailed process of write operation to blog for what the embodiment of the invention provided, and this process may further comprise the steps:
S201: the master receives the write operation requests that the user sends with load-balanced server, discerns the information of the network of this user attaching.
S202:, in the web server cluster, select the web server of corresponding network according to the network of this user attaching of discerning.
S203: the main web server that this write operation requests is sent to selection with load-balanced server.
The S204:web server is searched the corresponding tables of data of this identification information according to the identification information that this user carries out the blog of write operation.
The S205:web server carries out write operation through the gateway mode to this tables of data in the MDL according to this tables of data that finds.
The S206:web backstage was arrived the information synchronization in the MDL from database according to the time interval of setting.
Above-mentioned for blog being carried out the explanation of write operation in the embodiment of the invention, describe in the face of the process of in the embodiment of the invention blog being carried out read operation down.
A kind of process that blog is carried out read operation that Fig. 3 provides for the embodiment of the invention, this process may further comprise the steps:
S301: the master receives the read operation request that the user sends with load-balanced server, discerns the information of the network of this user attaching.
Specifically as among the step S101 to the corresponding description of write operation requests.
S302:, in the web server cluster, select the web server of corresponding network according to the network of this user attaching of discerning.
Specifically as among the step S102 to the corresponding description of write operation requests.
S303: this read operation request is sent to the web server of selection, corresponding database is carried out read operation through the web server.
The concrete web server that passes through carries out read operation to corresponding database and comprises: the web server is selected to postpone less database according to said MDL with from the delay of database, and the database less to this delay carries out read operation.
In addition; Owing to preserve the corresponding tables of data of identification information of each blog at MDL with from database; Concrete when corresponding database is carried out read operation; Carry out the identification information of the blog of read operation according to this user, search the corresponding tables of data of this identification information, this tables of data is carried out read operation.
A kind of detailed process that blog is carried out read operation that Fig. 4 provides for the embodiment of the invention, this process may further comprise the steps:
S401: the master receives the read operation request that the user sends with load-balanced server, discerns the information of the network of this user attaching.
S402:, in the web server cluster, select the web server of corresponding network according to the network of this user attaching of discerning.
S403: the main web server that this read operation request is sent to selection with load-balanced server.
The S404:web server is searched the corresponding tables of data of this identification information according to the identification information that this user carries out the blog of read operation.
The S405:web server selects to postpone less database according to this tables of data that finds from MDL with from database, and the tables of data that this identification information is corresponding in this database is carried out read operation.
Fig. 5 carries out reading and writing operated system configuration diagram for what the embodiment of the invention provided to blog, in this system, comprises: user side 51, main with load-balanced server 52, web server 53.And also comprise in this system: subsequent use load-balanced server 54 and web backstage 55.
User side 51 is used to send user's read or write request;
Main with load-balanced server 52, be used to receive the read or write request that the user sends, discern the information of the network of this user attaching; According to the network of this user attaching of discerning, in the web server cluster, select the web server of corresponding network; This read or write request is sent to the said web server of selection;
Web server 53 is used for corresponding database is carried out read or write.
Said web server 53 specifically is used for through the gateway mode MDL being carried out write operation.
Said web server 53 specifically is used for carrying out according to said user the blog identification information of write operation, searches the corresponding tables of data of this identification information, and this tables of data is carried out write operation.
Said system also comprises:
Web backstage 55 is used for the write operation to said MDL with the user, is synchronized to from database.
Said web server 53 specifically is used for selecting to postpone less database according to said MDL with from the delay of database, and the database less to this delay carries out read operation.
Said web server 53 specifically is used for carrying out according to said user the identification information of the blog of read operation, searches the corresponding tables of data of this identification information, and this tables of data is carried out read operation.
Said system also comprises:
Subsequent use load-balanced server 54, the HA that sends when being used to receive said master and breaking down notice, the reading and writing operation of process user with load-balanced server.
The embodiment of the invention provides a kind of blog has been carried out reading and writing method of operating and system; This method comprises: the main read or write request that receives user's transmission with load-balanced server; According to the network of user attaching, adopt the web server of map network that this user's read or write request is handled.Owing to pass through the network of load-balanced server according to user attaching in the embodiment of the invention; User's read or write request is sent to the web server of map network; This read or write request is handled; Thereby avoid the web server different that user's read or write request is handled, improved the efficient that the user reads or writes blog with the user attaching network.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.

Claims (14)

1. the method that blog is carried out read or write is characterized in that, said method comprises:
The master receives the read or write request that the user sends with load-balanced server, discerns the information of the network of this user attaching;
According to the network of this user attaching of discerning, in the web server cluster, select the web server of corresponding network;
This read or write request is sent to the said web server of selection, corresponding database is carried out read or write through said web server.
2. the method for claim 1 is characterized in that, said web server carries out write operation to corresponding database and comprises:
Said web server carries out write operation through the gateway mode to MDL.
3. the method for claim 1 is characterized in that, said web server carries out write operation to corresponding database, comprising:
Said web server carries out the blog identification information of write operation according to said user, searches the corresponding tables of data of this identification information, and this tables of data is carried out write operation.
4. like claim 2 or 3 described methods, it is characterized in that said method also comprises:
The Web backstage is synchronized to the write operation of user to said MDL from database.
5. the method for claim 1 is characterized in that, said web server carries out read operation to corresponding database and comprises:
Said web server is selected to postpone less database according to said MDL with from the delay of database, and the database less to this delay carries out read operation.
6. like claim 1 or 5 described methods, it is characterized in that said web server carries out read operation to corresponding database and comprises:
Said web server is searched the corresponding tables of data of this identification information according to the blog identification information that said user carries out read operation, and this tables of data is carried out read operation.
7. the method for claim 1 is characterized in that, said method also comprises:
When said master is broken down with load-balanced server, notify the reading and writing operation requests of subsequent use load-balanced server process user through HA.
8. the system that blog is carried out read or write is characterized in that, said system comprises:
User side is used to send user's read or write request;
The master uses load-balanced server, is used to receive the read or write request that the user sends, and discerns the information of the network of this user attaching; According to the network of this user attaching of discerning, in the web server cluster, select the web server of corresponding network; This read or write request is sent to the said web server of selection;
The web server is used for corresponding database is carried out read or write.
9. system as claimed in claim 8 is characterized in that, said web server specifically is used for through the gateway mode MDL being carried out write operation.
10. system as claimed in claim 8 is characterized in that, said web server specifically is used for carrying out according to said user the identification information of the blog of write operation, searches the corresponding tables of data of this identification information, and this tables of data is carried out write operation.
11., it is characterized in that said system also comprises like claim 9 or 10 described systems:
The Web backstage is used for the write operation to said MDL with the user, is synchronized to from database.
12. system as claimed in claim 8 is characterized in that, said web server specifically is used for selecting to postpone less database according to said MDL with from the delay of database, and the database less to this delay carries out read operation.
13., it is characterized in that said web server specifically is used for carrying out according to said user the identification information of the blog of read operation like claim 8 or 12 described systems, search the corresponding tables of data of this identification information, this tables of data is carried out read operation.
14. system as claimed in claim 8 is characterized in that, said system also comprises:
Subsequent use load-balanced server, the HA that sends when being used to receive said master and breaking down notice, the reading and writing operation of process user with load-balanced server.
CN2011103755705A 2011-11-22 2011-11-22 Method and system for reading and writing microblog Pending CN102510407A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103755705A CN102510407A (en) 2011-11-22 2011-11-22 Method and system for reading and writing microblog

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103755705A CN102510407A (en) 2011-11-22 2011-11-22 Method and system for reading and writing microblog

Publications (1)

Publication Number Publication Date
CN102510407A true CN102510407A (en) 2012-06-20

Family

ID=46222460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103755705A Pending CN102510407A (en) 2011-11-22 2011-11-22 Method and system for reading and writing microblog

Country Status (1)

Country Link
CN (1) CN102510407A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932444A (en) * 2012-10-29 2013-02-13 上海银商资讯有限公司 Load balancing module in financial real-time trading system
CN103974334A (en) * 2014-05-22 2014-08-06 爱维特信息技术有限公司 Server load balance method based on cell phone number
CN104410677A (en) * 2014-11-18 2015-03-11 北京国双科技有限公司 Server load balancing method and device
CN106781876A (en) * 2017-01-13 2017-05-31 南京多伦科技股份有限公司 A kind of multifunctional intellectual vehicle-learning system
CN108241641A (en) * 2016-12-23 2018-07-03 航天星图科技(北京)有限公司 A kind of operating method of distributed data base
WO2020224098A1 (en) * 2019-05-08 2020-11-12 平安科技(深圳)有限公司 Cloud access method and apparatus based on global server load balance, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1130524A2 (en) * 2000-03-03 2001-09-05 Nec Corporation System and method for efficient content delivery
CN1794683A (en) * 2005-12-23 2006-06-28 深圳市深信服电子科技有限公司 Automatic selection method of line based on web
CN101072182A (en) * 2007-05-23 2007-11-14 腾讯科技(深圳)有限公司 Network content update synchronizing method, device and system
CN101119414A (en) * 2007-09-19 2008-02-06 华为技术有限公司 Method and system to access database
CN101764747A (en) * 2009-12-24 2010-06-30 北京世纪互联宽带数据中心有限公司 Intelligent dispatching method, device and system of content delivery network flow

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1130524A2 (en) * 2000-03-03 2001-09-05 Nec Corporation System and method for efficient content delivery
CN1794683A (en) * 2005-12-23 2006-06-28 深圳市深信服电子科技有限公司 Automatic selection method of line based on web
CN101072182A (en) * 2007-05-23 2007-11-14 腾讯科技(深圳)有限公司 Network content update synchronizing method, device and system
CN101119414A (en) * 2007-09-19 2008-02-06 华为技术有限公司 Method and system to access database
CN101764747A (en) * 2009-12-24 2010-06-30 北京世纪互联宽带数据中心有限公司 Intelligent dispatching method, device and system of content delivery network flow

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932444A (en) * 2012-10-29 2013-02-13 上海银商资讯有限公司 Load balancing module in financial real-time trading system
CN102932444B (en) * 2012-10-29 2015-11-25 上海银商资讯有限公司 Load balancing module in finance real-time transaction system
CN103974334A (en) * 2014-05-22 2014-08-06 爱维特信息技术有限公司 Server load balance method based on cell phone number
CN103974334B (en) * 2014-05-22 2018-03-30 无锡爱维特信息技术有限公司 Servo load balance method based on phone number
CN104410677A (en) * 2014-11-18 2015-03-11 北京国双科技有限公司 Server load balancing method and device
CN104410677B (en) * 2014-11-18 2017-12-19 北京国双科技有限公司 Server load balancing method and apparatus
CN108241641A (en) * 2016-12-23 2018-07-03 航天星图科技(北京)有限公司 A kind of operating method of distributed data base
CN106781876A (en) * 2017-01-13 2017-05-31 南京多伦科技股份有限公司 A kind of multifunctional intellectual vehicle-learning system
WO2020224098A1 (en) * 2019-05-08 2020-11-12 平安科技(深圳)有限公司 Cloud access method and apparatus based on global server load balance, and storage medium

Similar Documents

Publication Publication Date Title
US9838375B2 (en) RESTlike API that supports a resilient and scalable distributed application
US8838703B2 (en) Method and system for message processing
CN102316160B (en) Website system and communication method thereof
CN102510407A (en) Method and system for reading and writing microblog
US10122665B2 (en) Distributed synchronization data in a message management service
CN102291324A (en) Highly concurrent service request processing method
US8990331B2 (en) Method, apparatus and system for sharing a microblog message
US20080098071A1 (en) Method and process to unsubscribe from on-going electronic message threads
CN101800762A (en) Service cloud system for fusing multiple services and service implementation method
CA2770138A1 (en) Cluster server of an instant messaging system and messaging method between clusters
CN102769640B (en) The update method of user profile, server and system
CN112788074A (en) Data transmitting method, processing method, receiving method and equipment and storage medium
CN102185801A (en) Information processing method in instant messaging and instant messaging tool
CN107888787B (en) Method and device for processing media access request
CN103037000B (en) Publish-subscribe system and notification message processing method thereof
CN102075575A (en) Cloud service-based mail unified management method and device
CN102546734B (en) Data information processing system and method
CN101841490A (en) Method and system for releasing shared information in instant communication system
KR101606319B1 (en) Method of push messages management using database
US20150256502A1 (en) Method and system for processing social network information
CN109257435B (en) Communication system of multi-instance multi-subsystem application based on message middleware
CN103347253A (en) Large-scale off-line short message distributed sending system and method
CN105743772A (en) Message processing method and system
CN105554712A (en) Short message processing method and user terminal
CN103312585B (en) A kind of rubbish message processing 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
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120620