CN108989420A - The method and system of registration service, the method and system for calling service - Google Patents
The method and system of registration service, the method and system for calling service Download PDFInfo
- Publication number
- CN108989420A CN108989420A CN201810761506.2A CN201810761506A CN108989420A CN 108989420 A CN108989420 A CN 108989420A CN 201810761506 A CN201810761506 A CN 201810761506A CN 108989420 A CN108989420 A CN 108989420A
- Authority
- CN
- China
- Prior art keywords
- service
- server
- client
- client agent
- information
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/1066—Session management
- H04L65/1073—Registration or de-registration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/566—Grouping or aggregating service requests, e.g. for unified processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Abstract
The invention discloses a kind of method and system of registration service, call the method and system serviced.Wherein, a kind of method of registration service, comprising the following steps: server-side is acted on behalf of to server-side and sends registration request;Registration request described in the server-side proxy resolution, and the information on services that record parsing obtains in first service list, and the information on services is sent to Client Agent;The Client Agent updates second service list according to the information on services, for client access, wherein the second service list is identical as the first service list.Compared with prior art, the present invention is by setting server-side agency and Client Agent, even if server-side and client not in the same local area network, also can be realized data transmission between the two.
Description
Technical field
The present invention relates to computer field, in particular to a kind of method and system of registration service further relate to a kind of calling
The method and system of service.
Background technique
With the rise of micro services framework (new technology that micro services framework is a deployment application and service in cloud), clothes
Boundary demarcation between business is more and more clear, and Each performs its own functions for each independent service, not only accelerates the exploitation and deployment of service
Speed also facilitates the management for various aspects such as the capacity of service and monitoring.Meanwhile the call chain of single operation flow is got over
Come more complicated, the processing of a usual request needs the processing by tens or even a subsystems up to a hundred, it is also possible to across more
A data center.If data in the same local area network, can directly be transmitted in these data centers between data center.
But if these data centers not in the same local area network, can not just realize that data are passed using the method for the prior art
It is defeated.
Summary of the invention
The technical problem to be solved by the present invention is in order to overcome in the prior art multiple data centers not in the same local
Lead to not the defect for directly transmitting data in net, a kind of method and system of registration service are provided, a kind of calling clothes are also provided
The method and system of business.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The first aspect of the present invention provides a kind of method of registration service, comprising the following steps:
Server-side is acted on behalf of to server-side and sends registration request;
Registration request described in the server-side proxy resolution, and the service letter that record parsing obtains in first service list
Breath, and the information on services is sent to Client Agent;
The Client Agent updates second service list according to the information on services, for client access, wherein institute
It is identical as the first service list to state second service list.
Optionally, the information on services includes ID and token (computerese, token);
The Client Agent according to the information on services update second service list the step of include:
If comprising the ID in the information on services in second service list, the Client Agent is by the second service
The token of service corresponding with the ID is updated to the token in the information on services in list;
Otherwise, the Client Agent is directly by the record of service information in the second service list.
The second aspect of the present invention provides a kind of system of registration service, including server-side, server-side agency and client
End agency;
The server-side, which is used to act on behalf of to the server-side, sends registration request;
The server-side agency is for parsing the registration request, and the clothes that record parsing obtains in first service list
Business information, and the information on services is sent to the Client Agent;
The Client Agent is used to update second service list according to the information on services, so that client accesses,
In, the second service list is identical as the first service list.
The third aspect of the present invention provides a kind of method for calling service, comprising the following steps:
Client sends call request to Client Agent;
The Client Agent parses token from the call request, if the token meets preset protocol,
The call request is forwarded to server-side agency;
The server-side agency parses ID from the call request, and is looked into from first service list according to the ID
Corresponding service is ask, and calls the service to server-side.
Optionally, the method also includes:
If the token does not meet preset protocol, the Client Agent returns to error message to the client.
Optionally, after the step of server-side is acted on behalf of to the server-side calling service further include:
If the server-side returns to data corresponding with the service not in preset duration, the Client Agent to
The client return cache data.
Optionally, the method also includes: the Client Agents and/or the server-side agent monitors to call service
Situation.
Optionally, the case where calling services includes at least one of the following: calling total degree, malloc failure malloc time
Number, malloc failure malloc rate, most long in short-term, the longest duration called called, the average duration of calling, call processor device IP
Location.
The fourth aspect of the present invention provides a kind of system for calling service, including client, Client Agent, server-side generation
Reason and server-side;
The client is used to send call request to the Client Agent;
The Client Agent is for parsing token from the call request, if the token meets default association
The call request is then forwarded to the server-side and acted on behalf of by view;
Server-side agency from the call request for parsing ID, and according to the ID from first service list
The middle corresponding service of inquiry, and the service is called to the server-side.
On the basis of common knowledge of the art, above-mentioned each optimum condition, can any combination to get each preferable reality of the present invention
Example.
The positive effect of the present invention is that: compared with prior art, the present invention is acted on behalf of by setting server-side and visitor
Family end agency, even if server-side and client not in the same local area network, also can be realized data transmission between the two.
Wherein, in the method for registration service, Client Agent also achieves the dynamic registration of service, in order to client
Access, it is thus also avoided that project disposes early stage service interface amount and increases too fast and frequently deploying projects trouble, may make traditional
Exploitation-test-publication process is more convenient, the variation of quick response business demand.In the method for calling service, pass through visitor
The verifying to token is acted on behalf of at family end, has been intercepted invalid and illegal call request, ensure that the validity of service call.
Detailed description of the invention
Fig. 1 is system structure diagram of the invention.
Fig. 2 is the method flow diagram of registration service provided in an embodiment of the present invention.
Fig. 3 is the method flow diagram provided in an embodiment of the present invention for calling service.
Specific embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to the reality
It applies among a range.
In the present invention, server-side is the one end for the service that provides, and client is to call one end of service, server-side agency and visitor
Family end agency is proxy server, can be the computer system for providing agency service or the other types of network terminal, by with
To connect INTERNET (Internet) and Local Area Network (local area network).
Those skilled in the art it is to be understood that server-side and server-side agency be located at the same local area network in, client
It is located in the same local area network with Client Agent.In addition, server-side and client can be located in the same local area network, it can also
To be located in different local area networks.The present invention is improved primarily directed to the case where the latter, i.e. server-side and client position
In the environment of wide area network, can not directly it carry out data transmission.Specifically, system structure diagram of the invention is as shown in Figure 1, packet
Include server-side and server-side agency and client and Client Agent.
Embodiment 1
The present embodiment provides a kind of methods of registration service, as shown in Figure 2, comprising the following steps:
Step 101, server-side are acted on behalf of to server-side sends registration request.
Registration request described in step 102, the server-side proxy resolution, and record parsing obtains in first service list
Information on services, and the information on services is sent to Client Agent.Wherein, server-side agency is in first service list
Record information on services, it is meant that server-side is to server-side agency of trademark registration service.
Wherein, information on services may include the method that ID, token, the title of service and service include.Wherein, it services
The method for including is the achieved function of service, such as the cell-phone number of user is obtained by the mailbox of user.
Step 103, the Client Agent update second service list according to the information on services, for client visit
It asks.Wherein, the second service list is identical as the first service list.Client Agent has updated according to information on services
After two service lists, it is meant that server-side is to Client Agent registration service.
In optionally a kind of embodiment, above-mentioned information on services includes ID and token.Above-mentioned Client Agent is according to institute
The step of information on services updates second service list is stated to specifically include:
If comprising the ID in the information on services in second service list, the Client Agent is by the second service
The token of service corresponding with the ID is updated to the token in the information on services in list;
Otherwise, the Client Agent is directly by the record of service information in the second service list.
The present embodiment also provides a kind of system of registration service, including server-side, server-side agency and Client Agent.
The server-side, which is used to act on behalf of to the server-side, sends registration request;
The server-side agency is for parsing the registration request, and the clothes that record parsing obtains in first service list
Business information, and the information on services is sent to the Client Agent;
The Client Agent is used to update second service list according to the information on services, so that client accesses,
In, the second service list is identical as the first service list.
In the present embodiment, by enabling a client to access clothes in time in Client Agent dynamically registration service
Business information.
Embodiment 2
The present embodiment provides a kind of methods for calling service, as shown in Figure 3, comprising the following steps:
Step 201, client send call request to Client Agent.Wherein, client can pass through access client
Agency obtains the information of the service to be called.
Step 202, the Client Agent parse token from the call request, if the token meet it is default
The call request is then forwarded to server-side agency by agreement.Wherein, preset protocol be between Client Agent and client about
The agreement set, for guaranteeing the safety of data transmission.
Step 203, server-side agency parse ID from the call request, and according to the ID from first service
Corresponding service is inquired in list, and calls the service to server-side.
In order to intercept invalid and illegal call request, in optionally a kind of embodiment, in step 202 further include:
If the token does not meet preset protocol, the Client Agent returns to error message to the client.
In optionally a kind of embodiment, in order to avoid network timeout or server-side time-out cause no data to return
The case where, above-mentioned steps 203 are further comprising the steps of later:
If the server-side returns to data corresponding with the service not in preset duration, the Client Agent to
The client return cache data.
Wherein, preset duration can be configured according to the experience effect of user, such as can be set to 0.1~0.5s.
It is data cached to be configured as the case may be.For example, the service of client call is the service of customer center, tool
Body is to obtain cell-phone number by User ID.Here the data cached cell-phone number that can be obtained by User ID for last time, can also
Think the cell-phone number that first passage User ID obtains.
In the present embodiment, it can guarantee to rely on service in the case where sacrificing part real-time by services cache mechanism
It operates normally, avoids the problem of causing due to network fluctuation or high latency.
In optionally a kind of embodiment, the above method further include: the Client Agent and/or the server-side generation
The case where service is called in reason monitoring.
Wherein, call service the case where may include at least one of the following: call total degree, malloc failure malloc number,
Malloc failure malloc rate, most long in short-term, calling longest duration, the average duration of calling, the IP address of call processor device called.
The present embodiment also provide it is a kind of call service system, including client, Client Agent, server-side agency and
Server-side.
The client is used to send call request to the Client Agent;
The Client Agent is for parsing token from the call request, if the token meets default association
The call request is then forwarded to the server-side and acted on behalf of by view;
Server-side agency from the call request for parsing ID, and according to the ID from first service list
The middle corresponding service of inquiry, and the service is called to the server-side.
In the present embodiment, verifying by Client Agent to token has intercepted invalid and illegal call request, protects
The validity of service call is demonstrate,proved.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that these
It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back
Under the premise of from the principle and substance of the present invention, many changes and modifications may be made, but these are changed
Protection scope of the present invention is each fallen with modification.
Claims (9)
1. a kind of method of registration service, which comprises the following steps:
Server-side is acted on behalf of to server-side and sends registration request;
Registration request described in the server-side proxy resolution, and the information on services that record parsing obtains in first service list,
And the information on services is sent to Client Agent;
The Client Agent updates second service list according to the information on services, for client access, wherein described the
Two service lists are identical as the first service list.
2. the method as described in claim 1, which is characterized in that the information on services includes ID and token;
The Client Agent according to the information on services update second service list the step of include:
If comprising the ID in the information on services in second service list, the Client Agent is by the second service list
In the token of service corresponding with the ID be updated to the token in the information on services;
Otherwise, the Client Agent is directly by the record of service information in the second service list.
3. a kind of system of registration service, which is characterized in that including server-side, server-side agency and Client Agent;
The server-side, which is used to act on behalf of to the server-side, sends registration request;
The server-side agency is for parsing the registration request, and the service letter that record parsing obtains in first service list
Breath, and the information on services is sent to the Client Agent;
The Client Agent is used to update second service list according to the information on services, for client access, wherein institute
It is identical as the first service list to state second service list.
4. a kind of method for calling service, which comprises the following steps:
Client sends call request to Client Agent;
The Client Agent parses token from the call request, if the token meets preset protocol, by institute
It states call request and is forwarded to server-side agency;
The server-side agency parses ID from the call request, and inquires phase from first service list according to the ID
The service answered, and the service is called to server-side.
5. method as claimed in claim 4, which is characterized in that the method also includes:
If the token does not meet preset protocol, the Client Agent returns to error message to the client.
6. method as claimed in claim 4, which is characterized in that the server-side acts on behalf of the step for calling the service to server-side
After rapid further include:
If the server-side returns to data corresponding with the service not in preset duration, the Client Agent is to described
Client return cache data.
7. method as claimed in claim 4, which is characterized in that the method also includes: the Client Agents and/or described
Server-side agent monitors call the case where service.
8. the method for claim 7, which is characterized in that described the case where calling service includes at least one in following
Kind: call total degree, malloc failure malloc number, malloc failure malloc rate, most long in short-term, the longest duration called called, call it is flat
Equal duration, the IP address of call processor device.
9. a kind of system for calling service, which is characterized in that including client, Client Agent, server-side agency and service
End;
The client is used to send call request to the Client Agent;
The Client Agent is for parsing token from the call request, if the token meets preset protocol,
The call request is forwarded to the server-side agency;
The server-side agency looks into from first service list for parsing ID from the call request, and according to the ID
Corresponding service is ask, and calls the service to the server-side.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810761506.2A CN108989420B (en) | 2018-07-12 | 2018-07-12 | Method and system for registering service and method and system for calling service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810761506.2A CN108989420B (en) | 2018-07-12 | 2018-07-12 | Method and system for registering service and method and system for calling service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108989420A true CN108989420A (en) | 2018-12-11 |
CN108989420B CN108989420B (en) | 2021-08-13 |
Family
ID=64537806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810761506.2A Active CN108989420B (en) | 2018-07-12 | 2018-07-12 | Method and system for registering service and method and system for calling service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108989420B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111092911A (en) * | 2019-12-31 | 2020-05-01 | 成都科来软件有限公司 | Network agent realizing method for enhancing safety |
CN111147588A (en) * | 2019-12-27 | 2020-05-12 | 上海浦东发展银行股份有限公司 | Method and system for realizing cross-domain and cross-center communication in enterprise-level micro service platform |
CN112367383A (en) * | 2020-10-30 | 2021-02-12 | 深圳云之家网络有限公司 | Service calling method and related equipment |
CN114205401A (en) * | 2020-09-17 | 2022-03-18 | 英业达科技有限公司 | Data transmission system and method for decentralized network service |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080209522A1 (en) * | 2007-02-23 | 2008-08-28 | Cellco Partnership | Method, Apparatus, and Computer Program Product for Authenticating Subscriber Communications at a Network Server |
CN102035904A (en) * | 2010-12-10 | 2011-04-27 | 北京中科大洋科技发展股份有限公司 | Method for converting TCP network communication server into client |
CN102378170A (en) * | 2010-08-27 | 2012-03-14 | 中国移动通信有限公司 | Method, device and system of authentication and service calling |
CN104754009A (en) * | 2013-12-31 | 2015-07-01 | 中国移动通信集团广东有限公司 | Service acquisition and invocation method, device, client-side and server |
CN104869163A (en) * | 2015-05-26 | 2015-08-26 | 湖南傻蛋科技有限公司 | Dynamic service call method based on agent under cluster environment |
CN105635338A (en) * | 2015-12-31 | 2016-06-01 | 迈普通信技术股份有限公司 | Data transmission method and device |
-
2018
- 2018-07-12 CN CN201810761506.2A patent/CN108989420B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080209522A1 (en) * | 2007-02-23 | 2008-08-28 | Cellco Partnership | Method, Apparatus, and Computer Program Product for Authenticating Subscriber Communications at a Network Server |
CN102378170A (en) * | 2010-08-27 | 2012-03-14 | 中国移动通信有限公司 | Method, device and system of authentication and service calling |
CN102035904A (en) * | 2010-12-10 | 2011-04-27 | 北京中科大洋科技发展股份有限公司 | Method for converting TCP network communication server into client |
CN104754009A (en) * | 2013-12-31 | 2015-07-01 | 中国移动通信集团广东有限公司 | Service acquisition and invocation method, device, client-side and server |
CN104869163A (en) * | 2015-05-26 | 2015-08-26 | 湖南傻蛋科技有限公司 | Dynamic service call method based on agent under cluster environment |
CN105635338A (en) * | 2015-12-31 | 2016-06-01 | 迈普通信技术股份有限公司 | Data transmission method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111147588A (en) * | 2019-12-27 | 2020-05-12 | 上海浦东发展银行股份有限公司 | Method and system for realizing cross-domain and cross-center communication in enterprise-level micro service platform |
CN111092911A (en) * | 2019-12-31 | 2020-05-01 | 成都科来软件有限公司 | Network agent realizing method for enhancing safety |
CN114205401A (en) * | 2020-09-17 | 2022-03-18 | 英业达科技有限公司 | Data transmission system and method for decentralized network service |
CN112367383A (en) * | 2020-10-30 | 2021-02-12 | 深圳云之家网络有限公司 | Service calling method and related equipment |
Also Published As
Publication number | Publication date |
---|---|
CN108989420B (en) | 2021-08-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10374955B2 (en) | Managing network computing components utilizing request routing | |
US7894359B2 (en) | System and method for distributing information in a network environment | |
US8966121B2 (en) | Client-side management of domain name information | |
US6189033B1 (en) | Method and system for providing performance guarantees for a data service system of a data access network system | |
CN106657432B (en) | Domain name analytic method and device | |
US6304906B1 (en) | Method and systems for allowing data service system to provide class-based services to its users | |
US6154776A (en) | Quality of service allocation on a network | |
US6438597B1 (en) | Method and system for managing accesses to a data service system that supports persistent connections | |
US7426737B2 (en) | Method and apparatus for operating an open API network having a proxy | |
US6496866B2 (en) | System and method for providing dynamically alterable computer clusters for message routing | |
EP2263163B1 (en) | Content management | |
US8239506B2 (en) | System and method for affecting the behavior of a network device in a cable network | |
US8626934B2 (en) | System and method for controlling access to legacy push protocols based upon a policy | |
US6618757B1 (en) | System and method for dynamic IP address management | |
CN108989420A (en) | The method and system of registration service, the method and system for calling service | |
CN104333567B (en) | It is the web cachings serviced using safety | |
US6591304B1 (en) | Dynamic, scaleable attribute filtering in a multi-protocol compatible network access environment | |
WO2001080004A2 (en) | Http redirector | |
US7539216B2 (en) | Method and system of determining last hop device addresses | |
US20060173977A1 (en) | A process for dynamic user control on always-on ip network | |
CN113381906B (en) | Restrictive external network access test method based on government and enterprise system business | |
KR101682513B1 (en) | Dns proxy service for multi-core platforms | |
CN112187903B (en) | Message pushing method and device and message service system | |
CN111769997A (en) | Method, server, device and computer readable medium for network monitoring | |
CN112637332A (en) | Service registration discovery method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |