Method and system for registering service, method and system for invoking service

A registration service and server-side technology, applied in the computer field, can solve problems such as inability to directly transmit data, multiple data centers not in the same place, etc.

Active Publication Date: 2018-12-11
SHANGHAI CTRIP COMMERCE CO LTD
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The technical problem to be solved by the present invention is to overcome the defect in the prior art that multiple data centers are not in the same local area network, resulting in the inability to directly transmit data, provide a method and system for registering services, and also provide a method and system for invoking services system

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for registering service, method and system for invoking service
  • Method and system for registering service, method and system for invoking service
  • Method and system for registering service, method and system for invoking service

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] This embodiment provides a method for registering services, such as figure 2 shown, including the following steps:

[0042] Step 101, the server sends a registration request to the server agent.

[0043] Step 102, the server agent parses the registration request, records the service information obtained through analysis in the first service list, and sends the service information to the client agent. Wherein, the server agent records the service information in the first service list, which means that the server has registered the service with the server agent.

[0044] Wherein, the service information may include ID, token, name of the service and methods contained in the service. Wherein, the methods included in the service are the functions that the service can realize, such as obtaining the user's mobile phone number through the user's mailbox.

[0045] Step 103, the client agent updates the second service list according to the service information for the client ...

Embodiment 2

[0055] This embodiment provides a method for invoking services, such as image 3 shown, including the following steps:

[0056]Step 201, the client sends an invocation request to the client agent. Wherein, the client can obtain the information of the service to be invoked by accessing the client agent.

[0057] Step 202, the client agent parses out a token from the invocation request, and forwards the invocation request to the server agent if the token conforms to a preset protocol. Wherein, the preset protocol is a protocol agreed between the client agent and the client, and is used to ensure the security of data transmission.

[0058] Step 203, the server proxy parses out the ID from the call request, queries the corresponding service from the first service list according to the ID, and calls the service to the server.

[0059] In order to intercept invalid and illegal call requests, in an optional implementation manner, step 202 further includes: if the token does not co...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and a system for registering a service, and a method and a system for invoking the service. A method for registering a service comprises the following steps: a serversends a registration request to a server proxy; the server proxy parses the registration request, records the parsed service information in the first service list, and sends the service information tothe client proxy; the client proxy updates a second service list according to the service information for access by the client, wherein the second service list is the same as the first service list.Compared with the prior art, the invention can realize the data transmission between the server end and the client end even if the server end and the client end are not in the same LAN by setting theserver proxy and the client proxy.

Description

technical field [0001] The present invention relates to the field of computers, in particular to a method and system for registering a service, and also to a method and system for invoking a service. Background technique [0002] With the rise of microservice architecture (microservice architecture is a new technology for deploying applications and services in the cloud), the boundaries between services are becoming more and more clear, and each independent service performs its own duties, which not only speeds up the service The speed of development and deployment is also convenient for the management of various aspects such as service capacity and monitoring. At the same time, the call chain of a single business process is becoming more and more complex. Usually, the processing of a request needs to be processed by dozens or even hundreds of subsystems, and may also span multiple data centers. If these data centers are in the same local area network, data can be directly ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04L29/08H04L29/06
CPCH04L65/1073H04L69/22H04L67/566H04L67/60
Inventor 杨涛郑佰云吴亦乐
Owner SHANGHAI CTRIP COMMERCE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products