CN101686244A - Method and system for transmitting service information - Google Patents

Method and system for transmitting service information Download PDF

Info

Publication number
CN101686244A
CN101686244A CN200810161362A CN200810161362A CN101686244A CN 101686244 A CN101686244 A CN 101686244A CN 200810161362 A CN200810161362 A CN 200810161362A CN 200810161362 A CN200810161362 A CN 200810161362A CN 101686244 A CN101686244 A CN 101686244A
Authority
CN
China
Prior art keywords
service
information
services
register center
consumer
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
CN200810161362A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN200810161362A priority Critical patent/CN101686244A/en
Publication of CN101686244A publication Critical patent/CN101686244A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a method for transmitting service information, comprising the following steps: a service register center synchronizes the service information to a disaster tolerance server; and when the service register center breaks down, the disaster tolerance server sends the service information to service consumers. The invention also discloses a system for transmitting the service information. By the method, the disaster tolerance strategy of the service register center can be realized, and when service register center breaks down, the disaster tolerance server takes over the access of the prior service register center and sends the service information to the service consumers, thereby ensuring normal interaction between a service provider and the service consumers.

Description

A kind of method and system of transmitting service information
Technical field
The present invention relates to the web services technologies field, particularly relate to a kind of method and system of transmitting service information.
Background technology
In large enterprise's net or the Internet, SOA (Service-Oriented Architecture, service-oriented architectural framework) technology is used widely, SOA is a component model, and it connects the different function units (being called service) of application program by interface and the contract that defines between these services.Wherein, externally provide the application of service to be called the ISP, use the application of the service that other application provide to be called service consumer.The distributed network system makes service consumer and ISP's One's name is legion, for example some shopping online stores customer-centric have had thousands of ISPs at present, and the quantity of service consumer is then more, under these circumstances, just formed a cluster environment.
Along with the continuous increase of serving in the system, the dependence of serving in the whole system presents complicated network diagramming phenomenon gradually, and is just very obvious to the requirement in unified service addressing place under these circumstances, therefore produced service register center.Usually, information on services unifications such as address of service information that the ISP need provide it and title, interface, attribute are registered to service register center, by service register center each ISP's information on services is pushed to service consumer with tabulation or other forms then, service consumer just can find the ISP of needs according to this information on services tabulation like this, and then asks this ISP that corresponding service is provided.
But, after adopting service register center, mutual between ISP and the service consumer just needs to depend on service register center inevitably, and when service consumer restarted at every turn, service register center needed again the Push Service address information to this service consumer.The phenomenon that may cause is under these circumstances, when service consumer restarts, in case service register center collapse (as can't start, various situations such as outage, network are obstructed), will cause can't be normally mutual between ISP and the service consumer, because service consumer can't obtain the destination service address information that need call.This is in a lot of the application, and especially not shutting down in the application in 7*24 hour is not allow the situation that occurs.
Therefore, press for the technical problem that those skilled in the art solve and be: under the situation of service register center collapse, how to ensure normal mutual between ISP and the service consumer.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of method and system of transmitting service information, in case collapse with service register center in the solution prior art, ISP and service consumer just can't normally mutual problems.
For achieving the above object, the invention provides following scheme:
A kind of method of transmitting service information comprises:
Service register center is synchronized to Disaster Recovery Service with information on services;
When described service register center was collapsed, described Disaster Recovery Service was pushed to service consumer with described information on services.
Preferably, described information on services is kept in the local file system of described Disaster Recovery Service.
Preferably, also comprise:
Service consumer is kept at this locality with the information on services that receives;
When needs call service, if described service register center and Disaster Recovery Service all to smash then use the local information on services of preserving to obtain the destination service address of the service of need calling.
Preferably, after service consumer receives information on services, also comprise: will push sign and be changed to true;
When service consumer need call service, judge whether described propelling movement sign is true;
If be not true, read the local information on services of preserving to buffer memory, and from buffer memory, obtain the destination service address of the service of need calling.
Preferably, described information on services is kept at service consumer this locality in the mode of file.
A kind of system of transmitting service information comprises: service register center, Disaster Recovery Service and service consumer, and wherein, described service register center comprises:
Lock unit is used for information on services is synchronized to Disaster Recovery Service;
Described Disaster Recovery Service comprises:
Memory cell is used to preserve the information on services that the lock unit of service register center sends;
Push unit is used for when described service register center is collapsed described information on services being pushed to service consumer.
Preferably, described memory cell is saved in local file system with the information on services of the lock unit transmission of service register center.
Preferably, described service consumer comprises:
Local memory cell is used to preserve the information on services that receives;
The destination service address acquisition unit is used for obtaining the destination service address of the service of need calling from described local memory cell when described service register center and Disaster Recovery Service all collapse.
Preferably, described service consumer also comprises:
The unit is set, after being used to receive information on services, will pushes sign and be changed to true;
Described destination service address acquisition unit comprises:
Judgment sub-unit is used for judging whether described propelling movement sign is true when needs call service;
Read subelement, be used for when described propelling movement sign for true time, read information on services that described local memory cell preserves to buffer memory, and from buffer memory, obtain the destination service address of the service of need calling.
Preferably, described local memory cell is preserved described information on services in the mode of file.
According to specific embodiment provided by the invention, the invention discloses following technique effect:
At first, the present invention has realized the disaster tolerance strategy of service register center, promptly when the ISP when service register center is registered, this service register center is synchronized to the server that other are used for disaster tolerance during with the information of same registered.When the collapse of this service register center, the described server that is used for disaster tolerance will be taken over the visit of former service register center, thereby guarantee alternately normal between ISP and the service consumer.
In addition, when also collapsing for the server that prevents to be used for disaster tolerance, service consumer can't obtain the destination service address information that need call, the present invention has adopted the local disaster tolerance strategy of service consumer end, be after service consumer receives the information on services of service register center propelling movement, will be at the local snapshot of preserving a this information on services of service consumer, like this, when service consumer restarts, in service register center and being used under all disabled situation of server of disaster tolerance, be stored in local snapshot before service consumer will automatically use and obtain the destination address of the service that need call.
Description of drawings
Fig. 1 is the flow chart of the method for the transmitting service information that provides of the embodiment of the invention;
Fig. 2 is the system configuration schematic diagram that the embodiment of the invention provides;
Fig. 3 is the flow chart that service consumer that the embodiment of the invention provides is realized the method for local disaster tolerance;
Fig. 4 is the flow chart that service consumer that the embodiment of the invention provides obtains the method for information on services;
Fig. 5 is the schematic diagram of the system of the transmitting service information that provides of the embodiment of the invention;
Fig. 6 is the schematic diagram of another system of the transmitting service information that provides of the embodiment of the invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
With reference to Fig. 1, the method for the transmitting service information that the embodiment of the invention provides may further comprise the steps:
S101: service register center is synchronized to Disaster Recovery Service with information on services;
S102: when described service register center was collapsed, described Disaster Recovery Service was pushed to service consumer with described information on services.
When preventing that service register center from collapse taking place, can't be normally mutual between service consumer and the ISP, the embodiment of the invention has proposed the disaster tolerance strategy of service register center, referring to Fig. 2, promptly dispose a server that is used for disaster tolerance in service register center, this Disaster Recovery Service can communicate with service register center.Under the normal condition (service register center can provide service), receive ISP's information and register by service register center, and the information on services after will registering is pushed to service consumer.Simultaneously, when service register center generation registration action, this service register center can be synchronized to this Disaster Recovery Service simultaneously with the information on services of being registered, and is equivalent to like this at the Disaster Recovery Service end all information on services be backed up.
And Disaster Recovery Service has the function of former service register center, continual application service can be provided, when former service register center owing to reason such as can't start, outage, network are obstructed collapse takes place the time, Disaster Recovery Service can be taken over the visit of former service register center.Wherein, described visit comprises reception from ISP's information on services and register, and when service consumer restarts, and the information on services of registration is pushed to service consumer.As seen, owing to adopted the disaster tolerance strategy of service register center,, still can normally carry out mutual between service consumer and the ISP even make under the situation of former service register center collapse.
Wherein, Disaster Recovery Service can pass through address resolution protocol (Address Resolution Protocol, ARP) Qi Pian means are taken over the visit of former service register center, for service consumer, its final purpose be realize and the ISP between mutual, with the service that need to obtain, therefore, the information on services that obtains is the unimportant of former service register center or Disaster Recovery Service propelling movement on earth.In fact, also imperceptible this species diversity of service consumer.Because the ARP deception belongs to those skilled in the art's known technology, therefore, repeats no more herein.
In addition, service register center can be synchronized to information on services in the database or local file system of Disaster Recovery Service, if but be stored in the database, then each visit all will relate to the storehouse that reads and writes data, and this performance to system can cause bigger loss, therefore in a preferred embodiment of the invention, adopted and stored information on services in the local file system of Disaster Recovery Service method, like this, each visit only need be arrived reading of data in the local cache, thereby has improved the performance of system.
Such scheme has solved under the situation of service register center collapse, how to guarantee the normal mutual problem between service consumer and the ISP, but, if during the service register center collapse, Disaster Recovery Service is also unavailable, and can cause so equally can't be normally mutual between service consumer and the ISP.For this reason, in a preferred embodiment of the invention, when having adopted the disaster tolerance strategy of service register center, also adopted the disaster tolerance strategy of service consumer this locality, this tactful method is: receive the information on services of service register center or Disaster Recovery Service propelling movement when service consumer after, will be at the local snapshot of preserving a this information on services of service consumer, like this, when service consumer need call certain service, under service consumer and all disabled situation of Disaster Recovery Service, be stored in local service message snapshot before service consumer can automatically use, obtain the destination service address of the service that need call.Like this, still can be normally mutual between service consumer and the ISP.Below this process is described in detail.
Referring to Fig. 3, be to realize the local disaster tolerance strategy of service consumer, service consumer carries out following steps when receiving the service message of service register center or Disaster Recovery Service propelling movement:
S301: receive service register center or Disaster Recovery Service and push the service message of coming;
S302: will push sign and be changed to true (true), and with information updating in buffer memory;
Wherein, can judge whether to receive the information on services of service register center or Disaster Recovery Service propelling movement with the described value that has pushed sign, its default value can be changed to vacation (false).In fact, service consumer can judge in view of the above whether service register center and Disaster Recovery Service all collapse, because if be not that service register center and Disaster Recovery Service all collapse, then service consumer can receive and push the service message of coming, and can be changed to true with pushing sign simultaneously.Opposite, if this propelling movement is masked as false, then proof is not received and is pushed the service message of coming, and further whether proof service register center this moment and Disaster Recovery Service be all unavailable, then service consumer can consider to start local Disaster Tolerant Scheme, to guarantee to obtain required service.
S303: the information on services of preserving propelling movement is to service consumer this locality.
In service consumer this locality, service message can be preserved in the mode of file.
After the snapshot of a information on services has been preserved in service consumer this locality,, then can adopt following steps in order to upper type when service consumer need call certain when service, referring to Fig. 4:
S401: check whether the described sign that pushed is true; If be true, then proof has received from the information on services of service register center or Disaster Recovery Service propelling movement, therefore enters step S403; If be false, then proof does not receive the information on services of service register center or Disaster Recovery Service propelling movement, and this moment, service register center and Disaster Recovery Service may all collapse, therefore enters step S402;
S402: read and local preserve information on services in the file, and enter step S403 to buffer memory;
S403: the destination service address that from buffer memory, obtains the service of to call.
As seen, adopt with upper type, even service register center and Disaster Recovery Service have all collapsed, system is still and can normally uses, still can be normally mutual between service consumer and the ISP.
The method of the transmitting service information that provides with the embodiment of the invention is corresponding, the embodiment of the invention also provides a kind of system of transmitting service information, and referring to Fig. 5, this system comprises service register center, Disaster Recovery Service and service consumer, wherein, described service register center comprises:
Lock unit U501 is used for information on services is synchronized to Disaster Recovery Service;
Described Disaster Recovery Service comprises:
Memory cell U502 is used to preserve the information on services that the lock unit of service register center sends;
Push unit U503 is used for when described service register center is collapsed described information on services being pushed to service consumer.
In described service register center, when registration action took place, lock unit U501 just was synchronized to Disaster Recovery Service with the information on services of registration; At described Disaster Recovery Service, memory cell U502 preserves the information on services of the lock unit transmission of service register center; When described service register center is collapsed, Disaster Recovery Service can be taken over the visit of former service register center by means such as ARP deceptions, when service consumer restarts or information on services when take place upgrading, push unit U503 can be pushed to service consumer with described information on services.As long as and service consumer has obtained information on services, just can know the destination service address of the service that need call, and then obtain required service by the destination service address.As seen, even service register center is unavailable, system still can normally use, and service consumer and ISP still can be normally mutual.
Generally, information on services is kept in the database, and when visiting, the storehouse that all needs to read and write data again, the operation meeting of read-write causes bigger loss to systematic function. at every turnTherefore, in a preferred embodiment of the invention, the memory cell U502 of described disaster tolerance database is saved in the information on services of the lock unit U501 transmission of service register center in the local file system.Like this, when each visit, only need from local file system, read information on services, compare, reduce loss systematic function with database manipulation.
In actual applications, in order to tackle the situation that service register center and Disaster Recovery Service all collapse, adopted the disaster tolerance strategy of service consumer this locality, in this strategy, receive the information on services of service register center or Disaster Recovery Service propelling movement when service consumer after, will be at the local snapshot of preserving a this information on services of service consumer, like this, when service consumer need call certain service, under service consumer and all disabled situation of Disaster Recovery Service, be stored in local service message snapshot before service consumer can automatically use, obtain the destination service address of the service that need call.Referring to Fig. 6, described service consumer comprises:
Local memory cell U604 is used to preserve the information on services of service register center or Disaster Recovery Service propelling movement;
Destination service address acquisition unit U605 is used for obtaining the destination service address of the service of need calling from described local memory cell when described service register center and Disaster Recovery Service all collapse.
In actual applications, in order to realize the disaster tolerance strategy of service consumer this locality better, described service consumer can also comprise:
Unit U606 is set, after being used to receive information on services, will pushes sign and be changed to true;
Then destination service address acquisition unit U605 comprises:
Judgment sub-unit U6051 is used for judging whether described propelling movement sign is true when needs call certain service;
Read subelement U6052, be used for when described propelling movement sign for true time, read information on services that described local memory cell preserves to buffer memory, and from buffer memory, obtain the destination service address of the service that need call.
Wherein, can judge whether to receive the information on services of service register center or Disaster Recovery Service propelling movement with the described value that has pushed sign, its default value can be changed to vacation (false).After receiving the information on services that service register center or Disaster Recovery Service push, unit U606 is set can this push sign and be set to true (true).Service consumer can determine how to obtain the destination service address of the service of need calling according to this value that has pushed sign.
Wherein, local memory cell U604 can preserve described information on services with the method for file.
Lock unit U601, memory cell U602 among Fig. 6 and push unit U603 are identical with lock unit U501, memory cell U502 and push unit U503 among Fig. 5.
More than to the method and system of a kind of transmitting service information provided by the present invention, be described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, part in specific embodiments and applications all can change.In sum, this description should not be construed as limitation of the present invention.

Claims (10)

1, a kind of method of transmitting service information is characterized in that, comprising:
Service register center is synchronized to Disaster Recovery Service with information on services;
When described service register center was collapsed, described Disaster Recovery Service was pushed to service consumer with described information on services.
2, method according to claim 1 is characterized in that, described information on services is kept in the local file system of described Disaster Recovery Service.
3, method according to claim 1 is characterized in that, also comprises:
Service consumer is kept at this locality with the information on services that receives;
When needs call service, if described service register center and Disaster Recovery Service all to smash then use the local information on services of preserving to obtain the destination service address of the service of need calling.
4, method according to claim 3 is characterized in that, after service consumer receives information on services, also comprises: will push sign and be changed to true;
When service consumer need call service, judge whether described propelling movement sign is true;
If be not true, read the local information on services of preserving to buffer memory, and from buffer memory, obtain the destination service address of the service of need calling.
According to claim 3 or 4 described methods, it is characterized in that 5, described information on services is kept at service consumer this locality in the mode of file.
6, a kind of system of transmitting service information is characterized in that, comprising: service register center, Disaster Recovery Service and service consumer, and wherein, described service register center comprises:
Lock unit is used for information on services is synchronized to Disaster Recovery Service;
Described Disaster Recovery Service comprises:
Memory cell is used to preserve the information on services that the lock unit of service register center sends;
Push unit is used for when described service register center is collapsed described information on services being pushed to service consumer.
7, system according to claim 6 is characterized in that, described memory cell is saved in local file system with the information on services of the lock unit transmission of service register center.
8, system according to claim 6 is characterized in that, described service consumer comprises:
Local memory cell is used to preserve the information on services that receives;
The destination service address acquisition unit is used for obtaining the destination service address of the service of need calling from described local memory cell when described service register center and Disaster Recovery Service all collapse.
9, system according to claim 8 is characterized in that, described service consumer also comprises:
The unit is set, after being used to receive information on services, will pushes sign and be changed to true;
Described destination service address acquisition unit comprises:
Judgment sub-unit is used for judging whether described propelling movement sign is true when needs call service;
Read subelement, be used for when described propelling movement sign for true time, read information on services that described local memory cell preserves to buffer memory, and from buffer memory, obtain the destination service address of the service of need calling.
10, according to Claim 8 or 9 described systems, it is characterized in that described local memory cell is preserved described information on services in the mode of file.
CN200810161362A 2008-09-23 2008-09-23 Method and system for transmitting service information Pending CN101686244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810161362A CN101686244A (en) 2008-09-23 2008-09-23 Method and system for transmitting service information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810161362A CN101686244A (en) 2008-09-23 2008-09-23 Method and system for transmitting service information

Publications (1)

Publication Number Publication Date
CN101686244A true CN101686244A (en) 2010-03-31

Family

ID=42049214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810161362A Pending CN101686244A (en) 2008-09-23 2008-09-23 Method and system for transmitting service information

Country Status (1)

Country Link
CN (1) CN101686244A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341366A (en) * 2015-07-06 2017-01-18 中兴通讯股份有限公司 Method and device for backuping multiple key servers and key server
CN107230264A (en) * 2016-11-25 2017-10-03 天地融科技股份有限公司 A kind of Door-access control method and device
CN109274734A (en) * 2018-09-07 2019-01-25 海信集团有限公司 A kind of service processes call method and device based on Internet of Things cloud platform
CN110365750A (en) * 2019-06-25 2019-10-22 苏宁云计算有限公司 Service registration system and method
CN112506702A (en) * 2020-12-03 2021-03-16 平安科技(深圳)有限公司 Data center disaster tolerance method, device, equipment and storage medium
CN115834668A (en) * 2022-11-08 2023-03-21 中国工商银行股份有限公司 Cluster node control method, device, equipment, storage medium and program product

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341366A (en) * 2015-07-06 2017-01-18 中兴通讯股份有限公司 Method and device for backuping multiple key servers and key server
CN107230264A (en) * 2016-11-25 2017-10-03 天地融科技股份有限公司 A kind of Door-access control method and device
CN109274734A (en) * 2018-09-07 2019-01-25 海信集团有限公司 A kind of service processes call method and device based on Internet of Things cloud platform
CN109274734B (en) * 2018-09-07 2021-10-15 海信集团有限公司 Service process calling method and device based on Internet of things cloud platform
CN110365750A (en) * 2019-06-25 2019-10-22 苏宁云计算有限公司 Service registration system and method
CN112506702A (en) * 2020-12-03 2021-03-16 平安科技(深圳)有限公司 Data center disaster tolerance method, device, equipment and storage medium
CN112506702B (en) * 2020-12-03 2024-02-23 平安科技(深圳)有限公司 Disaster recovery method, device, equipment and storage medium for data center
CN115834668A (en) * 2022-11-08 2023-03-21 中国工商银行股份有限公司 Cluster node control method, device, equipment, storage medium and program product
CN115834668B (en) * 2022-11-08 2024-05-07 中国工商银行股份有限公司 Cluster node control method, device, equipment, storage medium and program product

Similar Documents

Publication Publication Date Title
US9026583B2 (en) Method and apparatus for polymorphic serialization
CN102333029B (en) Routing method in server cluster system
US8886609B2 (en) Backup and restore of data from any cluster node
US20140081927A1 (en) Data node fencing in a distributed file system
US10114848B2 (en) Ensuring the same completion status for transactions after recovery in a synchronous replication environment
CN101686244A (en) Method and system for transmitting service information
CN103138912B (en) Method of data synchronization and system
US9275165B2 (en) Method and apparatus for defining an application to allow polymorphic serialization
KR101545626B1 (en) System for interoperation between dds and dbms
CN102831156A (en) Distributed transaction processing method on cloud computing platform
CN103338243A (en) Method and system for updating cache data of Web node
CN101394307A (en) Method, apparatus and system for on-line user amount statistic
CN103312624A (en) Message queue service system and method
US20120278429A1 (en) Cluster system, synchronization controlling method, server, and synchronization controlling program
WO2016082594A1 (en) Data update processing method and apparatus
CN110795395A (en) File deployment system and file deployment method
CN110740155B (en) Request processing method and device in distributed system
CN113010549A (en) Data processing method based on remote multi-active system, related equipment and storage medium
CN102340410A (en) Cluster management system and method
CN100485629C (en) Assembling type computer system high speed cache data backup processing method and system
CN105808221A (en) Card type desktop realization method and apparatus
CN113342746A (en) File management system, file management method, electronic device, and storage medium
CN107920131A (en) A kind of metadata management method and device of HDFS storage systems
CN117435569A (en) Dynamic capacity expansion method, device, equipment, medium and program product for cache system
CN112052104A (en) Message queue management method based on multi-computer-room realization and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1141644

Country of ref document: HK

C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100331

REG Reference to a national code

Ref country code: HK

Ref legal event code: WD

Ref document number: 1141644

Country of ref document: HK