CN106453471A - Sending method and apparatus, and obtaining method and apparatus of lease data based on distributed applications - Google Patents

Sending method and apparatus, and obtaining method and apparatus of lease data based on distributed applications Download PDF

Info

Publication number
CN106453471A
CN106453471A CN201610539801.4A CN201610539801A CN106453471A CN 106453471 A CN106453471 A CN 106453471A CN 201610539801 A CN201610539801 A CN 201610539801A CN 106453471 A CN106453471 A CN 106453471A
Authority
CN
China
Prior art keywords
lease
request
server
data
time
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
CN201610539801.4A
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.)
1Verge Internet Technology Beijing Co Ltd
Original Assignee
1Verge Internet Technology Beijing 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 1Verge Internet Technology Beijing Co Ltd filed Critical 1Verge Internet Technology Beijing Co Ltd
Priority to CN201610539801.4A priority Critical patent/CN106453471A/en
Publication of CN106453471A publication Critical patent/CN106453471A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/567Integrating service provisioning from a plurality of service providers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a sending method and apparatus, and an obtaining method and apparatus of lease data based on distributed applications. The sending method includes: a buffer structure with a lease mechanism is established; a registration request of a server is received, the server which satisfies a registration condition is selected as a main server, the lease data in the lease mechanism is sent to the main server, and the main server is authorized to provide data service; and a renewal request of the main server is received, whether the main server satisfies a renewal condition is determined, if yes, the renewal is successful, and the data service is continuously provided; and if not, the renewal is failed, and the step for receiving the registration request of the server is entered. Therefore, according to the method, the execution service function is strong, the server realizes the hot standby function during multi-unit automatic operation, based on low cost and high time efficiency, a standby unit can take over the service in a second level when one server has faults, business loss brought by the single-point problem is reduced, problems of single-point faults and split brain are thoroughly solved, and artificial intervention is not needed in the whole process.

Description

A kind of transmission of the lease data based on Distributed Application and acquisition methods, device
Technical field
The present invention relates to Internet technical field, particularly to a kind of sender of the lease data based on Distributed Application Method and acquisition methods, and dispensing device and acquisition device.
Background technology
In Distributed Application scene, there are complex application scenarios, such as have give bonus, spending on ads divides Send out or the amount of money group amount etc. function scheduling of resource.Be generally directed to the scheduling of resource with such function, in field existing using such as Rewrite mysql engine, the hardware configuration increasing sorter, the semi-automatic mode such as hot standby, but those modes excessively heavyweight, no But high cost also needs to manual intervention.
Under conditions of the typically the whole network service of above-mentioned scheduling of resource needs to consume same number evidence, for ensureing user's body simultaneously A data cutting can be many parts, be distributed to very multiple servers and consumed simultaneously by inspection and service performance;As responsible point The server sent out then seems to be still important, because data only has portion, easily produces Single Point of Faliure or under multimachine services simultaneously Schizencephaly problem.Once the server fail being responsible for distribution cannot normally provide service, it will affect whole distribution applications field Consumer's Experience in scape and the commercial interest damaged.
So be directed to this kind of situation, how to realize a kind of low cost multimachine automatic running when hot-backup function, solve single-point Fault and avoid Schizencephaly problem, whole without manual intervention, reduce the business loss bringing due to single-point problem.
Content of the invention
The present invention provides a kind of sending method of the lease data based on Distributed Application, acquisition methods and sends dress Put, acquisition device, to solve the above problems.
The invention provides a kind of sending method of the lease data based on Distributed Application, including:
Set up the buffer structure with lease mechanism;
The registration request of the reception server, chooses the server meeting registration condition as master server, and sends described In lease mechanism, lease data, to described master server, authorizes described master server to provide data, services;
Receive the renewed treaty request of described master server, judge whether described master server meets renewed treaty condition, if meeting, Renew a contract successfully, continue to provide data, services;If being unsatisfactory for, renewing a contract unsuccessfully, entering the step of described the reception server registration request Suddenly.
Preferably, the registration request of described the reception server, chooses the server meeting registration condition as master server, Including:
Record receives the time of described registration request;
Compare the time of described registration request it is allowed to receive the minimum server registration success of time value.
Preferably, described foundation has the buffer structure of lease mechanism, including:Set up the lease lock of lease mechanism, lease Lock time limit and lease are locked address and are cached corresponding lease data.
Preferably, the described renewed treaty request receiving described master server, judges whether described master server meets renewed treaty bar Part, including:
Whether the time relatively receiving described request of renewing a contract locks the time limit less than lease, if so, then renews a contract successfully, if it is not, then Renew a contract unsuccessfully.
Preferably, the described renewed treaty request receiving described master server, judges whether described master server meets renewed treaty bar Part, including:
Relatively more described renew a contract the request reception time whether with renewed treaty time phase set in advance when setting up lease mechanism Join, if so, then renew a contract successfully, if it is not, then renewing a contract unsuccessfully.
Preferably, described authorize described master server to provide data, services after, including:
Re-register request time according to set in advance in described lease mechanism, receive from except described master server Server in addition re-register request;
Re-registering described in judgement and ask whether to meet to re-register request condition, if meeting, judging described lease machine System, with the presence or absence of the described master server authorizing, if so, then returns and re-registers failure, if it is not, then execute described selection meeting Re-register the step as master server for the server of success conditions;If being unsatisfactory for, returning and re-registering failure.
Preferably, re-register described in described judgement and ask whether to meet to re-register success conditions, including:
Whether the reception time re-registering request described in relatively presets renewed treaty time and described lease between described Between the lock time limit.
Preferably, the described renewed treaty time set in advance is to obtain the time value of setting after described lease data.
The invention provides a kind of dispensing device of the lease data based on Distributed Application, including:
Buffer structure sets up unit, for setting up the buffer structure with lease mechanism;
Data, services granted unit, for the registration request of the reception server, chooses the server work meeting registration condition For master server, and send lease data in described lease mechanism and, to described master server, authorize described master server to provide number According to service;
Renewed treaty request unit, the renewed treaty for receiving described master server is asked, and judges whether described master server meets Renewed treaty condition, if meeting, renewing a contract successfully, continuing to provide data, services;If being unsatisfactory for, renewing a contract unsuccessfully, entering data, services Granted unit, the step of the registration request of execution the reception server.
Preferably, described data, services granted unit, including:
Recording unit, receives the time of described registration request for record;
Registration comparing unit, the time for relatively described registration request is it is allowed to the time of reception minimum server registration Success.
Preferably, described buffer structure is set up unit and is included:Set up the lease lock of lease mechanism, lease lock time limit and rent About lock address and cache corresponding lease data.
Preferably, described renewed treaty request unit, including:
Renewed treaty comparing unit, for comparing whether the time receiving described request of renewing a contract locks the time limit less than lease, if so, then Renew a contract successfully, if it is not, then renewing a contract unsuccessfully.
Preferably, described renewed treaty request unit, including:
Renewed treaty comparison match unit, whether pre- with when setting up lease mechanism for the relatively more described request reception time of renewing a contract The renewed treaty time first setting matches, and if so, then renews a contract successfully, if it is not, then renewing a contract unsuccessfully.
Preferably, described data, services granted unit, including:
Re-register request reception unit, for according in described lease mechanism set in advance re-register request when Between, reception re-registers request from the server in addition to described master server;
Whether the first judging unit, asking to meet to re-register success conditions for described re-registering, if meeting, entering Enter the second judging unit, if being unsatisfactory for, returning and re-registering failure;
Described second judging unit, for judging the described master server with the presence or absence of mandate for the described lease mechanism, if so, Then returning and re-register failure, if it is not, then entering described data, services granted unit, described selection satisfaction being re-registered successfully The server of condition is as master server.
Preferably, described first judging unit includes:
Re-register request time comparing unit, for whether re-registering the reception time of request described in comparison between institute State and preset between renewed treaty time and described lease lock time limit.
The invention provides a kind of acquisition methods of the lease data based on Distributed Application, including:
Send registration request before execution data services task;
Receive the lease data in buffer structure;
Start and execute described data distribution task;
Send request of renewing a contract to described buffer structure, and according to the renewed treaty feedback data receiving from described buffer structure, Enter and start the step executing described data distribution task, or entrance sends registration request before execution data distribution task Step.
Preferably, the described lease data receiving in buffer structure, including:Lease is locked, and lease locks time limit and rent About lock address.
Preferably, described renewed treaty to the transmission of described buffer structure is asked, including:Setting sends the time of request of renewing a contract.
Preferably, described setting sends the time between the described lease data of acquisition for the time asked of renewing a contract to described lease Between the lock time limit.
Preferably, the described data distribution task of described startup, including:
Send the server in addition to described master server re-registers request;
The server receiving described lease data, again as master server, starts described data services task;Or Receive the information re-registering request failure.
Preferably, described setting sends the time value that the time asked of renewing a contract is setting after the described lease data of acquisition.
The invention provides a kind of acquisition device of the lease data based on Distributed Application, including:
Registration request transmitting element, for sending registration request before execution data distribution task;
Receive lease data cell, for receiving the lease data in buffer structure;
Start performance element, execute described data distribution task for starting;
Renewed treaty request transmitting unit, for sending, to described buffer structure, request of renewing a contract, and according to reception from described slow Deposit the renewed treaty feedback data of structure, enter and start performance element, or enter registration request transmitting element.
Preferably, described in described reception lease data cell, lease data includes:Lease is locked, and lease locks time limit and rent About lock address.
Preferably, described renewed treaty request transmitting unit includes:
Renewed treaty request time arranging unit, sends the time of request of renewing a contract for setting.
Preferably, described renewed treaty request time arranging unit is between the time extremely described lease obtaining described lease data Scope between the lock time limit.
Preferably, described renewed treaty request time arranging unit is the time value of setting after the described lease data of acquisition.
Preferably, described startup performance element includes:
Transmission re-registers request unit, and the re-registering of server for sending in addition to described master server please Ask;
DSU, for will receive described lease data server again as master server, entrance is opened Move described data distribution task, or receive the information re-registering request failure.One kind that the present invention provides is based on distributed The sending method of the lease data of application is passed through the lease data is activation in buffer structure lease mechanism to master server, main clothes Business device is according to the lease serving data function of obtaining, and while master server provides service function, has lease According to the renewed treaty request receiving, the caching of mechanism will determine that this master server can remain able to continue after lease data expires Continuous offer service function, once when this master server breaks down, cannot send renewed treaty request, lease data makes upon expiration Obtain this master server and lose service function, buffer structure then can take master server according to the registration request alternative receiving, and realizes carrying For service function, therefore, a kind of sending method of lease data based on Distributed Application that the present invention provides, can make service Device hot-backup function when execution service function realizes by force multimachine automatic running, and can on the basis of inexpensive, high timeliness In a server fail, the adapter service of standby host energy second level, reduce the business loss bringing due to single-point problem, thorough Bottom solves the problems, such as Single Point of Faliure and Schizencephaly, and whole process is without manual intervention.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention and technical scheme of the prior art, below will be to embodiment with now Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, acceptable Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of flow process of the sending method embodiment of lease data based on Distributed Application that the present invention provides Figure;
Fig. 2 is a kind of structural frames of the dispensing device embodiment of lease data based on Distributed Application that the present invention provides Figure;
Fig. 3 is a kind of flow process of the acquisition methods embodiment of lease data based on Distributed Application that the present invention provides Figure;
Fig. 4 is a kind of structural frames of the acquisition device embodiment of lease data based on Distributed Application that the present invention provides Figure.
Specific embodiment
Elaborate a lot of details in order to fully understand the present invention in the following description.But the present invention can be with Much it is different from alternate manner described here to implement, those skilled in the art can be in the situation without prejudice to intension of the present invention Under do similar popularization, therefore the present invention is not embodied as being limited by following public.
Refer to shown in Fig. 1, Fig. 1 is a kind of sending method of lease data based on Distributed Application that the present invention provides The flow chart of embodiment;A kind of sending method embodiment of lease data based on Distributed Application that the present invention provides includes:
Step 101:Set up the buffer structure with lease mechanism.
The process that implements of this step is to set up a lease machine with lease data content in caching server System, described lease data can include:Lease lock, lease lock time limit and lease lock address, described lease are locked, the phase locked by lease Limit and lease lock the data information memory of address in caching server;Above-mentioned lease data can be specifically, for example:Will The title that KEY locks as lease, VALUE is the IP address of described lease lock holder, and sets lease for described lease lock The lock time limit, for example:Can it be the N second, it is, the holder of lease lock will lose this lease lock after the N second.
Step 102:The registration request of the reception server, chooses the server meeting registration condition as master server, and Sending lease data in described lease mechanism, to described master server, authorizes described master server to provide data, services.
The registration request of the reception server in this step, chooses the server meeting registration condition as master server tool Body realizes process, has the caching server of lease mechanism in server before execution data, services, can receive service The registration request that device sends;Caching server record receives the time of the described registration request of Servers-all transmission, and right The registration request time of record is compared it is allowed to receive the minimum server registration of registration request time value successfully, and by institute State the server succeeding in registration as master server, and store the IP address of described master server in caching server, and be Described master server provides lease lock, is the expiry date that lease lock sets, that is,:The out-of-service time of lease lock.
It should be noted that caching server, according to the lease lock time limit setting, after the lease lock time limit expires, will be deleted The IP address of the described master server of storage in caching server, the lease in described master server is locked for failure state.
The server above selection being met to registration condition implements a kind of realization side of process as master server Formula, it is to be understood that selection mode is not limited to the above, can also adopt the time sending registration request with server For comparison range, by caching server, the registration request time that Servers-all sends is compared, chooses and receive note The earliest server registration success of volume request time, and as master server, by corresponding lease data is activation to master server, So that the master server after determining has data, services function, this data, services can be with data distribution etc., such as:Give bonus, The service function such as spending on ads distribution or amount of money group amount.
Choose the server meeting registration condition for improving caching server as master server, can also be in buffer service Comparison range is set, for example in lease mechanism in device:Choose the registration request receiving in 60 seconds after registration request, choose It is compared in the range of registration request, determine the registration request reaching caching server earliest.
Step 103:Receive the renewed treaty request of described master server, judge whether described master server meets renewed treaty condition, If meeting, renewing a contract successfully, continuing to provide data, services;If being unsatisfactory for, renewing a contract unsuccessfully, entering described the reception server registration The step of request.
Implementing process and can be after this step, lease is locked and is sent after master server by described caching server, delays Deposit server and will receive the renewed treaty request from described master server, judge whether described master server meets renewed treaty condition, should Judgement can include:
Whether the time relatively receiving described request of renewing a contract locks the time limit less than lease, if so, then renews a contract successfully, buffer service The IP address of master server before remaining in that in device, master server remains on holds acquisition lease lock;If it is not, then renew a contract losing Lose, described caching server will empty the IP address of the master server of its storage previous, master server loses lease lock to be had Authority that is to say, that master server lease lock lose effect, not in the data, services function having, caching server enter The step of described the reception server registration request, redefines the process of master server.
Lease is locked and is sent after master server by described caching server, and caching server will receive from described master server Renewed treaty request, judge whether described master server meets renewed treaty condition, this judgement can also be realized by following embodiments, Including:
By relatively more described renew a contract the request reception time whether with the renewed treaty time set in advance when setting up lease mechanism Match, if so, then renew a contract successfully, if it is not, then renewing a contract unsuccessfully.Implementation procedure after this step judged result and above-mentioned judgement knot The implementation procedure of fruit is identical, is not repeating again.
It is understood that the described renewed treaty time set in advance can be, obtain described lease data after set when Between be worth.For example:Set the renewed treaty time as the N second, this N second is less than lease and locks the time limit, will receive every N second caching server The renewed treaty request sending from the master server holding lease lock.
For the described master server after avoiding acquisition to authorize because failure and other reasons cause server providing services function limitation, The application in described step 102, that is,:The registration request of the reception server, chooses the server meeting registration condition as main clothes Business device, and, to described master server, the described master server of mandate provides data, services to send lease data in described lease mechanism Also include:
Re-register request time according to set in advance in described lease mechanism, receive from except described master server Server in addition re-register request.
Re-registering described in judgement and ask whether to meet to re-register success conditions, if meeting, judging described lease machine System, with the presence or absence of the described master server authorizing, if so, then returns and re-registers failure, if it is not, then execute described selection meeting Re-register the step as master server for the server of success conditions;If being unsatisfactory for, returning and re-registering failure.
Ask whether to meet to re-register in request condition step re-registering described in above-mentioned judgement, specific implementation Can be, by re-registering described in comparison whether the reception time of request presets renewed treaty time and described rent between described About between the lock time limit, for example:Preset the renewed treaty time for 5 seconds, the lease lock time limit is 10 seconds, if caching server receives The request time that re-registers be between the 6-9 second, then meet and re-register request condition, caching server judges described rent afterwards Whether there is, about in mechanism, the master server authorizing, if it is present return re-registering failure, caching server waits next What secondary server sent re-registers request;If it does not, choose meeting the server re-registering request condition as master Server;If what caching server received re-registers the scope that request time exceeds the 6-9 second, return and re-register mistake Lose, enter next round and re-register request.
A kind of sending method of the lease data based on Distributed Application being provided based on the invention described above, with methods described Embodiment is corresponding, and the present invention also provides a kind of dispensing device embodiment of the lease data based on Distributed Application, refer to Fig. 2, it provides a kind of dispensing device embodiment schematic diagram of the lease data based on Distributed Application for the present invention.Due to device Embodiment is substantially similar to embodiment of the method, so describing fairly simple, in place of correlation, the part referring to embodiment of the method is said Bright.Device embodiment described below is only schematically.
As shown in Fig. 2 a kind of dispensing device of lease data based on distribution applications of present invention offer, including:
Buffer structure sets up unit 201, for setting up the buffer structure with lease mechanism.
Described buffer structure is set up unit 201 and is included:Set up the lease lock of lease mechanism, lease lock time limit and lease Lock address simultaneously caches corresponding lease data.
Data, services granted unit 202, for the registration request of the reception server, chooses the server meeting registration condition As master server, and, to described master server, the described master server of mandate provides to send lease data in described lease mechanism Data, services;
Wherein, described data, services granted unit 202 includes:
Recording unit, receives the time of described registration request for record;
Registration comparing unit, the time for relatively described registration request is it is allowed to the time of reception minimum server registration Success.
Renewed treaty request unit 203, the renewed treaty for receiving described master server is asked, and judges whether described master server is full Sufficient renewed treaty condition, if meeting, renewing a contract successfully, continuing to provide data, services;If being unsatisfactory for, renewing a contract unsuccessfully, entering data clothes Business granted unit, the step of the registration request of execution the reception server.
Described renewed treaty request unit 203, including:
Renewed treaty comparing unit, for comparing whether the time receiving described request of renewing a contract locks the time limit less than lease, if so, then Renew a contract successfully, if it is not, then renewing a contract unsuccessfully.
Described renewed treaty request unit 203, including:Renewed treaty comparison match unit, when receiving for relatively more described request of renewing a contract Between whether match with the renewed treaty time set in advance when setting up lease mechanism, if so, then renew a contract successfully, if it is not, then renewing a contract Failure.
Described data, services granted unit 202, including:
Re-register request reception unit, for according in described lease mechanism set in advance re-register request when Between, reception re-registers request from the server in addition to described master server;
Whether the first judging unit, asking to meet to re-register success conditions for described re-registering, if meeting, entering Enter the second judging unit, if being unsatisfactory for, returning and re-registering failure;
Described second judging unit, for judging the described master server with the presence or absence of mandate for the described lease mechanism, if so, Then returning and re-register failure, if it is not, then entering described data, services granted unit, described selection satisfaction being re-registered successfully The server of condition is as master server.
Described first judging unit includes:Re-register request time comparing unit, please for re-registering described in comparison Whether the reception time asked presets between renewed treaty time and described lease lock time limit between described.
Based on above-mentioned, the present invention also provides a kind of acquisition methods of the lease data based on Distributed Application, refer to Fig. 3 Shown, Fig. 3 is a kind of flow chart of the acquisition methods embodiment of lease data based on Distributed Application that the present invention provides.
Corresponding with a kind of sending method of lease data based on Distributed Application that the invention described above provides, the present invention A kind of acquisition methods of also lease data based on Distributed Application of offer, including:
Step 301:Send registration request before execution data services task;
This step 301 implements process, before server executes any service function, first needs caching server Registered that is to say, that server needs first to apply for the registration of to the caching server with lease mechanism before execution task Request, in order to obtain the lock of the lease in lease mechanism.
Step 302:Receive the lease data in buffer structure;
The process that implements of step 302 is that, according to the registration request receiving, selection can be used as master for caching server The server of server, and lease lock is sent to master server, master server obtains corresponding lease data.
Step 303, starts and executes described data distribution task;
This step is after master server obtains lease data, you can realize corresponding service function, for example:Give bonus, The scheduling of resource of the function of data distribution such as spending on ads distribution or amount of money group amount.
For avoiding master server because the factor such as fault leads to not provide service function, in described step 303, also wrap Include:
Send the server in addition to described master server re-registers request;
The server receiving described lease data, again as master server, starts described data services task;Or Receive the information re-registering request failure.
Step 304, sends, to described buffer structure, request of renewing a contract, and anti-according to the renewed treaty receiving from described buffer structure Feedback data, enters and starts the step executing described data distribution task, or entrance sends note before execution data distribution task The step of volume request.
This step implements and is, after determining master server, while executing service function, according to the transmission setting Renew a contract the time asked, send, to caching server, request of renewing a contract in time range, caching server is according to based on distribution Step 103 in the sending method of lease data of formula application, completes the process of request of renewing a contract.Wherein, described setting sends and continues The time of about request locked between the time limit to described lease between the time obtaining described lease data;Or described setting sends continuous The time of about request is the time value of setting after the described lease data of acquisition.
A kind of acquisition methods of the lease data based on Distributed Application being provided based on the invention described above, with described side Method embodiment is corresponding, and the present invention also provides a kind of acquisition device embodiment of the lease data based on Distributed Application, please join See Fig. 4, it provides a kind of acquisition device embodiment schematic diagram of the lease data based on Distributed Application for the present invention.Due to dress Put embodiment and be substantially similar to embodiment of the method, so describing fairly simple, referring to the part of embodiment of the method in place of correlation Illustrate.Device embodiment described below is only schematically.
As shown in figure 4, the present invention provides a kind of acquisition device of the lease data based on Distributed Application, including:
Registration request transmitting element 401:For sending registration request before execution data distribution task;
Receive lease data cell 402:For receiving the lease data in buffer structure;
Start performance element 403:Execute described data distribution task for starting;
Renewed treaty request transmitting unit 404:For sending, to described buffer structure, request of renewing a contract, and according to reception from described The renewed treaty feedback data of buffer structure, enters and starts performance element, or enters registration request transmitting element.
Wherein, receive lease data cell 402 to include:Lease is locked, the lease such as lease lock time limit and lease lock address Data message.
Described renewed treaty request transmitting unit 404 includes:Renewed treaty request time arranging unit, sends, for setting, request of renewing a contract Time.
Described renewed treaty request time arranging unit is to lock the time limit between the time obtaining described lease data to described lease Between scope;Or, described renewed treaty request time arranging unit is the time value of setting after the described lease data of acquisition.
Described startup performance element 403 includes:
Transmission re-registers request unit, and the re-registering of server for sending in addition to described master server please Ask;
DSU, for will receive described lease data server again as master server, entrance is opened Move described data distribution task, or receive the information re-registering request failure.
Although the present invention is open as above with preferred embodiment, it is not for limiting the present invention, any this area skill Art personnel without departing from the spirit and scope of the present invention, can make possible variation and modification, the therefore guarantor of the present invention Shield scope should be defined by the scope that the claims in the present invention are defined.

Claims (27)

1. a kind of sending method of the lease data based on Distributed Application is it is characterised in that include:
Set up the buffer structure with lease mechanism;
The registration request of the reception server, chooses the server meeting registration condition as master server, and sends described lease In mechanism, lease data, to described master server, authorizes described master server to provide data, services;
Receive the renewed treaty request of described master server, judging whether described master server meets renewed treaty condition, if meeting, renewing a contract Success, continues to provide data, services;If being unsatisfactory for, the step unsuccessfully, entering described the reception server registration request of renewing a contract.
2. the sending method of the lease data based on Distributed Application according to claim 1 is it is characterised in that described connect Receive the registration request of server, choose and meet the server of registration condition as master server, including:
Record receives the time of described registration request;
Compare the time of described registration request it is allowed to receive the minimum server registration success of time value.
3. the sending method of the lease data based on Distributed Application according to claim 1 to 2 any one, its feature It is:Described foundation has the buffer structure of lease mechanism, including:Set up lease mechanism lease lock, lease lock the time limit and Lease lock address simultaneously caches corresponding lease data.
4. the lease data based on Distributed Application according to claim 3 sending method it is characterised in that:Described connect Receive the renewed treaty request of described master server, judge whether described master server meets renewed treaty condition, including:
Whether the time relatively receiving described request of renewing a contract locks the time limit less than lease, if so, then renews a contract successfully, if it is not, then renewing a contract Failure.
5. the lease data based on Distributed Application according to claim 3 sending method it is characterised in that:Described connect Receive the renewed treaty request of described master server, judge whether described master server meets renewed treaty condition, including:
Whether the relatively more described request reception time of renewing a contract is matched with the renewed treaty time set in advance when setting up lease mechanism, if It is then to renew a contract successfully, if it is not, then renewing a contract unsuccessfully.
6. the sending method based on the lease data of Distributed Application for any one according to claim 4 or 5, its feature Be, described authorize described master server to provide data, services after, including:
Re-register request time according to set in advance in described lease mechanism, receive from addition to described master server Server re-register request;
Re-registering described in judgement and ask whether to meet to re-register request condition, if meeting, judging that described lease mechanism is No have the described master server authorizing, and if so, then returns and re-registers failure, if it is not, then execute described selection meeting again The server of the condition that succeeds in registration is as the step of master server;If being unsatisfactory for, returning and re-registering failure.
7. the lease data based on Distributed Application according to claim 6 sending method it is characterised in that:Described sentence Re-register described in disconnected and ask whether to meet to re-register success conditions, including:
Whether the reception time re-registering request described in relatively presets renewed treaty time and described lease lock phase between described Between limit.
8. the sending method of the lease data based on Distributed Application according to claim 4,5 or 7 any one, it is special Levy and be:The described renewed treaty time set in advance is to obtain the time value of setting after described lease data.
9. a kind of dispensing device of the lease data based on Distributed Application is it is characterised in that include:
Buffer structure sets up unit, for setting up the buffer structure with lease mechanism;
Data, services granted unit, for the registration request of the reception server, chooses the server meeting registration condition as master Server, and, to described master server, the described master server of mandate provides data clothes to send lease data in described lease mechanism Business;
Renewed treaty request unit, the renewed treaty for receiving described master server is asked, and judges whether described master server meets renewed treaty Condition, if meeting, renewing a contract successfully, continuing to provide data, services;If being unsatisfactory for, renewing a contract unsuccessfully, entering data, services mandate Unit, the step of the registration request of execution the reception server.
10. the dispensing device of the lease data based on Distributed Application according to claim 9 is it is characterised in that described Data, services granted unit, including:
Recording unit, receives the time of described registration request for record;
Registration comparing unit, the time for relatively described registration request is it is allowed to the server registration of the time of reception minimum is successful.
The dispensing device of the 11. lease data based on Distributed Application according to claim 9-10 any one, it is special Levy and be:Described buffer structure is set up unit and is included:Set up the lease lock of lease mechanism, lease lock time limit and lease lock address And cache corresponding lease data.
The dispensing device of the 12. lease data based on Distributed Application according to claim 11 is it is characterised in that described Renewed treaty request unit, including:
Renewed treaty comparing unit, for comparing whether the time receiving described request of renewing a contract locks the time limit less than lease, if so, then renews a contract Success, if it is not, then renew a contract unsuccessfully.
The dispensing device of the 13. lease data based on Distributed Application according to claim 11 is it is characterised in that described Renewed treaty request unit, including:
Whether renewed treaty comparison match unit, set with when setting up lease mechanism in advance for the relatively more described request reception time of renewing a contract The fixed renewed treaty time matches, and if so, then renews a contract successfully, if it is not, then renewing a contract unsuccessfully.
The dispensing device of the 14. lease data based on Distributed Application according to claim 12 or 13 it is characterised in that Described data, services granted unit, including:
Re-register request reception unit, for re-registering request time according to set in advance in described lease mechanism, Reception re-registers request from the server in addition to described master server;
For described, first judging unit, re-registers whether request meets and re-register success conditions, if meeting, enter the Two judging units, if being unsatisfactory for, returning and re-registering failure;
Described second judging unit, for judging the described master server with the presence or absence of mandate for the described lease mechanism, if so, then returns Returning and re-register failure, if it is not, then entering described data, services granted unit, described selection satisfaction being re-registered success conditions Server as master server.
The dispensing device of the 15. lease data based on Distributed Application according to claim 14 is it is characterised in that described First judging unit includes:
Re-register request time comparing unit, for whether re-registering the reception time of request described in comparison between described pre- First set between renewed treaty time and described lease lock time limit.
A kind of 16. acquisition methods of the lease data based on Distributed Application are it is characterised in that include:
Send registration request before execution data services task;
Receive the lease data in buffer structure;
Start and execute described data distribution task;
Send, to described buffer structure, request of renewing a contract, and according to the renewed treaty feedback data receiving from described buffer structure, enter Start the step executing described data distribution task, or enter the step sending registration request before execution data distribution task Suddenly.
The acquisition methods of the 17. lease data based on Distributed Application according to claim 16 are it is characterised in that described Receive the lease data in buffer structure, including:Lease is locked, and address locked by lease lock time limit and lease.
The acquisition methods of the 18. lease data based on Distributed Application according to claim 17 are it is characterised in that described Send request of renewing a contract to described buffer structure, including:Setting sends the time of request of renewing a contract.
The acquisition methods of the 19. lease data based on Distributed Application according to claim 18 are it is characterised in that described Setting sends the time of request of renewing a contract between the time to described lease lock time limit obtaining described lease data.
The acquisition methods of the 20. lease data based on Distributed Application according to claim 17 or 18 any one, its It is characterised by, the described data distribution task of described startup, including:
Send the server in addition to described master server re-registers request;
The server receiving described lease data, again as master server, starts described data services task;Or receive Re-register the information of request failure.
The acquisition methods of the 21. lease data based on Distributed Application according to claim 17 to 19 any one, its It is characterised by, described setting sends the time value that the time asked of renewing a contract is setting after the described lease data of acquisition.
A kind of 22. acquisition device of the lease data based on Distributed Application are it is characterised in that include:
Registration request transmitting element, for sending registration request before execution data distribution task;
Receive lease data cell, for receiving the lease data in buffer structure;
Start performance element, execute described data distribution task for starting;
Renewed treaty request transmitting unit, for sending, to described buffer structure, request of renewing a contract, and is derived from described caching knot according to receiving The renewed treaty feedback data of structure, enters and starts performance element, or enters registration request transmitting element.
The acquisition device of the 23. lease data based on Distributed Application according to claim 22 is it is characterised in that described Receive lease data described in lease data cell to include:Lease is locked, and address locked by lease lock time limit and lease.
The acquisition device of the 24. lease data based on Distributed Application according to claim 22 is it is characterised in that described Renewed treaty request transmitting unit includes:
Renewed treaty request time arranging unit, sends the time of request of renewing a contract for setting.
The acquisition device of the 25. lease data based on Distributed Application according to claim 24 is it is characterised in that described Renewed treaty request time arranging unit is to lock the scope between the time limit between time to the described lease obtaining described lease data.
The acquisition device of the 26. lease data based on Distributed Application according to claim 24 is it is characterised in that described Renewed treaty request time arranging unit is the time value of setting after the described lease data of acquisition.
The acquisition device of the 27. lease data based on Distributed Application according to claim 22 is it is characterised in that described Start performance element to include:
Transmission re-registers request unit, re-registers request for send server in addition to described master server;
DSU, for will receive described lease data server again as master server, enter and start institute State data distribution task, or receive the information re-registering request failure.
CN201610539801.4A 2016-07-08 2016-07-08 Sending method and apparatus, and obtaining method and apparatus of lease data based on distributed applications Pending CN106453471A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610539801.4A CN106453471A (en) 2016-07-08 2016-07-08 Sending method and apparatus, and obtaining method and apparatus of lease data based on distributed applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610539801.4A CN106453471A (en) 2016-07-08 2016-07-08 Sending method and apparatus, and obtaining method and apparatus of lease data based on distributed applications

Publications (1)

Publication Number Publication Date
CN106453471A true CN106453471A (en) 2017-02-22

Family

ID=58183375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610539801.4A Pending CN106453471A (en) 2016-07-08 2016-07-08 Sending method and apparatus, and obtaining method and apparatus of lease data based on distributed applications

Country Status (1)

Country Link
CN (1) CN106453471A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111177197A (en) * 2019-12-26 2020-05-19 北京仁科互动网络技术有限公司 Cache processing method and system
CN113467953A (en) * 2021-07-16 2021-10-01 腾讯科技(深圳)有限公司 Service state switching method and device, server and storage medium
CN115373904A (en) * 2022-10-24 2022-11-22 北京奥星贝斯科技有限公司 Lease dynamic continuation method, device and equipment in distributed system
CN116400853A (en) * 2023-02-21 2023-07-07 北京志凌海纳科技有限公司 Distributed block storage system and manufacturing-oriented fault recovery time shortening method
CN117033092A (en) * 2023-10-10 2023-11-10 北京大道云行科技有限公司 Single-instance service failover method and system, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312708A (en) * 2013-06-07 2013-09-18 福建联迪商用设备有限公司 Lease file based IP (internet protocol) setting method and system
CN103384211A (en) * 2013-06-28 2013-11-06 百度在线网络技术(北京)有限公司 Data manipulation method with fault tolerance and distributed type data storage system
CN103701770A (en) * 2013-11-22 2014-04-02 汉柏科技有限公司 Abnormal unlocking method based on leasing mechanism
CN103795817A (en) * 2012-10-26 2014-05-14 国际商业机器公司 Method and system for setting lease times values in a network protocol for a device
CN105471626A (en) * 2015-11-16 2016-04-06 北京奇虎科技有限公司 Method and system for distributing storage data of internal memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795817A (en) * 2012-10-26 2014-05-14 国际商业机器公司 Method and system for setting lease times values in a network protocol for a device
CN103312708A (en) * 2013-06-07 2013-09-18 福建联迪商用设备有限公司 Lease file based IP (internet protocol) setting method and system
CN103384211A (en) * 2013-06-28 2013-11-06 百度在线网络技术(北京)有限公司 Data manipulation method with fault tolerance and distributed type data storage system
CN103701770A (en) * 2013-11-22 2014-04-02 汉柏科技有限公司 Abnormal unlocking method based on leasing mechanism
CN105471626A (en) * 2015-11-16 2016-04-06 北京奇虎科技有限公司 Method and system for distributing storage data of internal memory

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111177197A (en) * 2019-12-26 2020-05-19 北京仁科互动网络技术有限公司 Cache processing method and system
CN111177197B (en) * 2019-12-26 2023-03-14 北京仁科互动网络技术有限公司 Cache processing method and system
CN113467953A (en) * 2021-07-16 2021-10-01 腾讯科技(深圳)有限公司 Service state switching method and device, server and storage medium
CN113467953B (en) * 2021-07-16 2023-08-04 腾讯科技(深圳)有限公司 Service state switching method and device, server and storage medium
CN115373904A (en) * 2022-10-24 2022-11-22 北京奥星贝斯科技有限公司 Lease dynamic continuation method, device and equipment in distributed system
CN115373904B (en) * 2022-10-24 2023-02-03 北京奥星贝斯科技有限公司 Lease dynamic continuation method, device and equipment in distributed system
CN116400853A (en) * 2023-02-21 2023-07-07 北京志凌海纳科技有限公司 Distributed block storage system and manufacturing-oriented fault recovery time shortening method
CN116400853B (en) * 2023-02-21 2023-11-07 北京志凌海纳科技有限公司 Distributed block storage system and manufacturing-oriented fault recovery time shortening method
CN117033092A (en) * 2023-10-10 2023-11-10 北京大道云行科技有限公司 Single-instance service failover method and system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106453471A (en) Sending method and apparatus, and obtaining method and apparatus of lease data based on distributed applications
CN106850580B (en) A kind of automobile account system and account automatic verification method
CN108737548B (en) Distributed WEB micro-service container cluster architecture system and implementation method thereof
CN107770140A (en) A kind of single sign-on authentication method and device
CN101771564B (en) Method, device and system for processing session context
CN102333081B (en) Authentication method, equipment and system
CN100592735C (en) Means and method for controlling service progression between different domains
CN102868770B (en) A kind of method of distribution interface, equipment and system
CN109067748A (en) Access right distribution method, device and the electronic equipment of shared device
CN105023049B (en) In the method, system and overload protection arrangement of line selection seat
CN110011885B (en) Control authority binding method and device of electric appliance, storage medium and electric appliance
CN107194008B (en) A kind of distributed system quickly updates verification method
CN101621523A (en) User security access control method as well as device and system thereof
CN104954508B (en) A kind of system and its auxiliary charging method for DHCP protocol auxiliary charging
CN106068019B (en) Hot spot shared authorization method, terminal device and server
CN105407105A (en) Method and system for performing equipment authentication on samba service
CN108683633A (en) access control method and device
CN108306882A (en) A kind of method and the network equipment of terminal access business
US20140108484A1 (en) Method and system for optimizing distributed transactions
CN107360165A (en) Terminal device, cloud server and method and device for managing and controlling operating system
CN101022454A (en) Interentity auditing method and system
CN105306407B (en) User account login method and device
CN103546348A (en) Method for detecting abnormal offline of authenticated user
CN105162769A (en) Gateway authority transfer method and gateway authority transfer device
CN104144226A (en) Port assignment method and network address translation device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100080 A 5 C, block A, China International Steel Plaza, 8 Haidian Avenue, Haidian District, Beijing.

Applicant after: Youku network technology (Beijing) Co., Ltd.

Address before: 100080 A 5 C, block A, China International Steel Plaza, 8 Haidian Avenue, Haidian District, Beijing.

Applicant before: 1Verge Inc.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170222