CN108696551A - The method and apparatus that addressing is asked between system process - Google Patents

The method and apparatus that addressing is asked between system process Download PDF

Info

Publication number
CN108696551A
CN108696551A CN201710219426.XA CN201710219426A CN108696551A CN 108696551 A CN108696551 A CN 108696551A CN 201710219426 A CN201710219426 A CN 201710219426A CN 108696551 A CN108696551 A CN 108696551A
Authority
CN
China
Prior art keywords
service
information
services
register center
request
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
CN201710219426.XA
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201710219426.XA priority Critical patent/CN108696551A/en
Publication of CN108696551A publication Critical patent/CN108696551A/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/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5681Pre-fetching or pre-delivering data based on network characteristics
    • 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
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses the method and apparatus for asking addressing between a kind of system process, this method includes:Service consumer host receives the information on services inquiry request for reservation service;Service consumer host is according to information on services inquiry request by predetermined protocol to the information on services of service register center acquisition request reservation service, wherein information on services inquiry request includes:Service name and service version number;Information on services includes:Service IP address;Service consumer host receives the information on services that service register center returns, and is stored in local cache;Service consumer host sends service acquisition request according to information on services to the corresponding ISP's host of reservation service, to obtain reservation service.Process of the present invention allocating time is shorter, and process is relatively simple, solves the problems, such as follows:Either client discovery mode or server-side discovery mode, the service call time of request addressing system is longer between the process in distributed structure/architecture, system performance is relatively low.

Description

The method and apparatus that addressing is asked between system process
Technical field
The present invention relates to communication fields, more particularly to the method and apparatus for asking addressing between a kind of system process.
Background technology
Currently, in distributed structure/architecture, there are two types of modes for request addressing between process:
First way is client discovery mode, as shown in Figure 1, client is responsible for determining the network of respective service example Position, and load balancing is realized to request.Client is inquired from a service registration service, wherein being all available services The library of example.Client selects one using load-balancing algorithm from multiple Service Instances, then sends out request.
Which is needed for development language used by client, SDK (the software development works of customized special client Tool packet), the coupling for asking addressing codes between client code and process is increased, the cost of maintenance and exploitation is increased;And Since service consumer needs to inquire log-on message to service register center, which can influence request hair by network inquiry Send efficiency;Service register center service access pressure can be caused excessive simultaneously.
The second way is server-side discovery mode, as shown in Fig. 2, client (is located at service network by load equalizer It files a request inside the Pass) to some gateway, then request is sent out to service register center, finally will each ask forwarding past available Service Instance.
Which will be a list to that can pass through load equalizer, such load equalizer due to the request of each client Point will cause this system unavailable if load equalizer goes wrong;Also, due to needing by a load balancing The forwarding of device, it will increase taking for service call, influence the performance of system.
Therefore, either client discovery mode or server-side discovery mode are asked between the process in distributed structure/architecture Addressing system the problems such as all presence service allocating time is longer, system performance is relatively low.
Invention content
The present invention provides the method and apparatus that addressing is asked between a kind of system process, is asked to solve the following of the prior art Topic:Either client discovery mode or server-side discovery mode, request addressing system between the process in distributed structure/architecture The service call time is longer, system performance is relatively low.
In order to solve the above technical problems, on the one hand, the present invention provides a kind of method that addressing is asked between system process, packet It includes:Service consumer host receives the information on services inquiry request for reservation service;The service consumer host is according to institute Information on services of the information on services inquiry request by predetermined protocol to reservation service described in service register center acquisition request is stated, In, the information on services inquiry request includes:Service name and service version number;The information on services includes:Service IP address; The service consumer host receives the information on services that the service register center returns, and is stored in local cache; The service consumer host sends service according to the information on services to the corresponding ISP's host of the reservation service Request is obtained, to obtain the reservation service.
Optionally, after service consumer host receives the information on services inquiry request for reservation service, further include:Institute It states and whether there is the corresponding information on services of the information on services inquiry request in local cache described in service consumer Host Detection; If it is, the service consumer host obtains the information on services in the local cache;If it is not, then the service disappears The person's of expense host is taken by predetermined protocol to predetermined described in service register center acquisition request according to the information on services inquiry request The information on services of business.
Optionally, the service consumer host receives the information on services of the service register center return and stores After in local cache, including:The service consumer host by the life span TTL attributes in DNS Protocol by first when Length is revised as the second duration, wherein second duration is less than first duration.
Optionally, the service consumer host is noted by predetermined protocol to service according to the information on services inquiry request After volume center requests obtain the information on services of the reservation service, further include:The service consumer host is to the service Registration center sends service and monitors request, wherein the service monitors request and receives information on services modification information for asking;Institute The method of stating further includes:It is differed in the information on services of the information on services and the service consumer host of the service register center When, the service consumer host receives the new information on services that the service register center is sent.
On the other hand, the present invention also provides a kind of methods that addressing is asked between system process, including:ISP's host The information on services of reservation service is written in local file, wherein the information on services includes:Service name, service release number And service IP address;ISP's host reads the information on services stored in the local file, and by the service Information is sent to service register center, to be inquired by predetermined protocol in the service register center storage service consumer host Information on services.
Optionally, further include:ISP's host is spaced to schedule to be judged to deposit in the local file Whether the information on services of storage changes;In the case where changing, ISP's host reads again institute State the information on services in local file.
On the other hand, the present invention also provides the devices that addressing is asked between a kind of system process, are arranged in service consumer master Pusher side, including:First receiving module, for receiving the information on services inquiry request for reservation service;Acquisition module is used for root Believed to the service of reservation service described in service register center acquisition request by predetermined protocol according to the information on services inquiry request Breath, wherein the information on services inquiry request includes:Service name and service version number;The information on services includes:Service IP Address;Second receiving module, the information on services returned for receiving the service register center, and it is stored in local cache In;Sending module is obtained for sending service to the corresponding ISP's host of the reservation service according to the information on services Request is taken, to obtain the reservation service.
Optionally, further include:Detection module is inquired for detecting in the local cache with the presence or absence of the information on services Ask corresponding information on services;The acquisition module is additionally operable to there are the information on services inquiry request corresponding service letters In the case of breath, the information on services in the local cache is obtained;There is no the corresponding clothes of the information on services inquiry request In the case of information of being engaged in, according to the information on services inquiry request by predetermined protocol to described in service register center acquisition request The information on services of reservation service.
Optionally, further include:Setup module, for after the information on services is stored in local cache, by DNS Life span TTL attributes in agreement are revised as the second duration by the first duration, wherein second duration is less than described first Duration.
Optionally, further include:Request monitoring module, by predetermined protocol to pre- described in service register center acquisition request Surely it after the information on services serviced, sends service to the service register center and monitors request, wherein request is monitored in the service For asking to receive information on services modification information;Second receiving module, is additionally operable to the service in the service register center When information and the information on services of the service consumer host differ, the new service that the service register center is sent is received Information.
On the other hand, the present invention also provides the devices that addressing is asked between a kind of system process, are arranged in ISP master Pusher side, including:Writing module, the information on services for reservation service to be written in local file, wherein the information on services packet It includes:Service name, service release number and service IP address;Execution module, for reading the service stored in the local file Information, and the information on services is sent to service register center, in the service register center storage service consumer master The information on services that machine is inquired by predetermined protocol.
Optionally, further include:Judgment module, for being spaced the institute for judging to store in the local file to schedule State whether information on services changes;The execution module is additionally operable in the case where changing, and reads again the local Information on services in file.
Service consumer host of the present invention receives the information on services inquiry request for reservation service that consumer sends out, with Afterwards, for the request, information on services is asked to service register center by predetermined protocol, is returned further according to service register center Information on services obtains reservation service, due to also storing the corresponding information on services of reservation service in local cache, when service disappears When expense person's host reuses the reservation service, obtained directly from local cache, whole process allocating time is shorter, mistake Journey is relatively simple, and system performance is preferable, solves the problems, such as the as follows of the prior art:Either client discovery mode still services Discovery mode is held, the service call time of request addressing system is longer between the process in distributed structure/architecture, system performance is relatively low.
Description of the drawings
Fig. 1 is client discovery mode Organization Chart in the prior art;
Fig. 2 is server-side discovery mode Organization Chart in the prior art;
Fig. 3 is the flow chart for the method for asking addressing in first embodiment of the invention between system process;
Fig. 4 is the flow chart for the method for asking addressing in second embodiment of the invention between system process;
Fig. 5 is the structural schematic diagram for the device for asking addressing in third embodiment of the invention between system process;
Fig. 6 is the structural schematic diagram for the device for asking addressing in fourth embodiment of the invention between system process;
Fig. 7 is each component setting schematic diagram in fifth embodiment of the invention;
Fig. 8 is the sequential for the information on services that service registration collect components service provider is provided in the embodiment of the present invention Figure;
Fig. 9 is that service consumer uses the sequence diagram of DNS Protocol inquiry service provider information in the embodiment of the present invention;
Figure 10 is the sequence diagram that service consumer is notified when service registration information changes in the embodiment of the present invention.
Specific implementation mode
In order to solve the problems, such as the as follows of the prior art:Either client discovery mode or server-side discovery mode, point Asked between process in cloth framework addressing system the service call time is longer, system performance is relatively low;The present invention provides one The method and apparatus that addressing is asked between kind system process carry out the present invention further detailed below in conjunction with attached drawing and embodiment It describes in detail bright.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, the present invention is not limited.
First embodiment of the invention provides a kind of method that addressing is asked between system process, and this method is applied to disappear in service The person's of expense host, flow is as shown in figure 3, include step S302 to S308:
S302, service consumer host receive the information on services inquiry request for reservation service;
S304, service consumer host are asked by predetermined protocol to service register center according to information on services inquiry request Obtain the information on services of reservation service, wherein information on services inquiry request includes:Service name and service version number;The clothes Business information include:Service IP address;
S306, service consumer host receives the information on services that service register center returns, and is stored in local cache;
S308, service consumer host send service according to information on services to the corresponding ISP's host of reservation service Request is obtained, to obtain reservation service.
Service consumer host of the embodiment of the present invention receives the information on services for reservation service that consumer sends out and inquires Request then for the request, asks information on services, further according in service registration by predetermined protocol to service register center The information on services that the heart returns obtains reservation service, due to also storing the corresponding information on services of reservation service in local cache, It when service consumer host reuses the reservation service, is obtained directly from local cache, when whole process is called Between it is shorter, process is relatively simple, and system performance is preferable, solves the problems, such as the as follows of the prior art:Either client finds mould Formula or server-side discovery mode, the service call time of request addressing system is longer between the process in distributed structure/architecture, system Performance is relatively low.
Since the corresponding information on services of the reservation service got has been buffered in local by above-mentioned S306, work as service Consumer host again for reservation service information on services inquiry request when, request the corresponding information on services of reservation service Very likely exist in local cache, therefore, is asked for the information on services inquiry of reservation service in the reception of service consumer host After asking, service consumer host can also detect in local cache with the presence or absence of the corresponding service letter of information on services inquiry request Breath.
If it is present service consumer host obtains the information on services in local cache, and directly believed according to the service Breath executes the process of S308, if it does not exist, then service consumer host executes step S306, i.e., is looked into according to information on services It askes request and passes through information on services of the predetermined protocol to service register center acquisition request reservation service.When realization, the predetermined protocol It can be DNS Protocol.
When saving the information on services of reservation service in local cache, if service register center is to the reservation service Information on services is updated, and information on services still original in the caching of service consumer host, then may result in clothes Business consumer host can obtain reservation service using expired information on services.
Therefore, the embodiment of the present invention receives the information on services that service register center returns and storage in service consumer host After in local cache, the TTL attributes in DNS Protocol can be revised as by the first duration less than first by service consumer host The second duration of duration, in this way, when the second duration setting it is more small when, it will be able to got in time from service register center newest Information on services, obtain reservation service, user experience using expired information on services so as to avoid service consumer host Preferably.
Information on services in order to further determine reservation service is newest version in local cache, therefore, is being serviced Consumer host is according to information on services inquiry request by predetermined protocol to the clothes of service register center acquisition request reservation service After information of being engaged in, it can send to service to monitor to service register center and ask, to ask to believe to monitor service by servicing to monitor The modification information of breath.In this case, when service register center find its internal information on services version and its between send When being differed to the information on services of service consumer host, new new information on services is just sent to service consumer host, with Ensure that the information on services in service consumer host local cache is latest edition, advanced optimizes system performance.
Second embodiment of the invention provides a kind of method that addressing is asked between system process, and this method is applied to be carried in service Donor host, flow is as shown in figure 4, include step S402 to S404:
The information on services of reservation service is written in S402, ISP's host in local file, wherein information on services packet It includes:Service name, service release number and service IP address;
S404, ISP's host reads the information on services stored in local file, and information on services is sent to clothes Be engaged in registration center, with the information on services inquired by predetermined protocol in service register center storage service consumer host.
For service register center, want when the cluster for being different services, in the in store various possibility of service register center The service called by service consumer host.
ISP of embodiment of the present invention host is by original stream that reservation service is directly registered with to service register center Cheng Jinhang changes, and reservation service is write in local file, and its corresponding information on services is written, then by the predetermined clothes of write-in Corresponding information on services of being engaged in is sent to service register center, in this way, just completing in the registration in service register center, and services note Volume center also saves the information on services of reservation service, so that subsequent consumption person's service host obtains predetermined clothes by predetermined protocol It is used when business, wherein the predetermined protocol can be DNS Protocol.
Since ISP's host can be updated the reservation service of offer, ISP's host will be by Judge whether the information on services stored in local file changes according to predetermined time interval.In setting, predetermined time interval What is be arranged as possible is shorter, is easier to find the variation of information on services in this way.
In the case where the information on services of reservation service changes, ISP's host is read again in local file Information on services, and newer information on services is sent to service register center.
Third embodiment of the invention provides the device that addressing is asked between a kind of system process, is arranged in service consumer Host computer side, the structural representation of the device is as shown in figure 5, include:
First receiving module 10, for receiving the information on services inquiry request for reservation service;Acquisition module 11, with One receiving module 10 couples, for pre- to service register center acquisition request by predetermined protocol according to information on services inquiry request Surely the information on services serviced, wherein information on services inquiry request includes:Service name and service version number;The information on services Including:Service IP address;Second receiving module 12, couples with acquisition module 11, the clothes for receiving service register center return Business information, and be stored in local cache;Sending module 13 is coupled with the second receiving module 12, for according to information on services to The corresponding ISP's host of reservation service sends service acquisition request, to obtain reservation service.
The above-mentioned apparatus of the embodiment of the present invention can exist in the form of a software or component and disappear in service in setting In the person's of expense host, when consumer is in host interface application reservation service, by predetermined protocol come send out request, backstage it is above-mentioned Device just inquires the information on services of reservation service according to predetermined protocol, during being somebody's turn to do, the first receiving module 10 and acquisition module 11 work.
When the second receiving module 12 receives information on services, which is stored in local cache, under The same reservation service of secondary service consumer application is prepared.Then, sending module 13 work, according to obtained information on services come Obtain corresponding reservation service.
Above-mentioned apparatus can also include:Detection module is coupled with the first receiving module and acquisition module, for detecting local It whether there is the corresponding information on services of information on services inquiry request in caching;Acquisition module is additionally operable to look into presence service information It askes in the case of asking corresponding information on services, obtains the information on services in local cache;There is no information on services inquiry ask In the case of seeking corresponding information on services, obtained to service register center request by predetermined protocol according to information on services inquiry request Take the information on services of reservation service.
When saving the information on services of reservation service in local cache, if service register center is to the reservation service Information on services is updated, and information on services still original in the caching of service consumer host, then may result in clothes Business consumer host can obtain reservation service using expired information on services.
Therefore, the above-mentioned apparatus of the embodiment of the present invention can also include:Setup module is coupled with the second receiving module, is used In after information on services is stored in local cache, the life span TTL attributes in DNS Protocol are changed by the first duration For the second duration, wherein the second duration is less than the first duration.
Information on services in order to further determine reservation service is newest version, the embodiment of the present invention in local cache Above-mentioned apparatus can also include:Request monitoring module is coupled with acquisition module and the second receiving module, is passing through predetermined protocol To after the information on services of service register center acquisition request reservation service, sends service to service register center and monitors request, Wherein, service monitors request and receives information on services modification information for asking;Second receiving module, is additionally operable in service registration When the information on services of the heart is differed with the information on services of service consumer host, the new service that service register center is sent is received Information.
Fourth embodiment of the invention provides the device that addressing is asked between a kind of system process, is arranged in ISP master Pusher side, the structural representation of the device is as shown in fig. 6, include:
Writing module 20, the information on services for reservation service to be written in local file, wherein information on services includes: Service name, service release number and service IP address;Execution module 21 is coupled with writing module 20, for reading local file The information on services of middle storage, and information on services is sent to service register center, to be consumed in service register center storage service The information on services that person's host is inquired by predetermined protocol.
The above-mentioned apparatus of the embodiment of the present invention can exist in the form of a software or component and be carried in service in setting In donor host, when ISP will provide service for service consumer, then thought that service to be offered passes through write-in Module 20 is written in local file, and indicates its information on services.The clothes finished writing are read after write-in, then by execution module 21 Business information, and it is registered to service register center, in this way, just completing in the registration in service register center, and service registration Center also saves the information on services of reservation service, so that subsequent consumption person's service host obtains reservation service by predetermined protocol When use.
Since ISP's host can be updated the reservation service of offer, the above-mentioned dress of the embodiment of the present invention Setting to include:Judgment module is coupled with writing module and execution module, judges local text for interval to schedule Whether the information on services stored in part changes;Execution module is additionally operable to, in the case where changing, read again local Information on services in file.
Fifth embodiment of the invention provides a kind of method for asking addressing between distributed system process, and this method utilizes DNS Protocol finds target process IP address, and information on services caused by DNS cache is overcome to update not in time and DNS The problem of pressure of single-point inquiry, more particularly on PAAS (platform services) platform;When using micro services framework, solve The problem of how being cooperated between micro services process.
DNS (domain name system, Domain Name System) is a kind of computer and networks being organized into domain hierarchy structure Service naming system, it for TCP (transmission control protocol, Transmission Control Protocol)/IP (network it Between the agreement that interconnects, Internet Protocol) network, the service that it is provided is for being converted to host name and domain name The work of IP address.
DNS query is parsed in a variety of ways.Client computer can also obtain sometimes by using from former inquiry Cache information reply inquiry on the spot, then dns server can be used the resource record information cache of its own come response inquiry, Requesting clients can be represented to inquire or contact other dns servers, to parse the title completely, and be then back to response Client computer, this process are known as recurrence.
It, can be by DNS entry in visitor in order to reduce the access pressure to dns server but since DNS Protocol is when formulating Family end is cached, however in distributed environment, especially in the environment of PAAS, provide the IP address of the target process of service It can generally change with restarting for service processes.
It is the existing stage, all default in the operating system of various mainstreams to realize DNS Protocol stack, the exploitation language of mainstream Speech is also all supported by way of DNS query, to obtain the IP address information of destination service;And in a distributed system, due to Can have the process developed using various development languages is had so being completed the inquiry of target service address using DNS Protocol Very strong applicability.
Therefore, will provide one kind for this problem in the present embodiment can be such that service caller quick sensing service carries The variation of donor IP, and can guarantee high-frequency access dns server Query Information will not occur, and to entire DNS query system The case where system causes to impact, leads to its fluctuation of service occurs.
In distributed structure/architecture, if the process where ISP is restarted on new host, IP address can be sent out Changing, and the purpose of the embodiment of the present invention is:It solves after service IP address variation, service caller energy quick sensing arrives this A variation, and ensure the efficient of interprocess communication, the stabilization of system operation, and various development languages can be supported to develop as possible Program, service addressing can be carried out using the method.Therefore, it asks to seek between the distributed system process of the embodiment of the present invention The method of location is as follows, and this method is realized by three components, i.e. service registration component, information on services registration center component and service Enquiring component, setting signal as shown in fig. 7, be described separately below.
(1) service registration component is arranged in ISP's host computer side.
Service registration assembly operating host where service provider monitors the service that ISP's process is provided, Service registration component requires ISP's process in issuing service, and the information of service is write in a local file, this Sample service registration component can perceive the information on services that service offer process is provided by the variation of file content.
The effect that this component can generate is as follows:It is run using single process, does not interfere with ISP's operation, it can be with Realize Fault Isolation;The interaction of log-on message is carried out using file, need not use individual SDK, there is very strong usability, It can support the program of various development language exploitations.
(2) information on services registration center component is arranged in service register center.
Information on services registration center component is the component for centrally stored information on services, using cluster mode, service note After the information of the volume component service that monitoring process provides being collected into, the progress of information on services registration center can be will send information to It preserves.
The effect that this component can generate is as follows:Reduce the pressure of consumer end storage all information;It can quick more new demand servicing State, and can realize the function that change is notified to consumer end in time.
(3) service-seeking component is arranged in service consumer host computer side.
In same host, service caller can pass through for service-seeking component and service caller (i.e. service consumer) DNS Protocol and service-seeking component interaction obtain the information on services that ISP is registered.In order to operating system and exploitation The DNS Protocol interaction of language acquiescence, these can use DNS A records (only supporting to pass through domain Name acquisition IP address), because In micro services framework, when micro services process is restarted, the IP address of host (virtual machine) can change where general micro services, but it takes It is engaged in what port substantially changed, so the format energy meet demand recorded using DNS A, and have maximum adaptability.
The effect that this component can generate is as follows:It is interacted, need not be used individual with service consumer using DNS Protocol SDK has very strong usability, can support the program of various development language exploitations;It is deployed in identical master with service consumer On machine, for inquiry request not by network transmission, query performance is high;Using the information of own cache, response association requests can be reduced With the frequency of interaction of information on services registration center component, it is conducive to ensure the stable operation of information on services registration center component;It is only slow The required information on services of this service consumer is deposited, consumption system resource is few.
The general steps of the above method are as follows:
The first step:The information on services that service registration collect components service provider is provided.
Second step:Service consumer inquires service provider information using DNS Protocol.
Third walks:After information on services changes, modification information notifies service user.
In the following, refining its implementation process for each big step.
The first step may include again:
(1):Service registration component starts as a background process, and beginning listening for a specified local file content is It is no to change.
(2):After the completion of ISP's process initiation, information on services (Service name and the service release that can be provided Number) be written in the file of service registration component monitoring, and can periodically be written, relevant timestamp is updated, the heart is played The effect of jump.
(3):Service registration component can report information on services to service registration after the content for perceiving file changes Center.
Second step may include again:
(1):The dns server address of host is configured to 127.0.0.1 where service consumer, and those skilled in the art know Dawn, which is the address interacted with dns server.
(2):Service consumer creates network connection using Service name and port, due to the use of be Service name as domain Name, can trigger service consumer process and use DNS Protocol, and corresponding IP address is inquired to service-seeking component.
(3):It is inquired if it is first time, service-seeking component can then inquire the related letter of service to service register center Breath after inquiring the corresponding IP address of service, returns to service consumer, and register and monitor in service register center, if This service provision information changes, proactive notification service-seeking component.
(4):It is inquired if not first time, then the buffered IP information of ISP of service-seeking component, then It is directly returned to service consumer.
(5):If inquiring the IP address less than information service, mistake is returned.
(6):When returning to service message person's information, the TTL attributes of DNS can be set to 1 second, such service consumer Process would not hold the cache entries of information on services for a long time, so that it may to allow service message person quick sensing ISP Variation.
Third, which walks, may include again:
(1):After service registration collect components to new service registration information, log-on message is reported in service registration The heart.
(2):Service register center obtains the service-seeking component paid close attention to this information on services according to the login name of service List.
(3):According to the list that upper step obtains, new service registration information is issued to service-seeking component.
Using the above method provided in an embodiment of the present invention, compared with prior art, there is benefit below:
To development language used by service provider and service consumer, there is no limit;Service consumer is taken by the machine Business enquiring component inquires information on services, due to not having the step of network transmission, efficiency very high using DNS Protocol;The TTL of DNS is set It is set to 1 second, can guarantee variation of consumer's energy quick sensing to the information of ISP;Each service consumer takes from the machine Business enquiring component Query Information, inquiry pressure dissipation will not lead to the inquiry pressure mistake of service register center on each host It is high.
The key point of the present invention is being used as service query protocol with by DNS, while inquiry pressure being shared to more On a host, excessive inquiry pressure is avoided, service register center delay machine is caused, while decreased in inquiry information on services When take, improve the performance of system.In the following, continuing to illustrate to the above process in conjunction with attached drawing.
The sequence diagram for the information on services that Fig. 8 is provided by service registration collect components service provider comprising following step Suddenly:
Step 801, service registration component starts as background process, and periodically inquires the interior of shared file Hold variation.
Step 802, after ISP's start completion, the information of write service supplier into shared file.
Step 803, service registration component reads the content in file.
Step 804, service registration component gets the information for the service being newly written in file.
Step 805, new information on services is registered to service register center by service registration component.
Fig. 9 is sequence diagram of the service consumer using DNS Protocol inquiry service provider information comprising following steps:
Step 901, service consumer uses DNS Protocol, and the information of ISP is inquired to service-seeking component.
Step 902, the temporary information without related service in service enquiring component caching, then inquire to service register center Related service information, and the heart subscribes to the notice of this information on services variation in service.
Step 903, service register center returns to relevant service provider's information to service-seeking component.
Step 904, service-seeking component is caching this Service provider information.
Step 905, Service provider information is returned to service consumer by service-seeking component by DNS Protocol.
Step 906, service consumer uses Service provider information, accesses ISP.
Step 907, ISP returns result to service consumer.
Step 908, service consumer inquires the information of ISP to service-seeking component again by DNS Protocol.
Step 909, service-seeking component inspection caches, and finds the information for having had ISP.
Step 910, the Service provider information in caching is directly returned to service consumer by service-seeking component.
Step 911, service consumer uses Service provider information, accesses ISP.
Step 912, ISP returns result to service consumer.
Figure 10 is the sequence diagram that service consumer is notified when service registration information variation comprising following steps:
Step 1001, ISP is written in new information on services to shared file.
Step 1002, the content of service registration element period read in file.
Step 1003, service registration component obtains the information of new ISP.
Step 1004, new Service provider information is registered to service register center by service registration component.
Step 1005, service register center inquiry provides the service-seeking component that information has monitoring to this server.
Step 1006, Service provider information is notified into service-seeking component.
Step 1007, the Service provider information in service-seeking component update caching.
Although being example purpose, the preferred embodiment of the present invention is had been disclosed for, those skilled in the art will recognize Various improvement, increase and substitution are also possible, and therefore, the scope of the present invention should be not limited to the above embodiments.

Claims (12)

1. a kind of method for asking addressing between system process, which is characterized in that including:
Service consumer host receives the information on services inquiry request for reservation service;
The service consumer host is asked by predetermined protocol to service register center according to the information on services inquiry request Obtain the information on services of the reservation service, wherein the information on services inquiry request includes:Service name and service release Number;The information on services includes:Service IP address;
The service consumer host receives the information on services that the service register center returns, and is stored in local cache In;
The service consumer host is sent according to the information on services to the corresponding ISP's host of the reservation service Service acquisition is asked, to obtain the reservation service.
2. the method as described in claim 1, which is characterized in that service consumer host receives the service letter for reservation service After ceasing inquiry request, further include:
It detects and whether there is the corresponding information on services of the information on services inquiry request in the local cache;
If it is, obtaining the information on services in the local cache;
If it is not, then according to the information on services inquiry request by predetermined protocol to described in service register center acquisition request The information on services of reservation service.
3. the method as described in claim 1, which is characterized in that the service consumer host receives the service register center The information on services that returns and after being stored in local cache, including:
Life span TTL attributes in DNS Protocol are revised as the second duration by the first duration, wherein second duration is small In first duration.
4. method as claimed any one in claims 1 to 3, which is characterized in that the service consumer host is according to Information on services inquiry request by predetermined protocol to after the information on services of reservation service described in service register center acquisition request, Further include:
Service is sent to the service register center and monitors request, wherein the service monitors request and receives service for asking Information modification information;
The method further includes:
When the information on services of the service register center and the information on services of the service consumer host differ, institute is received State the new information on services of service register center transmission.
5. a kind of method for asking addressing between system process, which is characterized in that including:
The information on services of reservation service is written in ISP's host in local file, wherein the information on services includes:Clothes Business title, service release number and service IP address;
ISP's host reads the information on services stored in the local file, and the information on services is sent to Service register center, to be believed by the service that predetermined protocol is inquired in the service register center storage service consumer host Breath.
6. method as claimed in claim 5, which is characterized in that further include:
Interval judges whether the information on services stored in the local file changes to schedule;
In the case where changing, the information on services in the local file is read again.
7. asking the device of addressing between a kind of system process, it is arranged in service consumer host computer side, which is characterized in that including:
First receiving module, for receiving the information on services inquiry request for reservation service;
Acquisition module, for according to the information on services inquiry request by predetermined protocol to service register center acquisition request institute State the information on services of reservation service, wherein the information on services inquiry request includes:Service name and service version number;It is described Information on services includes:Service IP address;
Second receiving module, the information on services returned for receiving the service register center, and it is stored in local cache In;
Sending module is obtained for sending service to the corresponding ISP's host of the reservation service according to the information on services Request is taken, to obtain the reservation service.
8. device as claimed in claim 7, which is characterized in that further include:
Detection module, for detecting in the local cache with the presence or absence of the corresponding service letter of the information on services inquiry request Breath;
The acquisition module is additionally operable in the case of information on services corresponding there are the information on services inquiry request, is obtained Information on services in the local cache;In the case of information on services corresponding there is no the information on services inquiry request, According to the information on services inquiry request by predetermined protocol to the service of reservation service described in service register center acquisition request Information.
9. device as claimed in claim 7, which is characterized in that further include:
Setup module, for after the information on services is stored in local cache, by the life span in DNS Protocol TTL attributes are revised as the second duration by the first duration, wherein second duration is less than first duration.
10. the device as described in any one of claim 7 to 9, which is characterized in that further include:
Request monitoring module, by information on services from predetermined protocol to reservation service described in service register center acquisition request it Afterwards, it sends service to the service register center and monitors request, wherein the service monitors request and receives service letter for asking Cease modification information;
Second receiving module is additionally operable to the information on services in the service register center and the service consumer host When information on services differs, the new information on services that the service register center is sent is received.
11. asking the device of addressing between a kind of system process, it is arranged in ISP's host computer side, which is characterized in that including:
Writing module, the information on services for reservation service to be written in local file, wherein the information on services includes:Clothes Business title, service release number and service IP address;
Execution module is sent to service for reading the information on services stored in the local file, and by the information on services Registration center, with the information on services inquired by predetermined protocol in the service register center storage service consumer host.
12. device as claimed in claim 11, which is characterized in that further include:
Judgment module judges whether the information on services stored in the local file occurs for being spaced to schedule Variation;
The execution module is additionally operable in the case where changing, and reads again the information on services in the local file.
CN201710219426.XA 2017-04-06 2017-04-06 The method and apparatus that addressing is asked between system process Pending CN108696551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710219426.XA CN108696551A (en) 2017-04-06 2017-04-06 The method and apparatus that addressing is asked between system process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710219426.XA CN108696551A (en) 2017-04-06 2017-04-06 The method and apparatus that addressing is asked between system process

Publications (1)

Publication Number Publication Date
CN108696551A true CN108696551A (en) 2018-10-23

Family

ID=63842510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710219426.XA Pending CN108696551A (en) 2017-04-06 2017-04-06 The method and apparatus that addressing is asked between system process

Country Status (1)

Country Link
CN (1) CN108696551A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257440A (en) * 2018-10-29 2019-01-22 南京南瑞信息通信科技有限公司 A kind of service discovery and client load equalization methods based on service register center
CN109412853A (en) * 2018-10-31 2019-03-01 中国建设银行股份有限公司 Distributed Services register storage method, system, device and storage medium
CN109547570A (en) * 2018-12-29 2019-03-29 深圳云天励飞技术有限公司 Service registration method, apparatus, registration center's management equipment and storage medium
CN110113194A (en) * 2019-04-25 2019-08-09 上海易点时空网络有限公司 Client based on PHP accesses the method and device of available remote service
CN110519395A (en) * 2019-09-16 2019-11-29 北京思维造物信息科技股份有限公司 Service request processing method, device, computer equipment and storage medium
CN110990081A (en) * 2019-12-10 2020-04-10 北京懿医云科技有限公司 Microservice registration and discovery method and device, storage medium and electronic equipment
WO2021237588A1 (en) * 2020-05-28 2021-12-02 西门子股份公司 Communication conversion method, gateway device, network system and computer medium
CN113791799A (en) * 2021-01-06 2021-12-14 北京沃东天骏信息技术有限公司 System upgrading method and device, computer readable storage medium and electronic equipment
WO2023198103A1 (en) * 2022-04-14 2023-10-19 华为技术有限公司 Inter-process communication method and electronic device
US11973823B1 (en) * 2023-01-11 2024-04-30 Dell Products L.P. Offloading namespace redirection to backup clients in a scale out cluster

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257440A (en) * 2018-10-29 2019-01-22 南京南瑞信息通信科技有限公司 A kind of service discovery and client load equalization methods based on service register center
CN109412853A (en) * 2018-10-31 2019-03-01 中国建设银行股份有限公司 Distributed Services register storage method, system, device and storage medium
CN109547570A (en) * 2018-12-29 2019-03-29 深圳云天励飞技术有限公司 Service registration method, apparatus, registration center's management equipment and storage medium
CN109547570B (en) * 2018-12-29 2021-07-06 深圳云天励飞技术有限公司 Service registration method, device, registration center management equipment and storage medium
CN110113194A (en) * 2019-04-25 2019-08-09 上海易点时空网络有限公司 Client based on PHP accesses the method and device of available remote service
CN110519395A (en) * 2019-09-16 2019-11-29 北京思维造物信息科技股份有限公司 Service request processing method, device, computer equipment and storage medium
CN110990081A (en) * 2019-12-10 2020-04-10 北京懿医云科技有限公司 Microservice registration and discovery method and device, storage medium and electronic equipment
WO2021237588A1 (en) * 2020-05-28 2021-12-02 西门子股份公司 Communication conversion method, gateway device, network system and computer medium
US11876876B2 (en) 2020-05-28 2024-01-16 Siemens Aktiengesellschaft Communication conversion method, gateway device, network system and computer medium
CN113791799A (en) * 2021-01-06 2021-12-14 北京沃东天骏信息技术有限公司 System upgrading method and device, computer readable storage medium and electronic equipment
WO2023198103A1 (en) * 2022-04-14 2023-10-19 华为技术有限公司 Inter-process communication method and electronic device
US11973823B1 (en) * 2023-01-11 2024-04-30 Dell Products L.P. Offloading namespace redirection to backup clients in a scale out cluster

Similar Documents

Publication Publication Date Title
CN108696551A (en) The method and apparatus that addressing is asked between system process
EP2787742B1 (en) Method and system for transmitting network video
US8341297B2 (en) Latencies and weightings in a domain name service (DNS) system
US8195831B2 (en) Method and apparatus for determining and using server performance metrics with domain name services
US8966121B2 (en) Client-side management of domain name information
CN105763668B (en) A kind of domain name analytic method and device
US9450912B2 (en) Method and device for accessing application server
CN102281190B (en) Networking method for load balancing apparatus, server and client access method
RU2464722C2 (en) Method, device and system for distribution of messages
CN103905574B (en) A kind of DNS Operational Visits method, DNS data synchronous method and equipment
WO2008074365A1 (en) Method and apparatus for establishing a session
CN106470251A (en) Domain name analytic method and virtual DNS authority server
CN101800760A (en) Realization method and system for accessing data service
CN105338128B (en) Domain name analytic method and domain name mapping device
CN108632397A (en) To the control method and system of network connection
CN109067936A (en) A kind of method and device of domain name mapping
CN111147308B (en) Network management method and system based on micro-service architecture
JP2008522464A (en) Method and system for agent to redirect terminal request
US6408339B1 (en) Non-permanent address allocation
CN109618024A (en) A kind of domain name analytic method and system based on HTTP
US8230074B2 (en) System and method for reducing required memory usage between communication servers
CN112637332A (en) Service registration discovery method and system
CN114125051A (en) Agent method and device for dynamic service discovery
CN109040342A (en) A kind of addressing method and system for specially enjoying Cloud Server
CN105025114B (en) A kind of domain name analytic method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20181023