CN108566415A - A kind of Distributed concurrency control method based on web - Google Patents
A kind of Distributed concurrency control method based on web Download PDFInfo
- Publication number
- CN108566415A CN108566415A CN201810201102.8A CN201810201102A CN108566415A CN 108566415 A CN108566415 A CN 108566415A CN 201810201102 A CN201810201102 A CN 201810201102A CN 108566415 A CN108566415 A CN 108566415A
- Authority
- CN
- China
- Prior art keywords
- token
- current control
- server
- con current
- cluster
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/321—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
- H04L9/3213—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
Abstract
A kind of Distributed concurrency control method based on web, it is characterised in that:Including con current control server and cluster server, the con current control server sends token for generating token, and to the cluster server;The cluster server is used for con current control server request token and returns token to the con current control server;By setting timer and limit value, interaction between cluster server and con current control server is completed according to limit value.The present invention proposes a kind of Distributed concurrency control method based on web, the interaction of con current control process is reduced using the method for predistribution, the performance of cluster con current control is promoted, and is recycled and is reallocated come the unbalanced phenomena in balancing cluster con current control by dynamic.
Description
Technical field
The present invention relates to field of network communication more particularly to a kind of Distributed concurrency control methods based on web.
Background technology
Currently, people for network interconnection net service using more and more common, the service carried on web is also more and more,
The mode that an individual server was serviced in the past cannot already meet the needs of people, then various cluster services
Mode also just increasingly adapts to development, becomes to popularize.
In cluster service, con current control is always a problem, handles cluster server con current control in the prior art
Method be for setting up a central server, after the node of cluster receives request, the order of an execution is asked to central server
Board, if asked to service is carried out, if the token on fruit central server has been requested and (has had reached concurrent maximum value)
Then refuse to execute service.Although this mode simple and flexible, easy to implement, when due to service response each time, it is required for
A token is asked to central server, it is not high so as to cause overall performance, while the token for the server request having is more, has
The token of request is few, leads to the unbalanced phenomena for occurring in cluster con current control.
Invention content
It is an object of the invention to propose a kind of Distributed concurrency control method based on web, the method for predistribution is used
It reduces the interaction of con current control process, promotes the performance of cluster con current control, and recycle and reallocated to put down by dynamic
Unbalanced phenomena in weighing apparatus cluster con current control.
For this purpose, the present invention uses following technical scheme:
A kind of Distributed concurrency control method based on web, including con current control server and cluster server, it is described simultaneously
Hair control server sends token for generating token, and to the cluster server;The cluster server is used for described
Con current control server asks token and returns token to the con current control server;The token is used for the con current control
The whether executable request service of cluster server described in server controls;
It include the process of con current control:
Step A:The con current control server is concurrently worth according to preset, generates the token of respective numbers;
Step B:The con current control server carries out the number of the token according to the quantity of the cluster server
It divides;
Step C:After the cluster server starts, the token of initial number is got to the con current control server;
Step D:Timer sets a time limit T and is detected on the cluster server after the time limit T terminates
Idle token quantity H;
Step E:Limit value S, W, Q and a Y are set, according to the idle token number on the cluster server detected
Amount H is judged, if the free time token quantity H is more than limit value S, by the idle token quantity on the cluster server
H reduces W, and by W token of reduction return to the con current control server;If the free time token quantity H is less than
Limit value Q, then cluster server active is asked for into token to the con current control server;
Step F:When the idle token quantity H is less than limit value Q, the cluster server is to the con current control service
When device asks token, then the token quantity on the con current control server is judged, if on con current control server
Token quantity is more than Y, then Y token is sent to the cluster server of request token by the con current control server.
Preferably, judged according to the idle token quantity H on the cluster server detected, if the free time
When token quantity H is less than or equal to limit value S, then timer is reset.
Preferably, judged according to the idle token quantity H on the cluster server detected, if the free time
When token quantity H is greater than or equal to limit value B, then timer is reset.
Preferably, when the idle token quantity H on the cluster server is less than B, and the cluster server is to described
It is described concurrent if the token quantity on con current control server is less than or equal to Y when con current control server asks token
All token quantity is sent to the cluster server of request token by control server.
Description of the drawings
Fig. 1 is the overall flow figure of the present invention.
Specific implementation mode
Technical solution to further illustrate the present invention below with reference to the accompanying drawings and specific embodiments.
A kind of Distributed concurrency control method based on web of the present embodiment, including con current control server and cluster clothes
Business device, the con current control server send token for generating token, and to the cluster server;The cluster server
For giving the con current control server to con current control server request token and return token;The token is used for institute
State the whether executable request service of cluster server described in con current control server controls;
The con current control for realizing cluster, by setting up a con current control server, when the node of cluster server receives
When request, cluster server will ask a token to concurrency controller, if request to that can execute service, therefore, is somebody's turn to do
Token is just as one of pass.(reach concurrent maximum) after the token on con current control server is applied,
Then refusal is serviced.
As shown in Figure 1, including the process of con current control:
Step A:The con current control server is concurrently worth according to preset, generates the token of respective numbers;
Step B:The con current control server carries out the number of the token according to the quantity of the cluster server
It divides;
Step C:After the cluster server starts, the token of initial number is got to the con current control server;
Step D:Timer sets a time limit T and is detected on the cluster server after the time limit T terminates
Idle token quantity H;
Step E:Limit value S, W, Q and a Y are set, according to the idle token number on the cluster server detected
Amount H is judged, if the free time token quantity H is more than limit value S, by the idle token quantity on the cluster server
H reduces W, and by W token of reduction return to the con current control server;If the free time token quantity H is less than
Limit value Q, then cluster server active is asked for into token to the con current control server;
Step F:When the idle token quantity H is less than limit value Q, the cluster server is to the con current control service
When device asks token, then the token quantity on the con current control server is judged, if on con current control server
Token quantity is more than Y, then Y token is sent to the cluster server of request token by the con current control server.
Con current control server generates the token of respective numbers according to concurrently value, and is carried out according to the quantity of cluster server
It divides, after cluster server is activated daily, a certain number of tokens can be got to con current control server, i.e., most start to lead
The initial token number taken.
Timer sets time limit T, and time limit T, limit value S, W, Q, H and Y should all be according to the operations of specific cluster server
Depending on situation.
After in the time limit, T terminates, if idle token quantity H is more than S to cluster server on hand, by cluster server hand
The token quantity H of upper free time reduces W, and W token of reduction is returned to con current control server.
After in the time limit, T terminates, if idle token quantity H is less than Q to cluster server on hand, cluster server is actively
Token is asked for con current control server, if at this moment token quantity is more than Y on con current control server, to the cluster asked for
Y token of server issues, if being not greater than Y, how many token just provides how many a tokens on con current control server
To the cluster server asked for.
Preferably, as shown in Figure 1, being judged according to the idle token quantity H on the cluster server detected,
If the free time token quantity H is less than or equal to limit value S, timer is reset.
Preferably, as shown in Figure 1, being judged according to the idle token quantity H on the cluster server detected,
If the free time token quantity H is greater than or equal to limit value B, timer is reset.
Preferably, as shown in Figure 1, when the idle token quantity H on the cluster server is less than B, and the cluster takes
When being engaged in device to con current control server request token, if the token quantity on con current control server is less than or equal to Y,
Then all token quantity is sent to the cluster server of request token by the con current control server.
Beneficial effects of the present invention:
1, the interaction during con current control is reduced by the method for predetermined distribution, does not have to each cluster server and asks
Once, it just to be interacted with con current control server once, promote the performance of cluster con current control;
2, recycled and reallocated using dynamic the unbalanced phenomena come in balancing cluster con current control.
The technical principle of the present invention is described above in association with specific embodiment.These descriptions are intended merely to explain the present invention's
Principle, and it cannot be construed to limiting the scope of the invention in any way.Based on the explanation herein, the technology of this field
Personnel would not require any inventive effort the other specific implementation modes that can associate the present invention, these modes are fallen within
Within protection scope of the present invention.
Claims (4)
1. a kind of Distributed concurrency control method based on web, it is characterised in that:Including con current control server and cluster service
Device, the con current control server send token for generating token, and to the cluster server;The cluster server is used
In to the con current control server request token and return token give the con current control server;The token is for described
The whether executable request service of cluster server described in con current control server controls;
It include the process of con current control:
Step A:The con current control server is concurrently worth according to preset, generates the token of respective numbers;
Step B:The con current control server draws the number of the token according to the quantity of the cluster server
Point;
Step C:After the cluster server starts, the token of initial number is got to the con current control server;
Step D:Timer sets a time limit T and detects the free time on the cluster server after the time limit T terminates
Token quantity H;
Step E:Limit value S, W, Q and a Y are set, according to the idle token quantity H on the cluster server detected
Judged, if the free time token quantity H is more than limit value S, the idle token quantity H on the cluster server is subtracted
It is W few, and by W token of reduction return to the con current control server;It is limited if the free time token quantity H is less than
Value Q, then cluster server active is asked for into token to the con current control server;
Step F:When the idle token quantity H is less than limit value Q, the cluster server is asked to the con current control server
When seeking token, then the token quantity on the con current control server is judged, if the token on con current control server
Quantity is more than Y, then Y token is sent to the cluster server of request token by the con current control server.
2. a kind of Distributed concurrency control method based on web according to claim 1, it is characterised in that:According to detecting
The cluster server on idle token quantity H judged, if the free time token quantity H is less than or equal to limit value
When S, then timer is reset.
3. a kind of Distributed concurrency control method based on web according to claim 1, it is characterised in that:According to detecting
The cluster server on idle token quantity H judged, if the free time token quantity H is greater than or equal to limit value
When B, then timer is reset.
4. a kind of Distributed concurrency control method based on web according to claim 1, it is characterised in that:When the cluster
Idle token quantity H on server is less than B, and when the cluster server asks token to the con current control server,
If token quantity on con current control server is less than or equal to Y, the con current control server is by all token numbers
Amount is sent to the cluster server of request token.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810201102.8A CN108566415A (en) | 2018-03-12 | 2018-03-12 | A kind of Distributed concurrency control method based on web |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810201102.8A CN108566415A (en) | 2018-03-12 | 2018-03-12 | A kind of Distributed concurrency control method based on web |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108566415A true CN108566415A (en) | 2018-09-21 |
Family
ID=63531732
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810201102.8A Pending CN108566415A (en) | 2018-03-12 | 2018-03-12 | A kind of Distributed concurrency control method based on web |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108566415A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080212783A1 (en) * | 2007-03-01 | 2008-09-04 | Toshiba America Research, Inc. | Kerberized handover keying improvements |
CN101751335A (en) * | 2008-11-28 | 2010-06-23 | 国际商业机器公司 | Method, device and cluster system for collecting rubbish of scheduling virtual machine |
CN101834786A (en) * | 2010-04-15 | 2010-09-15 | 华为技术有限公司 | Queue scheduling method and device |
CN101964752A (en) * | 2010-10-19 | 2011-02-02 | 杨忠明 | Broadband network access method for dynamic adjustment resource allocation |
CN103765859A (en) * | 2013-10-25 | 2014-04-30 | 华为技术有限公司 | Method, control device, nodes and system of multipath auxiliary flow control |
CN105072046A (en) * | 2015-07-09 | 2015-11-18 | 哈尔滨工程大学 | Delay tolerant network congestion prevention method based on data concurrence and forwarding by token control node |
CN105991463A (en) * | 2015-02-13 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Method and system for realizing flow control, message main node, and token server |
CN106843170A (en) * | 2016-11-30 | 2017-06-13 | 浙江中控软件技术有限公司 | Method for scheduling task based on token |
CN107635144A (en) * | 2017-10-25 | 2018-01-26 | 暴风集团股份有限公司 | Server output stream amount method for limiting speed, device, server and DNS systems |
-
2018
- 2018-03-12 CN CN201810201102.8A patent/CN108566415A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080212783A1 (en) * | 2007-03-01 | 2008-09-04 | Toshiba America Research, Inc. | Kerberized handover keying improvements |
CN101751335A (en) * | 2008-11-28 | 2010-06-23 | 国际商业机器公司 | Method, device and cluster system for collecting rubbish of scheduling virtual machine |
CN101834786A (en) * | 2010-04-15 | 2010-09-15 | 华为技术有限公司 | Queue scheduling method and device |
CN101964752A (en) * | 2010-10-19 | 2011-02-02 | 杨忠明 | Broadband network access method for dynamic adjustment resource allocation |
CN103765859A (en) * | 2013-10-25 | 2014-04-30 | 华为技术有限公司 | Method, control device, nodes and system of multipath auxiliary flow control |
CN105991463A (en) * | 2015-02-13 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Method and system for realizing flow control, message main node, and token server |
CN105072046A (en) * | 2015-07-09 | 2015-11-18 | 哈尔滨工程大学 | Delay tolerant network congestion prevention method based on data concurrence and forwarding by token control node |
CN106843170A (en) * | 2016-11-30 | 2017-06-13 | 浙江中控软件技术有限公司 | Method for scheduling task based on token |
CN107635144A (en) * | 2017-10-25 | 2018-01-26 | 暴风集团股份有限公司 | Server output stream amount method for limiting speed, device, server and DNS systems |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108494703B (en) | Access frequency control method, device and storage medium | |
CN108667654A (en) | The automatic expansion method of server cluster and relevant device | |
CN105808333B (en) | Method for allocating tasks and system | |
CN105554102A (en) | Elastic expansion method based on container cluster and application system thereof | |
CN105335231B (en) | server thread dynamic allocation method and device | |
CN107800768A (en) | Open platform control method and system | |
CN103067293A (en) | Method and system for multiplex and connection management of a load balancer | |
CN110580188B (en) | Multithreading network allocation method and storage medium | |
CN106610871A (en) | Cloud operating system architecture | |
CN103744723A (en) | Thread pool managing method and system | |
CN103825785B (en) | Monitoring method and device of service node | |
CN105262826A (en) | Method and system for adjusting interface processing amount | |
CN105702257A (en) | Speech processing method and device | |
CN108681481A (en) | The processing method and processing device of service request | |
CN104461731B (en) | Resources of virtual machine recovery method and device in a kind of dynamic resource extension | |
CN105915583A (en) | Method for starting service cluster, and service cluster | |
CN110471749A (en) | Task processing method, device, computer readable storage medium and computer equipment | |
CN105373434A (en) | Resource management system and method | |
CN109597674B (en) | Shared virtual resource pool share scheduling method and system | |
CN108566415A (en) | A kind of Distributed concurrency control method based on web | |
CN106407013A (en) | Resource dynamic dispatching method, apparatus and system, and resource dispatching server | |
CN113032092B (en) | Distributed computing method, device and platform | |
CN110019487A (en) | A kind of database connection management method and device | |
CN114880042A (en) | Application starting method and device, electronic equipment and computer readable storage medium | |
CN108391268A (en) | Upper line control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180921 |
|
RJ01 | Rejection of invention patent application after publication |