CN1194503C - Method for transmitting user required massage based on user, server mode - Google Patents

Method for transmitting user required massage based on user, server mode Download PDF

Info

Publication number
CN1194503C
CN1194503C CN 02121133 CN02121133A CN1194503C CN 1194503 C CN1194503 C CN 1194503C CN 02121133 CN02121133 CN 02121133 CN 02121133 A CN02121133 A CN 02121133A CN 1194503 C CN1194503 C CN 1194503C
Authority
CN
China
Prior art keywords
request message
message
level buffer
pond
level
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.)
Expired - Fee Related
Application number
CN 02121133
Other languages
Chinese (zh)
Other versions
CN1466311A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 02121133 priority Critical patent/CN1194503C/en
Publication of CN1466311A publication Critical patent/CN1466311A/en
Application granted granted Critical
Publication of CN1194503C publication Critical patent/CN1194503C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The present invention discloses a method for transmitting user request massages based on a mode of a client and a server. A first level buffer pool is arranged for storing the request messages which are transmitted to a server and wait for a response, and a second level buffer pool is also arranged for storing the request messages which wait for being transmitted to the first level buffer pool. When a client end produces the request messages, if the first level buffer pool has vacant nodes, then the messages are transmitted to the server and are stored in the nodes corresponding to message transmitting identification in first level buffer pool, else the request messages are stored in the second level buffer pool. After the transmission of the request message is completed in the first level buffer pool, the first level buffer pool reads one request message for transmission from the second level buffer pool, and the message is stored in the vacant node of the first level buffer pool. The project can solve the problem of insufficient message ID resource, which is convenient for controlling the intensity of transmitting messages of the client end, and is suitable for the requirements of servers with different processing capacity and the management of a large number of users.

Description

Sending method based on user's request message of client, server mode
Technical field
The present invention relates in the network system file transmitting method based on client, server (Client/server) pattern.
Background technology
In the network struture system of client/server (Client/Server), when the user end to server end is initiated the request message of similar authentication and charging, server responds this request message, the coupling of request message and response message depends on the sign (ID) of message, because adopted the restriction of the agreement ID length of client terminal/server structure, the quantity that makes user end to server send message simultaneously is restricted.With the remote user dialing authentication protocol (radius protocol) that is mainly used in authentification of user mandate and charging is example, the client-side program of RADIUS runs on the equipment that data, services is provided usually, radius server runs on the work station usually, its task is to receive user's connection request that client is sent, and checking, charges and provides the service configuration information needed to client.The task of client is the radius server that user's information is sent to appointment, and radius server carries out the authentication and authorization charging service according to the data in the database to the user, and gives client end response.Client is handled according to the response message of server then. because the message ID of RADIUS has only a byte long, causing client simultaneously to send the number of request message to server can not be above 256, when the number of users that sends request message during greater than 256, must make some message can't obtain ID, like this user of client-side management more for a long time, may cause to send losing or producing bigger delay of message, this is totally unfavorable the user of customer end/server mode to managing extensive work.
Summary of the invention
The object of the present invention is to provide a kind of sending method that a fairly large number of user is managed of helping based on user's request message of client, server mode, use this method to prevent that server from being impacted according to the transmission density of server handling ability dynamic adjustments user request message.
For achieving the above object, the sending method of the user's request message based on client, server mode provided by the invention comprises:
A. in client the two-stage Buffer Pool is set, wherein the first-level buffer pond is used for depositing the request message of assignment message transmission sign, and each request message takies a node; Two utmost point Buffer Pools are used for depositing the request message that unallocated message sends sign, and each request message takies a node, and when in the first-level buffer pond idle node being arranged, the request message in the level 2 buffering pond enters the first-level buffer pond after assignment message sends sign; The message that the node number in described first-level buffer pond is less than or equal to the agreement support of managing request message sends the sign sum;
B. when client generates request message, if there is idle node in the first-level buffer pond, then be that this request message assignment message sends sign, send this message and store this message into node that message described in the first-level buffer pond sends the sign correspondence to server simultaneously, do not have idle node as the first-level buffer pond and then deposit this request message in the level 2 buffering pond;
C. after having request message to be sent completely in the first-level buffer pond, discharge shared node of this request message and message and send sign, from the level 2 buffering pond, read a request message simultaneously according to the order of sequence and send sign for it distributes the message that discharges, send this message to server, and this message is stored in the node of above-mentioned release in the first-level buffer pond.
Structure of arrays is adopted in described first-level buffer pond, and the doubly linked list structure is adopted in described level 2 buffering pond.
Each node in described first-level buffer pond is provided with timer, retransmits the described request message when being used for not meeting with a response in the certain hour after the request message of this node sends to server.
The node number in described first-level buffer pond is provided with according to the data in server disposal ability under the condition that satisfies the message transmission sign sum that is less than or equal to the agreement support of managing request message.
Step c also comprises judging whether have request message to be sent completely in the first-level buffer pond, the described request message is sent completely and comprises the correct response of receiving this request message, or the repeating transmission number of times of this request message surpasses two kinds of situations of designated value.
Because the present invention is provided with the level 2 buffering pond, when client generates request message, if there is the free time in the first-level buffer pond, then this request message application obtains message transmission sign and stores the node of message transmission sign correspondence in the first-level buffer pond into to the server transmission and with this message immediately, otherwise deposits this request message in the level 2 buffering pond; After having request message to be sent completely in the first-level buffer pond, from the level 2 buffering pond, read request message and send, and this message is stored in the first-level buffer pond; Like this, can realize management at leisure to request message, solve the problem of message ID inadequate resource, thereby make to using the big capacity of similar radius protocol, high-density equipment provides the authentication and authorization charging service time to stand good, and can not cause to send losing or producing bigger delay of message, simultaneously can be by disposing dynamically, realization adapts to the server requirement of different disposal ability to the control of client transmission message intensity.
Description of drawings
Fig. 1 is the client message transmission flow figure of the method for the invention embodiment;
Fig. 2 is the Buffer Pool message transmission flow figure of the method for the invention embodiment;
Fig. 3 is the level 2 buffering pond schematic diagram that the present invention adopts;
Fig. 4 is the message transition schematic diagram in the level 2 buffering pond of Fig. 2.
Embodiment
The method of the invention adopts message to send Buffer Pool and realizes, can adopt two separate processes to realize that respectively client generates the transmission of message and the transmission of Buffer Pool message when specific implementation.
Is that the present invention is described in further detail for example below in conjunction with accompanying drawing with the client and server that adopts radius protocol.
The present invention in the specific implementation, at first be provided with to deposit and send to server just in the first-level buffer pond of the request message of wait-for-response, and two utmost point Buffer Pools of depositing the request message that wait sends to the first-level buffer pond, structure of arrays is adopted in described first-level buffer pond, and the doubly linked list structure is adopted in described level 2 buffering pond.Because radius protocol regulation, the charging request message is retransmitted at every turn, must change the ID of message, so, the node number that the first-level buffer pond is used to deposit request message is less than or equal to the maximum that is used for the identification request message of message management agreement regulation, the interstitial content in first-level buffer pond is 255 to the maximum in this example, can guarantee like this, the message in each first-level buffer pond can both be applied for the ID of message, the node number in certain described first-level buffer pond can also be provided with in less than 255 scope according to the data in server disposal ability.Simultaneously, each node in the first-level buffer pond is equipped with corresponding timer, is used for regularly retransmitting in the response of not receiving radius server the message of this node.
Because it is separately independently that the message of each node in the first-level buffer pond sends, each node all possesses the retransmit operation that corresponding timer is controlled the message of this node.Thereby also directly the intensity size of the RADIUS message of server transmission is relevant in the same way for the size in first-level buffer pond.When server handling ability is powerful, can dispose big first-level buffer pond, make more message can access simultaneously and send, accelerate the response time that the authentification of user mandate is chargeed; When server handling ability was more weak, we can reduce the size in first-level buffer pond, and the intensity of control appliance side message guarantees that server can reply calmly.
Message in the described level 2 buffering pond does not all have the ID of message.Be in message in this Buffer Pool etc. and be transferred in the first-level buffer pond, just can obtain sending.The size in level 2 buffering pond can define according to actual conditions, can dispose dynamically equally.The schematic diagram of the message two-stage Buffer Pool that this example adopts is with reference to figure 3.
Fig. 1 is the client message transmission flow figure of the method for the invention embodiment.According to Fig. 1, when client when step 11 generates new request message, enter by unified inlet, judge in step 12 whether the first-level buffer pond is free idle node, if there is idle node in the first-level buffer pond, then obtain message and send ID in this request message application of step 13, send this message and store this message in the first-level buffer pond corresponding node of message transmission sign to radius server simultaneously, start timer simultaneously, so that when in the fixed time of configuration, still not receiving the response of server, resend this message to this message.If the first-level buffer pond does not have absolutely empty not busy node, then deposit this request message the afterbody of level 2 buffering pond in step 14, waiting for transitting in the first-level buffer pond sending.
Fig. 2 is the Buffer Pool message transmission flow figure of the method for the invention embodiment.According to Fig. 2, at first judge in step 21 whether idle node is arranged in the first-level buffer pond, whether in first-level buffer pond have request message be sent completely, whether this judgement is received the correct response of this message or judged whether the repeating transmission number of times of this message surpasses the number of times realization of appointment by judging in the time of appointment if promptly judging.Have message to receive when the repeating transmission number of times of corresponding correct response message or this message goes beyond the limit in being in the level cache pond, then the first-level buffer pond message that is in this node needs deleted.Promptly in the message of this node of step 22 deletion, discharge shared node of this message and message and send sign, from the level 2 buffering pond, read a request message simultaneously according to the order of sequence, promptly obtain to be in the message of head, utilize the message of above-mentioned release to send this message of sign transmission, and this message is stored in the node of above-mentioned release in the first-level buffer pond, get back to step 21 then and continue to judge; If judge in the first-level buffer pond there is not idle node, then to continue step 21 and continue to judge in step 21.Said process is with reference to figure 4.
In Fig. 3 and Fig. 4, for convenience node in the array and the node in the chained list move mutually, to the node definition in the array among Fig. 3,4 data structure identical with chained list node.
Message in the level 2 buffering pond also will be applied for the ID of message when adding the first-level buffer pond, like this, the message that can write down this ID of use simultaneously with when receiving the response message of server, can find the request message that matches in the position in first-level buffer pond easily.
When the method for the invention is specifically implemented, variation that can be certain, so that the present invention has the better implement effect, for example in customer end/server mode based on radius protocol, to message identifying and charging message separate processes, every kind of message all has oneself independently message level 2 buffering pond.Because the different in kind of these two kinds of messages, therefore variation is slightly carried out in the level 2 buffering pond that need describe in the above, handles respectively:
(1) processing of message identifying:
For message identifying, the time that message requires to meet with a response is gone up relatively strictness of requirement, can not get authentication response for a long time because the user may can not put up with.
At first, in the configuration of the level cache Buffer Pool of message identifying, the first-level buffer pond that a general configuration is bigger, for example: 80; Like this, the chance that user's message identifying joins in the first-level buffer pond immediately increases, and has also dwindled the time that is trapped in the level 2 buffering pond simultaneously.
Secondly, on the transmission algorithm basis in the level 2 buffering pond of message, do some improvement.Message identifying timed sending in the first-level buffer pond surpasses configured number (for example 3 times) and does not still receive response if send number of times, then thinks authentification failure.When being in message in the level 2 buffering pond and transitting to message first-level buffer pond, need to calculate this message and be trapped in time in the level 2 buffering pond, should convert the time is to send number of times, if the transmission number of times that conversion is come out surpasses configured number, then no longer send, think authentification failure; Like this, just guarantee the authenticated time of message identifying, satisfied the requirement of message identifying on promptness.
(2) processing of charging message:
The requirement of charging message is with the requirement difference of message identifying, on real-time, require not as the message identifying strictness, but in the fail safe of message, require higher, server temporarily break down during, charging message can not be abandoned easily, can not just abandon charging message because of the response that can not receive server.Corresponding these requirements, carry out following processing:
At first, in the configuration of the level cache Buffer Pool of message identifying, the first-level buffer pond that a general configuration is smaller, for example: 2; Like this, the chance that user's charging message joins in the first-level buffer pond immediately is very little, and charging message generally joins in the level 2 buffering pond after producing, and after the message in the wait first-level buffer pond meets with a response, just has an opportunity to obtain to send;
Secondly, be in the charging message in the first-level buffer pond, send and still do not receive response after number of times arrives configured number (for example 3 times), do not abandon, but it is extractd from the first-level buffer pond, be placed into the afterbody in level 2 buffering pond, wait for when transitting to the first-level buffer pond once more sending, deletion after 3 times so repeatedly.Like this, if when server can normal response, charging message equally can very fast transmission.When Server broke down, because the first-level buffer pond is very little, a large amount of charging messages left in the level 2 buffering pond, forms very long chained list.A charging message need experience the afterbody head that moves on to chained list gradually from chained list three times, just can obtain send opportunity.Like this, increased the residence time of charging message in equipment greatly, the fail safe that has improved charging message.

Claims (5)

1, a kind of sending method of the user's request message based on client, server mode comprises:
A. in client the two-stage Buffer Pool is set, wherein the first-level buffer pond is used for depositing the request message of assignment message transmission sign, and each request message takies a node; Two utmost point Buffer Pools are used for depositing the request message that unallocated message sends sign, and each request message takies a node, and when in the first-level buffer pond idle node being arranged, the request message in the level 2 buffering pond enters the first-level buffer pond after assignment message sends sign; The message that the node number in described first-level buffer pond is less than or equal to the agreement support of managing request message sends the sign sum;
B. when client generates request message, if there is idle node in the first-level buffer pond, then be that this request message assignment message sends sign, send this request message and store this request message into node that message described in the first-level buffer pond sends the sign correspondence to server simultaneously, do not have idle node as the first-level buffer pond and then deposit this request message in the level 2 buffering pond;
C. after having request message to be sent completely in the first-level buffer pond, discharge shared node of this request message and message and send sign, from the level 2 buffering pond, read a request message simultaneously according to the order of sequence and send sign for it distributes the message that discharges, send this request message to server, and this request message is stored in the node of above-mentioned release in the first-level buffer pond.
2, the sending method of user's request message according to claim 1 is characterized in that: structure of arrays is adopted in described first-level buffer pond, and the doubly linked list structure is adopted in described level 2 buffering pond.
3, the sending method of user's request message according to claim 1, it is characterized in that: each node in described first-level buffer pond is provided with timer, retransmits the described request message when being used for not meeting with a response in the certain hour after the request message of this node sends to server.
4, the sending method of user's request message according to claim 3, it is characterized in that: the node number in described first-level buffer pond is provided with according to the data in server disposal ability under the condition that satisfies the message transmission sign sum that is less than or equal to the agreement support of managing request message.
5, the sending method of user's request message according to claim 4, it is characterized in that step c also comprises judges whether have request message to be sent completely in the first-level buffer pond, the described request message is sent completely and comprises the correct response of receiving this request message, or the repeating transmission number of times of this request message surpasses two kinds of situations of designated value.
CN 02121133 2002-06-10 2002-06-10 Method for transmitting user required massage based on user, server mode Expired - Fee Related CN1194503C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02121133 CN1194503C (en) 2002-06-10 2002-06-10 Method for transmitting user required massage based on user, server mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02121133 CN1194503C (en) 2002-06-10 2002-06-10 Method for transmitting user required massage based on user, server mode

Publications (2)

Publication Number Publication Date
CN1466311A CN1466311A (en) 2004-01-07
CN1194503C true CN1194503C (en) 2005-03-23

Family

ID=34142131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02121133 Expired - Fee Related CN1194503C (en) 2002-06-10 2002-06-10 Method for transmitting user required massage based on user, server mode

Country Status (1)

Country Link
CN (1) CN1194503C (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8447876B2 (en) * 2005-06-02 2013-05-21 Thomson Licensing Content timing method and system
CN100452712C (en) * 2006-03-31 2009-01-14 腾讯科技(深圳)有限公司 Method for automatic adding member and its system
CN101714099B (en) * 2009-12-16 2012-12-05 金蝶软件(中国)有限公司 Processing method, device and data processing system of rowset data
CN102662761A (en) * 2012-03-27 2012-09-12 福建星网锐捷网络有限公司 Method and device for scheduling memory pool in multi-core central processing unit system
CN104935612A (en) * 2014-03-17 2015-09-23 深圳市金蝶友商电子商务服务有限公司 Data processing method and server
CN106603723B (en) * 2017-01-20 2019-08-30 腾讯科技(深圳)有限公司 A kind of request message processing method and processing device
CN108800447A (en) * 2018-04-17 2018-11-13 南京铁道职业技术学院 A kind of temperature and humidity control system and its method

Also Published As

Publication number Publication date
CN1466311A (en) 2004-01-07

Similar Documents

Publication Publication Date Title
US5949977A (en) Method and apparatus for requesting and processing services from a plurality of nodes connected via common communication links
US8073900B2 (en) Method and system for providing on-line interactivity over a server-client network
CN1146803C (en) Update notification apparatus in information communication system using computer network
JP2783292B2 (en) Dynamic invocation technology
CN1315292C (en) Method for implementing network communication by identifying one user group with one number
CN108702486B (en) Low-delay audio and video transmission method and device and computer readable storage medium
CN1681248A (en) Method and system for transmitting data for data synchronization between server and client
KR100725066B1 (en) A system server for data communication with multiple clients and a data processing method
CN1194503C (en) Method for transmitting user required massage based on user, server mode
US7395314B2 (en) Systems and methods for governing the performance of high volume electronic mail delivery
CN1846403A (en) Efficient notification of new electronic mail arrival
CN103179148A (en) Processing method and system for sharing enclosures in internet
CN1299203A (en) Shared data transmission method in computer network
CN100450105C (en) Synchronous information interface realizing method based on JAVA information service
CN101035006A (en) Method for sending the prompt notice to the user in the instant communication process
CN1578280A (en) System and method for message-based scalable data transport
CN1977509A (en) Method of selecting one server out of a server set
CN1277196C (en) Method for applied server of computer system
CN1937811A (en) Terminal and server communication method, system and device
CN1738265A (en) Monitoring system and method for Internet multimedia communication
CN1980131B (en) Mail interception method and module for realizing said method
CN1518388A (en) Method and system for processing case of soft exchange open system
CN1385985A (en) Method for realizing business phonetic dynamic loading in intelligent network and system network establishment
CN100337228C (en) Time-out adaptive method in remote synchronous calling procedure
CN1859334A (en) Method for distributing content information

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20050323

Termination date: 20130610