CN116546094A - Communication service method and device - Google Patents

Communication service method and device Download PDF

Info

Publication number
CN116546094A
CN116546094A CN202310521684.9A CN202310521684A CN116546094A CN 116546094 A CN116546094 A CN 116546094A CN 202310521684 A CN202310521684 A CN 202310521684A CN 116546094 A CN116546094 A CN 116546094A
Authority
CN
China
Prior art keywords
netty
interface
request
server
client
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.)
Withdrawn
Application number
CN202310521684.9A
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.)
Vocational And Technical College Of Anshun
Original Assignee
Vocational And Technical College Of Anshun
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 Vocational And Technical College Of Anshun filed Critical Vocational And Technical College Of Anshun
Priority to CN202310521684.9A priority Critical patent/CN116546094A/en
Publication of CN116546094A publication Critical patent/CN116546094A/en
Withdrawn 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/565Conversion or adaptation of application format or content
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures
    • 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/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The embodiment of the application provides a communication service method and a device, which relate to the technical field of communication and are applied to a Netty client provided with a first component, wherein the first component is used for acquiring a TCP connection channel and dynamically acting on a remote request interface method of the Netty client, and the method comprises the following steps: receiving a target service call request from an http interface; invoking a first component to acquire a TCP connection channel, dynamically proxy a remote request interface of the Netty client, and sending a target service request message to the Netty server according to a target service invocation request, wherein the target service request message is in a protobuf format; and calling the first component to receive a response message of the target service request message sent by the Netty server, wherein the response message is in a protobuf format. The method and the device solve the problem of low efficiency when different formats are adopted for message communication among software systems in the prior art.

Description

Communication service method and device
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a communication service method and device.
Background
The network communication method between the existing software systems comprises an application layer interface communication technology based on an Http protocol (Hyper Text Transfer Protocol ), a transmission layer interface communication technology based on a TCP/IP protocol (Transmission Control Protocol/Internet Protocol ) and the like, and the development of the application layer interface communication technology based on the Http protocol is simple and easy to apply, but the network connection is stateless, reconnection is required for each request, and the transmission efficiency of a message network is low. The transport layer interface communication technology based on the TCP/IP protocol is generally used as the first choice technology for efficient network communication by many software items due to the characteristics of stateful connection, reliable transmission of TCP, full duplex communication of TCP, long connection of TCP and the like. Regarding the transport layer interface communication technology based on the TCP/IP protocol, the existing technical solution is based on Netty (Netty is a java open source framework provided by JBOSS, which is now an independent project on the gilthub, and Netty provides an asynchronous, event-driven network application framework and tools, so as to rapidly develop a high-performance and high-reliability network server and client program) encapsulated socket implementation communication, socket implementation (socket implementation, that is, abstraction of endpoints performing bidirectional communication between application processes on different hosts in a network) based on various programming languages, and the like.
When different formats are adopted between software systems in the prior art to carry out message communication (such as JSON or XML formats), the problem of low message communication efficiency is generally existed. Therefore, how to implement efficient message communication between software systems using different formats is a technical problem to be solved.
Disclosure of Invention
The embodiment of the application provides a communication service method and a device, which are used for solving the problem of low efficiency when different formats are adopted for message communication between software systems in the prior art. In order to solve the technical problems, the invention is realized as follows:
in a first aspect, an embodiment of the present application provides a communication service method, which is applied to a Netty client provided with a first component, where the first component is configured to obtain a TCP connection channel and dynamically proxy a remote request interface of the Netty client, and the method includes:
receiving a target service call request from an http interface;
invoking the first component to acquire a TCP connection channel, dynamically proxy a remote request interface of the Netty client, and sending a target service request message to a Netty server according to the target service invocation request, wherein the target service request message is in a protobuf format;
And calling the first component to receive a response message of the target service request message sent by the Netty server, wherein the response message is in a protobuf format.
Optionally, before receiving the target service call request from the http interface, the method further includes:
starting Netty client service;
realizing a remote request interface of the Netty client based on SpringBoot;
accordingly, the receiving the target service call request from the http interface includes:
a target service call request from an http interface is received for the remote request interface.
Optionally, before receiving the target service call request from the http interface, the method further includes:
and calling the first component to establish a TCP connection channel with the Netty server, and storing the TCP connection channel into a TCP connection pool.
Optionally, the calling the first component to obtain a TCP connection channel and dynamically proxy a remote request interface of the Netty client, and sending a target service request message to a Netty server according to the target service call request includes:
invoking a first component, scanning an interface class under the remote request interface package, analyzing an interface method containing target annotation and proxy the interface class, wherein the target annotation contains request parameters of the target service invocation request;
And acquiring a TCP connection channel between the Netty client and the Netty server, sending request data containing the target annotation to the Netty server, and waiting for response.
Optionally, the calling the first component, scanning the interface class under the remote request interface package, analyzing the interface method including the target annotation, and acting on the interface class includes:
the remote method of the self-defined Netty client scans the class and configures the interface package name of the target service call request;
the remote method scanning class scans the interface class under the interface package of the target service call request and analyzes the interface method with the target annotation in the interface class under the interface package;
and adopting JDK dynamic proxy technology to proxy the interface class under the interface package.
Optionally, when the first component is further configured to define a heartbeat detection processing class and a message processing class of the Netty client, the method further includes:
when the TCP connection channel of the Netty client is idle, a heartbeat packet is sent to the Netty server, and the TCP connection is maintained to realize TCP long connection.
In a second aspect, an embodiment of the present application further provides a communication service method, which is applied to a Netty server provided with a second component, where the second component is configured to obtain an object and a method of a service processing class of the Netty server and execute a method call of the Netty server, and the method includes:
Receiving a target service request message which is sent by a Netty client and contains target notes, wherein the request message is in a protobuf format;
checking target annotation of the request message, if the target annotation passes the check, acquiring a corresponding Netty server-side business processing class object and a corresponding Netty server-side business processing class method according to the request parameter of the target annotation, calling the corresponding Netty server-side business processing class object method, and executing the Netty server-side target service method call to obtain an operation result;
and converting the operation result into a protobuf format and sending the protobuf format as a response message to the Netty client.
Optionally, before receiving the target service request message including the target annotation sent by the Netty client, the method further includes:
starting a Netty server;
scanning interface processing classes under a service processing packet of the Netty server, and registering class objects containing first notes into preset classes;
accordingly, the verifying the target annotation of the request message includes:
and calling the preset class to acquire an object method of the business processing class of the Netty server, judging whether the method has a target annotation, if so, checking whether the parameter value of the target annotation of the Netty client request method is consistent with the interface calling parameter value agreed by the Netty server, and if so, checking to pass.
Optionally, when the second component is further configured to define a heartbeat detection processing class of the Netty server and a message processing class of the server, the method further includes:
and when receiving the heartbeat packet sent by the Netty client, sending back the heartbeat packet to the Netty client, and maintaining the TCP connection to realize the TCP long connection.
In a third aspect, an embodiment of the present application further provides a communication service device, which is applied to a Netty client provided with a first component, where the first component is configured to obtain a TCP connection channel and dynamically proxy a remote request interface of the Netty client, and includes:
the first receiving module is used for receiving a target service call request from the http interface;
the first execution module is used for calling the first component so as to acquire a TCP connection channel, dynamically proxy a remote request interface of the Netty client, and sending a target service request message to a Netty server according to the target service call request, wherein the target service request message format is a protobuf format;
the first execution module is further configured to invoke the first component to receive a response message of the target service request message sent by the Netty server, where the response message is in a protobuf format.
In a fourth aspect, an embodiment of the present application further provides a communication service device, which is applied to a Netty server provided with a second component, where the second component is configured to obtain an object and a method of a service processing class of the Netty server and execute a method call of the Netty server, and the method call includes:
the second receiving module is used for receiving a target service request message which is sent by the Netty client and contains target annotation, wherein the request message is in a protobuf format;
the second execution module is used for checking the target annotation of the request message, if the target annotation passes the check, acquiring a corresponding Netty server-side business processing class object and a corresponding method according to the request parameter of the target annotation, calling the corresponding Netty server-side business processing class object method, and executing the Netty server-side target service method call to obtain an operation result;
the second sending module is used for converting the operation result into a protobuf format and sending the protobuf format serving as a response message to the Netty client.
In the embodiment of the application, when the communication service method is applied to the Netty client for communication service, the Netty client is provided with a first component for acquiring a TCP connection channel and dynamically acting on a remote request interface of the Netty client, the first component is called by receiving a target service call request from an http interface so as to acquire the TCP connection channel and dynamically acting on the remote request interface of the Netty client, a target service request message is sent to the Netty server according to the target service call request, and the first component is called to receive a response message of the target service request message sent by the Netty server, wherein the target service request message and the response message are in a protobuf format. The communication service method applied to the Netty client provided with the first component realizes high-efficiency communication service by using a protobuf protocol based on Netty; the method comprises the steps of customizing a proto file of message transmission by utilizing a protobuf protocol technology, and generating a corresponding request and response Java file with a protobuf format, wherein the Java file is used for message communication between a Netty client and a Netty server; protobuf is a structured data description and high-performance serialization protocol supporting cross-platform and multi-language, and the protocol is completely based on binary, so that the performance of message transmission of the communication service realized by the method is far higher than that of the message transmission in a JSON or XML format.
In addition, the invention also provides a communication service device applied to the Netty client, and the communication service device has the same beneficial effects.
In the embodiment of the application, when the communication service method is applied to the Netty server for communication service, the Netty server is provided with a second component for acquiring the object and the method of the business processing class of the Netty server and executing the method call of the Netty server, and the request message is in a protobuf format by receiving the target service request message which is sent by the Netty client and contains the target annotation; checking target annotation of the request message, if the target annotation passes, acquiring a corresponding Netty server-side business processing class object and a corresponding method according to the request parameter of the target annotation, calling the corresponding Netty server-side business processing class object method, and executing the Netty server-side target service method call to obtain an operation result; and converting the operation result into a protobuf format and sending the protobuf format as a response message to the Netty client. The communication service method applied to the Netty server provided with the second component realizes high-efficiency communication service by using a protobuf protocol based on Netty; the method comprises the steps of customizing a proto file of message transmission by utilizing a protobuf protocol technology, and generating a corresponding request and response Java file with a protobuf format, wherein the Java file is used for message communication between a Netty client and a Netty server; protobuf is a structured data description and high-performance serialization protocol supporting cross-platform and multi-language, and the protocol is completely based on binary, so that the performance of message transmission of the communication service realized by the method is far higher than that of the message transmission in a JSON or XML format.
In addition, the invention also provides a communication service device, electronic equipment and a computer readable storage medium, which are applied to the Netty server and have the same beneficial effects.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 is a schematic flow chart of a communication service method according to an embodiment of the present application.
Fig. 2 is a second flowchart of a communication service method according to an embodiment of the present application.
Fig. 3 is a third flow chart of a communication service method according to an embodiment of the present application.
Fig. 4 is a flowchart of a communication service method according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a communication service device according to an embodiment of the present application.
Fig. 6 is a second schematic structural diagram of a communication service device according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The network communication method between the existing software systems comprises an application layer interface communication technology based on the Http protocol, a transmission layer interface communication technology based on the TCP/IP protocol and the like, and the application layer interface communication technology based on the Http protocol is simple to develop and easy to apply, but has the defects of no state of network connection, need of reconnection for each request, low transmission efficiency of a message network and the like. The transmission layer interface communication technology based on the TCP/IP protocol is usually used as the first choice technology of high-efficiency network communication by a plurality of software items due to the characteristics of stateful connection, TCP reliable transmission, TCP full duplex communication, TCP long connection and the like, and the technical scheme is to use JSON, XML and other formats for message communication, and the efficiency is far lower than that of protobuf protocol communication.
The invention provides a method and a device for realizing efficient communication service by using a protobuf protocol based on Netty, which aim to solve the problem of low message communication efficiency between software systems by adopting JSON or XML formats and the like.
Referring to fig. 1, fig. 1 is a schematic flow chart of a communication service method according to an embodiment of the present application. The embodiment of the application provides a communication service method which is applied to a Netty client provided with a first component, wherein the first component is used for acquiring a TCP (transmission control protocol) connection channel and dynamically proxy the far end of the Netty client
Step S11: a target service invocation request from an http interface is received.
In the embodiment of the application, the target service call request is a call request for the target service sent by a client of the Http protocol.
Further, in order to facilitate receiving the client request of the Http protocol, before receiving the target service call request from the Http interface, the method further includes:
starting Netty client service;
realizing a remote request interface of the Netty client based on SpringBoot;
accordingly, the receiving the target service call request from the http interface includes:
a target service call request from an http interface is received for the remote request interface.
In the embodiment of the application, the Netty client is configured with the Netty server IP address and the Netty server port, integrates the SpringBoot environment, realizes connection and management of Redis cache service, and the custom service processing class realizes the RESTful interface based on the SpringBoot, thereby being convenient for receiving the client request of the Http protocol.
Further, in order to facilitate communication with the Netty server, before receiving the target service call request from the http interface, the method further includes:
and calling the first component to establish a TCP connection channel with the Netty server, and storing the TCP connection channel into a TCP connection pool.
In the embodiment of the application, a TCP connection channel between the Netty client and the Netty server is stored in a connection pool connectipools.
It can be understood that some configurations need to be made on the Netty client in the embodiments of the present application, for example, a group thread group of the Netty client is configured, the number of threads is (numOfCores/(1-coeffcient)) +1, where numOfCores is the CPU core number of the current computer, a channel is set to be non-blocking, and a Nagle algorithm is closed (for automatically connecting many small buffer messages; this process (referred to as nagling) increases the efficiency of the network software system by reducing the number of packets that must be sent) to ensure that the messages are sent in time when they are generated. And starting a TCP bottom heartbeat keep-alive mechanism, setting an address port of a Netty server to be shared, setting a message transmission protocol of the Netty client to be a protobuf protocol, and adding a plurality of codecs and classes based on the protocol (such as a heartbeat detection processing class ClientIdleHandler of the protobufVarint32FrameDecoder, protobufDecoder, protobufVarint32LengthFieldPrepender, protobufEncoder, netty client and a message processing class ClientHandler of the client (inheriting the ChannelInboundHandler class)) to process messages. The protobuf protocol technology is utilized to customize a proto file of message transmission, and a corresponding request and response Java file with a protobuf format is generated, so that efficient message communication between the Netty client and the Netty server is realized.
Step S12: and calling the first component to acquire a TCP connection channel, dynamically proxy a remote request interface of the Netty client, and sending a target service request message to the Netty server according to the target service call request, wherein the target service request message is in a protobuf format.
In the embodiment of the present application, the first customized component may obtain a TCP connection channel and dynamically proxy the remote request interface of the Netty client.
In a specific embodiment, the invoking the first component to obtain a TCP connection channel and dynamically proxy the remote request interface of the Netty client, and sending the target service request message to the Netty server according to the target service invocation request includes:
invoking a first component, scanning an interface class under the remote request interface package, analyzing an interface method containing target annotation and proxy the interface class, wherein the target annotation contains request parameters of the target service invocation request;
and acquiring a TCP connection channel between the Netty client and the Netty server, sending request data containing the target annotation to the Netty server, and waiting for response.
Specifically, the Netty client defines an interface class of remote request, the method in the interface is @ RemoteService annotation class (parameters include service name, version number and service type), the method is used for carrying authentication parameters when sending data request processing to the method in the business processing class of the Netty server, the RemoteClient class is defined, the Map < String of the RemoteClient class, the TCP channel connection pool of the IConnectPool > connctPools stores the TCP channel connection of the Netty client and the Netty server, and when the Netty client sends data to the Netty server, the asyncClient () request method of the RemoteClient class is called to acquire the current TCP channel connection and send the request to the Netty server and wait for a response.
In the embodiment of the application, the interface class under the Netty client remote request interface package is scanned by calling the first component, an interface method containing target annotation is analyzed, the interface class is proxied, and the target annotation contains the request parameters of the target service call request; and acquiring a TCP connection channel between the Netty client and the Netty server, sending request data containing target notes to the Netty server, and waiting for response. The Netty client integrates a SpringBoot environment, realizes connection and call of Redis cache service, and the custom service processing class realizes a RESTful interface based on the SpringBoot, so that the client request of the Http protocol is conveniently received, and efficient message communication between the Netty client and the Netty server is realized.
In another specific embodiment, the invoking the first component, scanning the interface class under the remote request interface package, parsing the interface method including the target annotation, and acting on the interface class includes:
the remote method of the self-defined Netty client scans the class and configures the interface package name of the target service call request;
the remote method scanning class scans the interface class under the interface package of the target service call request and analyzes the interface method with the target annotation in the interface class under the interface package;
And adopting JDK dynamic proxy technology to proxy the interface class under the interface package.
Specifically, when the Netty client starts, a TCP connection channel connected with the Netty server is established and stored in a connection pool connected with the TCP, a remote method of the user-defined Netty client scans a class remoteconnerConfig and configures an interface packet name of the user-defined remote request of the Netty client, the remoteconnerConfig scans an interface packet lower interface class of the remote request of the Netty client, analyzes a method with annotation@remoteservice (parameters have service names, version numbers and service types) in the interface class, adopts a JDK dynamic proxy technology to proxy the interface packet lower interface class of the remote request of the Netty client, acquires the TCP connection channel of the Netty client and the Netty server, and sends request data to the Netty server and waits for response. The first component creates a TCP request follower of the TCP channel for obtaining a response of the Netty server and forwarding the response to the Netty client.
In the embodiment of the application, the remote method of the custom Netty client scans the interface package under the interface package of the target service call request by the remote method scanning the interface package name of the target service call request and analyzing the interface method with the target annotation in the interface package under the interface package, and the interface package under the interface package is proxied by adopting the JDK dynamic proxy technology, so that the custom service processing class realizes a RESTful interface based on SpringBoot, is convenient for receiving the client request of the Http protocol, and realizes efficient message communication between the Netty client and the Netty server.
Step S13: and calling the first component to receive a response message of the target service request message sent by the Netty server, wherein the response message is in a protobuf format.
In the embodiment of the application, the protobuf protocol technology is utilized to customize the proto file of the message transmission, and the corresponding request and response Java file with the protobuf format is generated, so that high-performance message communication between the Netty client and the Netty server is realized.
Further, when the first component is further configured to define a heartbeat detection processing class and a message processing class of the Netty client, the method further includes:
when the TCP connection channel of the Netty client is idle, a heartbeat packet is sent to the Netty server, and the TCP connection is maintained to realize TCP long connection.
In the embodiment of the application, the first component defines a Netty client heartbeat detection processing class ClientIdleHandler (inheriting IdleStateHandler class) and a client message processing class ClientHandler (inheriting ChannelInboundHandleradCapter class), and by opening a TCP bottom heartbeat keep-alive mechanism, an address port of a Netty server can be shared, and simultaneously, a Netty client message transmission protocol is set as a protobuf protocol, and the Netty client heartbeat detection processing class ClientIdleHandler and the client message processing class ClientHandler are added to process messages, and a proto file of message transmission is customized by using a protobuf protocol technology, and a corresponding Java file with a protobuf format is generated, so that when a TCP connection channel of the Netty client is empty, a heartbeat packet is sent to the Netty server, the connection is maintained, and TCP long connection is realized, and the TCP connection is prevented from creating a reconnection resource.
In the embodiment of the application, when the communication service method is applied to the Netty client for communication service, the Netty client is provided with a first component for acquiring a TCP connection channel and dynamically acting on a remote request interface of the Netty client, the first component is called by receiving a target service call request from an http interface so as to acquire the TCP connection channel and dynamically acting on the remote request interface of the Netty client, a target service request message is sent to the Netty server according to the target service call request, and the first component is called to receive a response message of the target service request message sent by the Netty server, wherein the target service request message and the response message are in a protobuf format. The communication service method applied to the Netty client provided with the first component realizes high-efficiency communication service by using a protobuf protocol based on Netty; the method comprises the steps of customizing a proto file of message transmission by utilizing a protobuf protocol technology, and generating a corresponding request and response Java file with a protobuf format, wherein the Java file is used for message communication between a Netty client and a Netty server; protobuf is a structured data description and high-performance serialization protocol supporting cross-platform and multi-language, and the protocol is completely based on binary, so that the performance of message transmission of the communication service realized by the method is far higher than that of the message transmission in a JSON or XML format.
Referring to fig. 2, fig. 2 is a second flowchart of a communication service method according to an embodiment of the present application. The embodiment of the application also provides a communication service method, which is applied to the Netty server provided with a second component, wherein the second component is used for acquiring the object and the method of the service processing class of the Netty server and executing the method call of the Netty server, and the method comprises the following steps:
step S21: and receiving a target service request message which is sent by the Netty client and contains target notes, wherein the request message is in a protobuf format.
In the embodiment of the application, the target service request message containing the target annotation is a target service request message carrying target parameters such as a service name and a method.
Step S22: and checking the target annotation of the request message, if the target annotation passes the check, acquiring a corresponding business processing class object and a corresponding method of the Netty server according to the request parameter of the target annotation, calling the corresponding method of the business processing class object of the Netty server, and executing the method call of the target service of the Netty server to obtain an operation result.
Further, to facilitate message transmission, before receiving the target service request message including the target annotation sent by the Netty client, the method further includes:
Starting a Netty server;
scanning interface processing classes under a service processing packet of the Netty server, and registering class objects containing first notes into preset classes;
accordingly, the verifying the target annotation of the request message includes:
and calling the preset class to acquire an object method of the business processing class of the Netty server, judging whether the method has a target annotation, if so, checking whether the parameter value of the target annotation of the Netty client request method is consistent with the interface calling parameter value agreed by the Netty server, and if so, checking to pass.
It can be understood that some configurations need to be performed on the Netty server, for example, defining the Netty server, configuring a listening port and a thread generation coefficient of the Netty server, configuring a bond group and a workerGroup thread group of the Netty server, where the number of threads of the bond group is the number of CPU cores of the current computer, the number of threads of the workerGroup is (numOfCores/(1-coefficient)) +1, setting a channel to be non-blocking, setting a maximum length waiting for connection in a thread queue to be 128, simultaneously closing a Nagle algorithm to ensure timely sending when generating a message, starting a TCP bottom heartbeat keep-alive mechanism, setting an address port of the Netty server to be shared, setting a message transmission protocol of the Netty server to be a protobuf protocol, and adding a detection processing class heatbeatphathandhandler class of the protobuft 32FrameDecoder, protobufDecoder, protobufVarint LengthFieldPrepender, protobufEncoder, netty server and a heartbeat class of the heatbeatphathandler class of the networkhandler class. Meanwhile, the Netty server integrates a SpringBoot environment, and realizes connection and management of a MySQL database and a Redis cache service so as to call a service interface.
In a specific implementation mode, a custom second component (springspace component) automatically scans whether a custom annotation @ BizServer exists in an interface processing class under a service processing package of the Netty server when the Netty server is started, and if the custom annotation @ BizServer exists, the interface processing class is registered into a custom BizServerServiceFaction class (stored by using ConcurrentHashMap technology, so that thread concurrency and security in the process of accessing beans are ensured). When the Netty server receives the request of the Netty client, according to the service name and method in the request parameters of the Netty client, invoking the BizServiceFaction class to acquire the object and method of the service processing class of the Netty server, acquiring the object method of the service processing class of the Netty server by using the Java reflection technology, judging whether the method has annotation@remoteService (the parameters have service name, version number and service type), if so, further judging whether the parameter value of the annotation@remoteService (the parameters have service name, version number and service type) of the Netty client request method is consistent with the interface invoking parameter value agreed by the Netty server, if so, acquiring the service name and service type parameter value annotated by the Netty server, acquiring the service processing class object and method of the Netty server by the service name value (comprising the service processing class name and method name of the Netty server), then executing the method and invoking the Netty server to implement the corresponding service interface processing method for each request of the Netty server, and implementing the method to implement the Netty server interface configuration and the Netty server to implement the interface configuration and the Netty server, and the Netty server interface configuration interface is connected to the Netty server interface management interface. The Netty server realizes an API interface in a service processing class custom protocol in the service processing packet, thereby facilitating the request call of the Netty client.
Step S23: and converting the operation result into a protobuf format and sending the protobuf format as a response message to the Netty client.
In the embodiment of the application, the protobuf protocol technology is utilized to customize the proto file of the message transmission, and the corresponding request and response Java file with the protobuf format is generated, so that high-performance message communication between the Netty client and the Netty server is realized.
Further, when the second component is further configured to define a heartbeat detection processing class of the Netty server and a message processing class of the server, the method further includes:
and when receiving the heartbeat packet sent by the Netty client, sending back the heartbeat packet to the Netty client, and maintaining the TCP connection to realize the TCP long connection.
In the embodiment of the application, the second component self-defines a heartbeat detection processing class HeartBeatHandler (inherited IdleStateHandler class) of the Netty server and a message processing class ServerHandler (inherited SimpleChannelInboundHandler class) of the server, and is used for sending back a heartbeat packet to the Netty client when the Netty server receives a heartbeat packet sent by the Netty client, so that TCP connection is maintained to realize TCP long connection, and resource waste caused by reestablishing connection of the TCP connection is avoided.
Referring to fig. 3, a third flow chart of a communication service method provided in the embodiment of the present application is applied between a Netty client and a Netty server, where the Netty client is customized with a first component, and the Netty server is customized with a second component, and includes:
step S301: the Http protocol requests a Netty client RESTful interface;
step S302: when the Netty client RESTful interface receives the Http protocol request, a method of the first component is called;
step S303: the first component acquires a TCP connection channel, uses a JDK dynamic proxy technology to proxy a Netty client remote request interface, and sends a request message to a Netty server, wherein the message format is a protobuf format;
step S304: the second component receives the request of the Netty client, verifies the request parameters and calls the method of the business processing class object of the Netty server by using Java reflection technology;
step S305: the method of the business processing class object of the Netty server calls MySQL database, redis cache service and the like, and returns an operation result;
step S306: the method of the business processing class object of the Netty server returns a response to the second component;
step S307: the second component converts the response of the Netty server into a protobuf format, and returns the conversion result to the first component through a TCP connection channel;
Step S308: the first component returns a response result of the Netty server to a RESTful interface of the Netty client through a JDK dynamic proxy technology;
step S309: the RESTful interface of the Netty client returns a response to the Http protocol request terminal;
step S310: when the channel of the Netty client side is free to read (the reading idle time is set to be 15 s), sending a heartbeat message to the Netty server side;
step S311: when the Netty server receives the heartbeat message of the Netty client, the heartbeat message is sent back to the Netty client.
It can be understood that some configurations need to be performed on the Netty client and the Netty server in the embodiments of the present application, and specific configuration content can be referred to the relevant configuration content of the foregoing embodiments, which is not described herein again.
Further, referring to fig. 4, fig. 4 is a fourth flow chart of a communication service method provided in the embodiment of the present application, for the Netty client, the main functions implemented by the Netty client may be divided into three points, including: starting Netty client service, and creating a TCP channel connection pool for connecting Netty servers; realizing a RESTful interface based on SpringBoot; the RESTful interface receives the Http request and responds.
For the first component, the functions that it mainly implements can be divided into five points, including: scanning interface package interface classes of remote requests of Netty clients, and adopting a JDK dynamic proxy technology to make proxy requests on annotated @ remoteService interface methods; acquiring TCP connection channels of a Netty client and a Netty server, creating a TCP request follower of the TCP connection channel, sending a request and waiting for a response; the TCP request follower of the TCP connection channel obtains the response of the Netty server and forwards the response to the Netty client; the Netty client side carries out heartbeat processing to realize TCP long connection; and realizing protobuf protocol communication request class.
The Netty client integrates a SpringBoot environment, realizes connection and management of Redis cache service, and the custom service processing class realizes a RESTful interface based on the SpringBoot, is convenient for receiving client requests of the Http protocol, and simultaneously self-defines interface classes of the remote request Netty server, wherein the method in the interface is @ RemoteService annotation class (parameters include service name, version number and service type) for sending requests to the service processing class interface of the Netty server. When the Netty client is started, a TCP connection channel connected with the Netty server is established and stored in a connection pool connected with the TCP, a self-defined remote method calls a scanning class RemoteScannerConfig and configures an interface packet name of a self-defined remote request of the Netty client, the RemoteScannerConfig class scans an interface packet lower interface class of the self-defined remote request of the Netty client, a method with a @ RemoteService annotation in the interface class is analyzed, an interface processing class with the self-defined annotation @ BizServers under a corresponding business processing packet of the Netty server is obtained, then a method of the interface processing class with the self-defined annotation @ BizServers under the business processing packet of the Netty server is called through a JDK dynamic technology, the method with the self-defined annotation @ BizServers is called under the business processing packet of the Netty client, and the interface processing class with the self-defined annotation @ BizServers is called, and the communication efficiency is improved by using a protocol in the interface calling process. And a heartbeat detection processing class ClientIdleHandler of the Netty client and a message processing class ClientHandler of the client are defined at the same time, and the heartbeat detection processing class ClientIdleHandler is used for sending a heartbeat packet to the Netty server when a TCP connection channel of the Netty client is idle, so that TCP connection is maintained to realize TCP long connection, and resource waste caused by connection re-creation of the TCP connection is avoided.
For the Netty server, the functions mainly implemented by the Netty server can be divided into four points, including: starting Netty client service and monitoring a designated port; the user-defined protocol realizes an API interface, so that the Netty client requests to call; the connection and management of the MySQL database and the Redis cache service are realized based on SpringBoot, so that the service method is convenient to call; the user-defined protocol API interface receives the Netty client request, processes the service, calls MySQL and Redis databases, and returns a response.
For the second component, the functions that it mainly implements can be divided into five points, including: scanning interface processing class under a service processing packet of the Netty server, and registering class objects with @ BizServer annotation into BizServerServiceFaction class; checking whether the parameter value of Netty client request method annotation @ RemoteService is consistent with the interface call parameter value agreed by the Netty server; acquiring a business processing class object corresponding to the Netty server according to the parameter value of the Netty client request annotation@remoteservice, acquiring a method of the business processing class object of the Netty server by using a Java reflection technology, and executing method call; the Netty server side carries out heartbeat processing to realize TCP long connection; and realizing protobuf protocol communication response class.
The Netty server configures and starts Netty service and monitors service at a designated port, integrates a SpringBoot environment, and realizes connection and management of MySQL database and Redis cache service so as to call a service interface. The Netty server realizes an API interface in a service processing class custom protocol in the service processing packet, thereby facilitating the request call of the Netty client. When the Netty server is started, the second component automatically scans whether a custom annotation @ BizServer exists in an interface processing class under a business processing packet of the Netty server, if the annotation @ BizServer exists, the interface processing class is registered, and meanwhile, a custom JDK dynamic proxy class remoteSupport is configured, so that when the Netty client interface requests to be called in a custom TCP protocol mode, the Netty client interface calls the annotation @ RemoteService and annotation parameters (service names, service versions and service types) according to the annotation @ remoteSupport carried by a request method, the Netty server corresponding class processing method is called by using the JDK dynamic proxy remoteSupport class, and the Netty server receives the heartbeat packet sent by the Netty client end, maintains TCP connection, and avoids TCP connection resource waste.
In the embodiment of the application, the communication service method is based on a Netty server, a Netty client, a protobuf protocol, a Netty server second component springsoacf, netty and a first component soacf. The software developer only needs to configure a service monitoring port number, a thread generation coefficient coeffient, a configuration scanning type BizScannerConfig and a processing interface scanning packet name at the Netty server, configures an IP address, a service port, a remote call scanning type remotectanerConfig and a request interface scanning packet name which are connected with the Netty server at the Netty client, and can complete efficient message communication between the Netty client and the Netty server through the configuration.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a communication service device according to an embodiment of the present application. The embodiment of the application also provides a communication service device, which is applied to the Netty client provided with a first component, wherein the first component is used for acquiring a TCP connection channel and dynamically brokering a remote request interface of the Netty client, and the communication service device comprises:
a first receiving module 11, configured to receive a target service call request from an http interface;
the first execution module 12 is configured to invoke the first component to obtain a TCP connection channel, dynamically proxy a remote request interface of the Netty client, and send a target service request message to a Netty server according to the target service invocation request, where the target service request message format is a protobuf format;
The first execution module 12 is further configured to invoke the first component to receive a response message of the target service request message sent by the Netty server, where the response message is in a protobuf format.
Optionally, the first execution module 12 is further configured to start a Netty client service; realizing a remote request interface of the Netty client based on SpringBoot;
correspondingly, the first receiving module 11 is further configured to receive a target service call request from the http interface for the remote request interface.
Optionally, the first execution module 12 is further configured to invoke the first component to establish a TCP connection channel with the Netty server, and store the TCP connection channel in a TCP connection pool.
Optionally, the first execution module 12 is further configured to invoke a first component, scan an interface class under the remote request interface package, parse an interface method including a target annotation, and proxy the interface class, where the target annotation includes a request parameter of the target service invocation request; and acquiring a TCP connection channel between the Netty client and the Netty server, sending request data containing the target annotation to the Netty server, and waiting for response.
Optionally, the first execution module 12 is further configured to customize a remote method scanning class of the Netty client and configure an interface package name of the target service call request; the remote method scanning class scans the interface class under the interface package of the target service call request and analyzes the interface method with the target annotation in the interface class under the interface package; and adopting JDK dynamic proxy technology to proxy the interface class under the interface package.
Optionally, when the first component is further configured to define a heartbeat detection processing class and a message processing class of the Netty client, the first execution module 12 is further configured to send a heartbeat packet to the Netty server when a TCP connection channel of the Netty client is idle, and maintain TCP connection to implement TCP long connection.
It should be noted that, the specific workflow of each module may refer to the corresponding content disclosed in the foregoing embodiment, and have corresponding effects, which are not described herein.
In the embodiment of the application, when the communication service device is applied to the Netty client for communication service, the Netty client is provided with a first component for acquiring a TCP connection channel and dynamically acting on a remote request interface of the Netty client, the first component is called by receiving a target service call request from an http interface so as to acquire the TCP connection channel and dynamically acting on the remote request interface of the Netty client, a target service request message is sent to the Netty server according to the target service call request, and the first component is called to receive a response message of the target service request message sent by the Netty server, wherein the target service request message and the response message are in a protobuf format. The communication service method applied to the Netty client provided with the first component realizes high-efficiency communication service by using a protobuf protocol based on Netty; the method comprises the steps of customizing a proto file of message transmission by utilizing a protobuf protocol technology, and generating a corresponding request and response Java file with a protobuf format, wherein the Java file is used for message communication between a Netty client and a Netty server; protobuf is a structured data description and high-performance serialization protocol supporting cross-platform and multi-language, and the protocol is completely based on binary system, so that the performance of message transmission of communication service realized by the device is far higher than that of the message transmission in JSON or XML formats.
Referring to fig. 6, fig. 6 is a second schematic structural diagram of a communication service device according to an embodiment of the present application. The embodiment of the application also provides a communication service device, which is applied to the Netty server provided with a second component, wherein the second component is used for acquiring the object and the method of the service processing class of the Netty server and executing the method call of the Netty server, and the communication service device comprises the following steps:
a second receiving module 21, configured to receive a target service request message including a target annotation sent by a Netty client, where the request message is in a protobuf format;
the second execution module 22 is configured to verify the target annotation of the request message, and if the verification is passed, obtain a corresponding Netty server service class object and a corresponding method according to a request parameter of the target annotation, call the corresponding Netty server service class object method, and execute the Netty server target service method call to obtain an operation result;
the second sending module 23 is configured to convert the operation result into a protobuf format, and send the protobuf format as a response message to the Netty client.
Optionally, the second execution module 22 is further configured to start the Netty server; scanning interface processing classes under a service processing packet of the Netty server, and registering class objects containing first notes into preset classes;
Correspondingly, the second execution module 22 is further configured to invoke the preset class to obtain an object method of a service processing class of the Netty server, determine whether a target annotation exists in the method, if so, check whether a parameter value of the target annotation of the Netty client request method is consistent with an interface invocation parameter value agreed by the Netty server, and if so, check that the parameter value is passed.
Optionally, when the second component is further configured to define a heartbeat detection processing class of the Netty server and a message processing class of the server, the second sending module 23 is further configured to send back a heartbeat packet to the Netty client when receiving the heartbeat packet sent by the Netty client, and maintain TCP connection to implement TCP long connection.
It should be noted that, the specific workflow of each module may refer to the corresponding content disclosed in the foregoing embodiment, and have corresponding effects, which are not described herein.
In the embodiment of the application, when the communication service device is applied to the Netty server for communication service, the Netty server is provided with a second component for acquiring the object and the method of the business processing class of the Netty server and executing the method call of the Netty server, and the request message is in a protobuf format by receiving the target service request message which is sent by the Netty client and contains the target annotation; checking target annotation of the request message, if the target annotation passes, acquiring a corresponding Netty server-side business processing class object and a corresponding method according to the request parameter of the target annotation, calling the corresponding Netty server-side business processing class object method, and executing the Netty server-side target service method call to obtain an operation result; and converting the operation result into a protobuf format and sending the protobuf format as a response message to the Netty client. The communication service method applied to the Netty server provided with the second component realizes high-efficiency communication service by using a protobuf protocol based on Netty; the method comprises the steps of customizing a proto file of message transmission by utilizing a protobuf protocol technology, and generating a corresponding request and response Java file with a protobuf format, wherein the Java file is used for message communication between a Netty client and a Netty server; protobuf is a structured data description and high-performance serialization protocol supporting cross-platform and multi-language, and the protocol is completely based on binary system, so that the performance of message transmission of communication service realized by the device is far higher than that of the message transmission in JSON or XML formats.
Referring to fig. 7, the embodiment of the present application further discloses an electronic device 30, including a processor 31 and a memory 32; wherein the memory 32 is used for storing a computer program; the processor 31 is configured to execute the computer program, and the communication service method disclosed in the foregoing embodiment is disclosed.
For the specific process of the communication service method, reference may be made to the corresponding content disclosed in the foregoing embodiment, and no further description is given here.
The memory 32 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the storage mode may be transient storage or permanent storage.
In addition, the electronic device 30 further includes a power supply 33, a communication interface 34, an input-output interface 35, and a communication bus 36; wherein the power supply 33 is configured to provide an operating voltage for each hardware device on the electronic device 30; the communication interface 34 can create a data transmission channel between the electronic device 30 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 35 is used for obtaining external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
Further, the embodiment of the application also discloses a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the communication service method disclosed in the previous embodiment.
For the specific process of the communication service method, reference may be made to the corresponding content disclosed in the foregoing embodiment, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing has outlined a detailed description of a communication service method, apparatus, electronic device and computer readable storage medium provided herein, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application and to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. The communication service method is characterized by being applied to a Netty client provided with a first component, wherein the first component is used for acquiring a TCP connection channel and dynamically proxy a remote request interface of the Netty client, and the method comprises the following steps:
receiving a target service call request from an http interface;
invoking the first component to acquire a TCP connection channel, dynamically proxy a remote request interface of the Netty client, and sending a target service request message to a Netty server according to the target service invocation request, wherein the target service request message is in a protobuf format;
And calling the first component to receive a response message of the target service request message sent by the Netty server, wherein the response message is in a protobuf format.
2. The communication service method according to claim 1, wherein before receiving the target service call request from the http interface, further comprising:
starting Netty client service;
realizing a remote request interface of the Netty client based on SpringBoot;
accordingly, the receiving the target service call request from the http interface includes:
a target service call request from an http interface is received for the remote request interface.
3. The communication service method according to claim 1, wherein before receiving the target service call request from the http interface, further comprising:
and calling the first component to establish a TCP connection channel with the Netty server, and storing the TCP connection channel into a TCP connection pool.
4. The communication service method according to claim 2, wherein the invoking the first component to obtain a TCP connection channel and dynamically proxy the remote request interface of the Netty client, and the sending the target service request message to the Netty server according to the target service invocation request comprises:
Invoking a first component, scanning an interface class under the remote request interface package, analyzing an interface method containing target annotation and proxy the interface class, wherein the target annotation contains request parameters of the target service invocation request;
and acquiring a TCP connection channel between the Netty client and the Netty server, sending request data containing the target annotation to the Netty server, and waiting for response.
5. The communication service method of claim 4, wherein the invoking the first component, scanning the interface class under the remote request interface package, parsing the interface method containing the target annotation, and brokering the interface class comprises:
the remote method of the self-defined Netty client scans the class and configures the interface package name of the target service call request;
the remote method scanning class scans the interface class under the interface package of the target service call request and analyzes the interface method with the target annotation in the interface class under the interface package;
and adopting JDK dynamic proxy technology to proxy the interface class under the interface package.
6. The communication service method according to claim 1, wherein when the first component is further configured to define a heartbeat detection processing class and a message processing class of the Netty client, the method further comprises:
When the TCP connection channel of the Netty client is idle, a heartbeat packet is sent to the Netty server, and the TCP connection is maintained to realize TCP long connection.
7. The communication service method is characterized by being applied to a Netty server provided with a second component, wherein the second component is used for acquiring an object and a method of a service processing class of the Netty server and executing the method call of the Netty server, and the method comprises the following steps:
receiving a target service request message which is sent by a Netty client and contains target notes, wherein the request message is in a protobuf format;
checking target annotation of the request message, if the target annotation passes the check, acquiring a corresponding Netty server-side business processing class object and a corresponding Netty server-side business processing class method according to the request parameter of the target annotation, calling the corresponding Netty server-side business processing class object method, and executing the Netty server-side target service method call to obtain an operation result;
and converting the operation result into a protobuf format and sending the protobuf format as a response message to the Netty client.
Before receiving the target service request message including the target annotation sent by the Netty client, the method further includes:
starting a Netty server;
scanning interface processing classes under a service processing packet of the Netty server, and registering class objects containing first notes into preset classes;
Accordingly, the verifying the target annotation of the request message includes:
and calling the preset class to acquire an object method of the business processing class of the Netty server, judging whether the method has a target annotation, if so, checking whether the parameter value of the target annotation of the Netty client request method is consistent with the interface calling parameter value agreed by the Netty server, and if so, checking to pass.
8. The communication service method according to claim 7, wherein when the second component is further configured to define a heartbeat detection processing class of the Netty server and a message processing class of the server, the method further comprises:
and when receiving the heartbeat packet sent by the Netty client, sending back the heartbeat packet to the Netty client, and maintaining the TCP connection to realize the TCP long connection.
9. A communication service device, applied to a Netty client provided with a first component, where the first component is configured to obtain a TCP connection channel and dynamically proxy a remote request interface of the Netty client, the communication service device includes:
the first receiving module is used for receiving a target service call request from the http interface;
the first execution module is used for calling the first component so as to acquire a TCP connection channel, dynamically proxy a remote request interface of the Netty client, and sending a target service request message to a Netty server according to the target service call request, wherein the target service request message format is a protobuf format;
The first execution module is further configured to invoke the first component to receive a response message of the target service request message sent by the Netty server, where the response message is in a protobuf format.
10. The communication service device is characterized by being applied to a Netty server provided with a second component, wherein the second component is used for acquiring an object and a method of a service processing class of the Netty server and executing a method call of the Netty server, and the method call comprises the following steps:
the second receiving module is used for receiving a target service request message which is sent by the Netty client and contains target annotation, wherein the request message is in a protobuf format;
the second execution module is used for checking the target annotation of the request message, if the target annotation passes the check, acquiring a corresponding Netty server-side business processing class object and a corresponding method according to the request parameter of the target annotation, calling the corresponding Netty server-side business processing class object method, and executing the Netty server-side target service method call to obtain an operation result;
the second sending module is used for converting the operation result into a protobuf format and sending the protobuf format serving as a response message to the Netty client.
CN202310521684.9A 2023-05-10 2023-05-10 Communication service method and device Withdrawn CN116546094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310521684.9A CN116546094A (en) 2023-05-10 2023-05-10 Communication service method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310521684.9A CN116546094A (en) 2023-05-10 2023-05-10 Communication service method and device

Publications (1)

Publication Number Publication Date
CN116546094A true CN116546094A (en) 2023-08-04

Family

ID=87443146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310521684.9A Withdrawn CN116546094A (en) 2023-05-10 2023-05-10 Communication service method and device

Country Status (1)

Country Link
CN (1) CN116546094A (en)

Similar Documents

Publication Publication Date Title
US7693955B2 (en) System and method for deploying a web service
US9258379B2 (en) Session initiation protocol adapter system and method providing stateless node mapping to a stateful server node hosting a communication session for an actor
US8918452B2 (en) Web API framework
US20160204993A1 (en) Servlet api and method for xmpp protocol
KR101159364B1 (en) Mapping between object oriented and service oriented representations of a distributed application
US10999377B2 (en) Method, device and computer program product for protocol selection
CN112114979A (en) Remote procedure call method and device
TW202038581A (en) Management client, and device monitoring system and method
CN113596171B (en) Cloud computing data interaction method, system, electronic equipment and storage medium
Aijaz et al. Enabling high performance mobile web services provisioning
CN113778499B (en) Method, apparatus, device and computer readable medium for publishing services
KR100736081B1 (en) Apparatus for providing web service, apparatus for requesting web service, method for providing web service and method for requesting web service
CN113965628A (en) Message scheduling method, server and storage medium
WO2003073309A1 (en) Web services programming and deployment
US10402307B2 (en) System and method for providing runtime tracing for a web-based client accessing a transactional middleware platform using an extension interface
US8112766B2 (en) Multi-threaded device and facility manager
CN116546094A (en) Communication service method and device
US8255933B2 (en) Method and system for reading data, related network and computer program product therefor
CN114244758A (en) Network diagnosis method, storage medium, electronic device and system of android platform
US20040019633A1 (en) MIME encoding of values for web procedure calls
CN113992641A (en) Data processing method, device, equipment and storage medium
CN111935135B (en) AMQP protocol proxy method based on CMSP
CN113722115A (en) Method, device, equipment and computer readable medium for calling interface
CN111901689A (en) Streaming media data transmission method and device, terminal equipment and storage medium
US7367029B2 (en) Method and system for handling data

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20230804