CN113542217A - Service subscription system - Google Patents

Service subscription system Download PDF

Info

Publication number
CN113542217A
CN113542217A CN202110632138.3A CN202110632138A CN113542217A CN 113542217 A CN113542217 A CN 113542217A CN 202110632138 A CN202110632138 A CN 202110632138A CN 113542217 A CN113542217 A CN 113542217A
Authority
CN
China
Prior art keywords
service
code
interface
subscription system
provider
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
Application number
CN202110632138.3A
Other languages
Chinese (zh)
Other versions
CN113542217B (en
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.)
China Guangfa Bank Co Ltd
Original Assignee
China Guangfa Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Guangfa Bank Co Ltd filed Critical China Guangfa Bank Co Ltd
Priority to CN202110632138.3A priority Critical patent/CN113542217B/en
Publication of CN113542217A publication Critical patent/CN113542217A/en
Application granted granted Critical
Publication of CN113542217B publication Critical patent/CN113542217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention provides a service subscription system, which is applied to the technical field of computers, and comprises a service consumption end, a registration center and a service providing end, wherein the service consumption end is respectively connected with the registration center and the service providing end, the registration center is connected with the service providing end, and the method comprises the following steps: the service consumer side is used for obtaining the service code from the registration center and subscribing the service from the service provider side through the target service interface dynamically generated by the service code.

Description

Service subscription system
Technical Field
The invention relates to the technical field of computers, in particular to a service subscription system.
Background
For a traditional RPC framework, the design idea is to carry out RPC calling through a shared interface class, and the method is more suitable for system modularization splitting of single application; the defect is that hundreds of old systems exist in the market, and on average, more than ten associated systems exist in each system, and some systems exist in the market; and the method is suitable for the interface sharing, dozens of dependent packages are introduced, most of the interfaces are irrelevant interfaces, and more serious is the dependent package upgrading brought by version upgrading, so that mistakes and omissions are easy to occur to cause production problems. The existing method has large dependence on a shared interface and is not beneficial to service subscription.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling a shielding device, which are used for solving the problems that the prior art has larger dependence on a shared interface and is not beneficial to service subscription, and comprise the following steps:
a service subscription system comprises a service consumption end, a registration center and a service providing end, wherein the service consumption end is respectively connected with the registration center and the service providing end, the registration center is connected with the service providing end, and the method comprises the following steps:
the service provider is used for binding a service interface by using a service code and sending the service code to a registration center;
and the service consumption end is used for acquiring the service code from the registration center and subscribing the service from the service provider through a target service interface dynamically generated by the service code.
Optionally, the service provider is configured to bind the service interface with the service code corresponding to the native XML configuration file.
Optionally, the service provider is configured to bind the service interface through a standard service code.
Optionally, the service provider is configured to perform service code serialization using JSON.
Optionally, the service consuming side is configured to buffer the service code in a link of the SDK.
Optionally, the service consuming side invokes the service code from the link of the SDK.
Optionally, the registry is configured to store the service code, maintain communication with the service provider, and perform service cleaning after a preset time of a broken link with the service provider.
The invention has the following advantages:
in the invention, dynamic interface generation is carried out through the service code. The interface is generated dynamically by the service code, so that the interface is completely transparent to a user of a service consumption end, and common service development does not need to concern about the existence of the interface, but only concerns about the service code related to the service. After the service development is shielded in the technical level, the interfaces are dynamically generated, so that a series of problems of code sharing, version upgrading and the like caused by strong dependence of service interfaces are solved, and the coupling degree of the system and the communication cost between the developments are greatly reduced. Brings great convenience for development, and provides technical support for rapid service upgrading of the system.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of a service subscription system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a service subscription system according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The rpc (remote Procedure Call protocol) protocol is a currently popular service-oriented communication protocol, such as the well-known Dubbo framework.
Generally, the RPC framework publishes a service to a service registry through an interface, and a consumer (service caller) creates a dynamic proxy through a provider-shared interface, so as to subscribe and consume the service.
At present, a large number of single applications exist, and network communication is carried out between the applications through original fixed address configuration; link combing among systems has faced a serious challenge, and rapid service combing, service deposition, problem troubleshooting, service innovation and the like cannot be performed, but technical reconstruction of these applications is unrealistic, and according to the current technical development, servization is a trend that system development in the future is irreversible.
More, the inter-system calling relationship is complicated, if the traditional service technology implementation mode is used among the systems, each system necessarily introduces a large number of dependency packages, and the timeliness of the upgrade of the dependency packages cannot be guaranteed after the system service is upgraded at the later stage.
The invention mainly solves the technical problems that the traditional RPC service framework is provided with the support of an HTTP protocol and the strong dependence of packets between decoupling systems, and the invention is mainly applied to the service communication between two systems to achieve the purpose of quickly performing service reconstruction and service upgrade on new and old systems.
For a traditional RPC framework, the design idea is to carry out RPC calling through a shared interface class, and the method is more suitable for system modularization splitting of single application; the defect is that hundreds of old systems exist in the market, and on average, more than ten associated systems exist in each system, and some systems exist in the market; and the method is suitable for the interface sharing, dozens of dependent packages are introduced, most of the interfaces are irrelevant interfaces, and more serious is the dependent package upgrading brought by version upgrading, so that mistakes and omissions are easy to occur to cause production problems.
The method aims to solve the problems of version dependence and network interaction among applications caused by large-scale system servitization, and enable the applications to be capable of rapidly upgrading and transforming the servitization.
Inter-system code must be decoupled, otherwise in addition to impacting development efficiency, version upgrade issues can very easily trigger production issues. Therefore, the problems of version and excessive dependence caused by interface sharing in the traditional RPC framework need to be solved.
In order to solve the above problem, referring to fig. 1, a schematic diagram of a service subscription system according to an embodiment of the present invention is shown, where the service subscription system includes three parts, namely a service consumer, a registry, and a service provider, the service consumer is connected to the registry and the service provider, and the registry is connected to the service provider.
The service provider: publishing the service of the application to the registry
The registration center: and storing the service issued by the service provider, keeping communication with the provider, and clearing the service after a certain time of chain scission with the provider.
The service consumption end: the required service is pulled from the registry by using the service code, and then telecommunication is carried out by the pulled key information (such as provider IP, port, interface name).
Referring to fig. 2, a schematic diagram illustrating a service subscription system according to an embodiment of the present invention is shown, in which a service provider is configured to bind a service interface with a service code and send the service code to a registry;
the service consumer side is used for acquiring the service code from the registration center and subscribing the service from the service provider side through the target service interface dynamically generated by the service code.
In an embodiment of the present application, the service provider is configured to bind the service interface using a service code corresponding to a native XML configuration file.
Because there is no interface with strong dependence, the service must have identification code, and the service code is introduced to replace the shared code interface. The service code is written according to a certain rule and is endowed with certain scene meaning and business meaning, such as: prod. A whole set of more standard codes can be formed in the form of service codes, and besides humanization, all rows of service assets can be formed in the global scope; a relatively complete system is formed for continuous treatment, monitoring and optimized upgrading of the service.
In an embodiment of the present application, the service provider is configured to bind a service interface through a standard service code.
In an embodiment of the present application, the service provider is configured to perform serialization of service codes using JSON.
JSON is used for object serialization, so that the problem that a data transmission entity shares code classes during serialization and deserialization can be solved by a service consumption end and a service providing end. Thereby changing from an original strong dependence to a weak dependence. The method has the advantages that when the message field of the service provider is changed, as long as the provider is compatible with the new version and the old version, the influence range is greatly reduced.
In an embodiment of the present application, the service consuming side is configured to cache the service code in a link of the SDK.
In an embodiment of the present application, the service consuming side invokes the service code from the link of the SDK.
In an embodiment of the present application, the registry is configured to store the service code, maintain communication with the service provider, and perform service cleaning after a predetermined time of a broken link with the service provider.
In the invention, dynamic interface generation is carried out through the service code. The interface is generated dynamically by the service code, so that the interface is completely transparent to a user of a service consumption end, and common service development does not need to concern about the existence of the interface, but only concerns about the service code related to the service. After the service development is shielded in the technical level, the interfaces are dynamically generated, so that a series of problems of code sharing, version upgrading and the like caused by strong dependence of service interfaces are solved, and the coupling degree of the system and the communication cost between the developments are greatly reduced. Brings great convenience for development, and provides technical support for rapid service upgrading of the system. Service standardization: by defining the service code with unified standard and service meaning, the advantages brought by standardization are better service management, service statistics and service precipitation, and convenience is provided for service combination. System loose coupling: by dynamically generating the service interface by the service code and using the technology of dynamically generating the byte code, the strong code dependence between systems is shielded. Fast service of the old system: the method supports two service release modes, the packaging release of the original service is completed by binding the old service interface and the service code, and the reuse of the service interface is performed under any logic without modifying the original code.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The service subscription system provided by the present invention is introduced in detail, and a specific example is applied in the present document to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (7)

1. A service subscription system is characterized in that the service subscription system comprises a service consumption end, a registration center and a service providing end, the service consumption end is respectively connected with the registration center and the service providing end, the registration center is connected with the service providing end, and the method comprises the following steps:
the service provider is used for binding a service interface by using a service code and sending the service code to a registration center;
and the service consumption end is used for acquiring the service code from the registration center and subscribing the service from the service provider through a target service interface dynamically generated by the service code.
2. The service subscription system of claim 1, wherein the service provider is configured to bind the service interface using a service code corresponding to a native XML configuration file.
3. The service subscription system of claim 1, wherein the service provider is configured to bind the service interface via a standard service code.
4. The service subscription system of claim 1, wherein the service provider is configured to use JSON for serialization of service codes.
5. The service subscription system of claim 1, wherein the service consumer is configured to cache the service code in a link of the SDK.
6. The service subscription system of claim 5, wherein the service consumer invokes the service code from a link of the SDK.
7. The system according to claim 1, wherein the registry is configured to store the service code, maintain communication with the service provider, and perform service cleaning after a predetermined time of a chain break with the service provider.
CN202110632138.3A 2021-06-07 2021-06-07 Service subscription system Active CN113542217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110632138.3A CN113542217B (en) 2021-06-07 2021-06-07 Service subscription system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110632138.3A CN113542217B (en) 2021-06-07 2021-06-07 Service subscription system

Publications (2)

Publication Number Publication Date
CN113542217A true CN113542217A (en) 2021-10-22
CN113542217B CN113542217B (en) 2023-05-26

Family

ID=78124605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110632138.3A Active CN113542217B (en) 2021-06-07 2021-06-07 Service subscription system

Country Status (1)

Country Link
CN (1) CN113542217B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002185A (en) * 2022-05-09 2022-09-02 北京城市网邻信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826987A (en) * 2010-04-27 2010-09-08 北京邮电大学 System and method for supporting mixed service based on integrated open network
CN102571550A (en) * 2010-12-30 2012-07-11 北京亿阳信通软件研究院有限公司 General information interaction platform and method
CN104243611A (en) * 2014-09-30 2014-12-24 浪潮软件股份有限公司 Distribution thought based message service middleware system
CN107612955A (en) * 2016-07-12 2018-01-19 深圳市远行科技股份有限公司 Micro services provide method, apparatus and system
CN110191164A (en) * 2019-05-20 2019-08-30 中国工商银行股份有限公司 Distributed Services access system and method
CN110708362A (en) * 2019-09-19 2020-01-17 贝壳技术有限公司 Call relation determining method and device, storage medium and electronic equipment
CN112350978A (en) * 2019-08-08 2021-02-09 中移(苏州)软件技术有限公司 Service processing method, system, device and storage medium
CN112468574A (en) * 2020-11-25 2021-03-09 中国工商银行股份有限公司 Processing method, device and system for application service publishing and subscribing mechanism

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101826987A (en) * 2010-04-27 2010-09-08 北京邮电大学 System and method for supporting mixed service based on integrated open network
CN102571550A (en) * 2010-12-30 2012-07-11 北京亿阳信通软件研究院有限公司 General information interaction platform and method
CN104243611A (en) * 2014-09-30 2014-12-24 浪潮软件股份有限公司 Distribution thought based message service middleware system
CN107612955A (en) * 2016-07-12 2018-01-19 深圳市远行科技股份有限公司 Micro services provide method, apparatus and system
CN110191164A (en) * 2019-05-20 2019-08-30 中国工商银行股份有限公司 Distributed Services access system and method
CN112350978A (en) * 2019-08-08 2021-02-09 中移(苏州)软件技术有限公司 Service processing method, system, device and storage medium
CN110708362A (en) * 2019-09-19 2020-01-17 贝壳技术有限公司 Call relation determining method and device, storage medium and electronic equipment
CN112468574A (en) * 2020-11-25 2021-03-09 中国工商银行股份有限公司 Processing method, device and system for application service publishing and subscribing mechanism

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002185A (en) * 2022-05-09 2022-09-02 北京城市网邻信息技术有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113542217B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
Burns Designing distributed systems: patterns and paradigms for scalable, reliable services
CN111158818B (en) Page rendering method and device
US8806506B2 (en) System and method for processing messages using a common interface platform supporting multiple pluggable data formats in a service-oriented pipeline architecture
EP2106647B1 (en) Web services and telecom network management unification
CN112527528A (en) Data transmission method, device and storage medium based on message queue
CN110474794B (en) Information conversion method and system of SDN framework
US9264518B2 (en) Request and response decoupling via pluggable transports in a service oriented pipeline architecture for a request response message exchange
CN105022832B (en) Method, mobile terminal and the download server that APP application securities are downloaded
US20200052982A1 (en) In situ triggered function as a service within a service mesh
CN106713469B (en) Dynamic loading method, device and system for distributed container
US20100082830A1 (en) System and method for processing messages using pluggable protocol processors in a service-oriented pipeline architecture
CN113312032B (en) Front-end project resource updating method and device, electronic equipment and storage medium
CN113472687B (en) Data processing method and device
CN113542217A (en) Service subscription system
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
US9614900B1 (en) Multi-process architecture for a split browser
CN113037834A (en) Web page state updating method and device based on distributed instant push
CN112817539A (en) Industrial data storage method and system, electronic device and storage medium
CN110022323A (en) A kind of method and system of the cross-terminal real-time, interactive based on WebSocket and Redux
CN101640667B (en) Process execution method, process execution system and configuration equipment and configuration method of process execution system
CN113722115A (en) Method, device, equipment and computer readable medium for calling interface
CN113590243A (en) Energy enterprise project creation method and device, computer equipment and medium
CN112333262A (en) Data updating prompting method and device, computer equipment and readable storage medium
US9977700B2 (en) System and method for providing an application programming interface for deploying a service bus artifact from a local development environment to a cloud environment
CN114900383B (en) Interface processing method, device, electronic equipment and computer readable storage medium

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