CN108984316A - It is a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium - Google Patents

It is a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN108984316A
CN108984316A CN201810622625.XA CN201810622625A CN108984316A CN 108984316 A CN108984316 A CN 108984316A CN 201810622625 A CN201810622625 A CN 201810622625A CN 108984316 A CN108984316 A CN 108984316A
Authority
CN
China
Prior art keywords
service
message
communication mode
agreement
isp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810622625.XA
Other languages
Chinese (zh)
Inventor
林锡鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201810622625.XA priority Critical patent/CN108984316A/en
Publication of CN108984316A publication Critical patent/CN108984316A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

The present invention relates to a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium.Method includes: that service consumer obtains information on services, and information on services includes the agreement instruction for the frame mode that designation date is serialized, the provided service of ISP and communication mode configuration information;Connection is established according to communication mode configuration information and ISP, agreement instruction is then based on and generates and sends remote invocation message;ISP receives the remote invocation message, indicates parsing message content according to agreement and calls corresponding service, then returns to call result.According to embodiments of the present invention, information on services can be by service provider registers to registration center, and communication mode includes message queue and remote procedure call mode.The embodiment of the present invention merges different remote procedure calls and different message queue frames, using respective advantage, realizes decoupling of the business to communication mode, and have good scalability.

Description

It is a kind of to be deposited for the method, apparatus of distributed data processing, electronic equipment and computer Storage media
Technical field
The invention belongs to data processing fields, and in particular to a kind of method, apparatus for distributed data processing, electronics Equipment and computer storage medium.
Background technique
In distributed data processing, usually using remote procedure call between ISP and service consumer (Remote Procedure Call, RPC) or message queue (Message Queue, MQ) are communicated.There is currently more Kind of RPC frame and MQ scheme, RPC frame such as Dubbo, Tars, Spring Cloud etc., MQ scheme such as RabbitMq, RockMq etc..
For needing, waiting is returned the result or the scene of processing result, RPC communication mode are the users of nature intuition Formula.But due to wait as a result, service consumer there are thread consumption, simultaneously because the message not as message queue is temporary Mechanism is deposited, processing pressure is directly passed to ISP.On the other hand, distributed MQ processing is asynchronous unidirectional, is existed Intermediate node message queue can store message.MQ communication mode is suitable for service consumer and withouts waiting for Message Processing Completion scene, can reduce the processing pressure of ISP, but system reliability is influenced by intermediate node, and And the scene for there is synchronous return demand, trouble is then become using MQ communication mode.
RPC and message queue scheme respectively have advantage and disadvantage in distributed data processing, and respective usage scenario is limited.It is desired It is to provide the distributed data processing scheme that can make full use of the two advantage and be suitable for various businesses.
Summary of the invention
In view of the above-mentioned problems, the embodiment of the present invention provides a kind of method, apparatus for distributed data processing, electronics Equipment and computer storage medium can merge different RPC and different MQ communication modes, realize business to communication mode Decoupling, and there is good scalability.
In the first aspect of the present invention, a kind of method for distributed data processing is provided.Come this method comprises: receiving From the remote invocation message of service consumer transmitted with predetermined communication mode, remote invocation message includes the message through serializing At the agreement instruction of content and the frame mode being serialized to instruction message content, agreement instruction and ISP Service and predetermined communication mode are associated;It is indicated based on agreement, parses message content;Based on the message content through parsing, adjust With service associated with agreement instruction;And sent to service consumer and call response message, calling response message includes adjusting The call result generated with service.
In certain embodiments, method further include: to registration center's registration service information, information on services includes for service Each service that supplier is supported has the following information of corresponding relationship: the frame mode being serialized to designation date The configuration information of agreement instruction, service identifiers and communication mode;And the configuration information of the communication mode based on registration, starting Service.
In certain embodiments, communication mode includes remote procedure call mode and SMS queue's pattern, and communicates mould Formula is provided at locating ISP with plug-in mode.
In certain embodiments, starting service include: in response to service communication mode be remote procedure call mode, base In configuration information, registration service;And in response to service communication mode be SMS queue's pattern, be based on configuration information, with team Column server establishes connection and monitors queue.
In certain embodiments, sending to service consumer and calling response message includes: the structure indicated with agreement Mode serializes call result;It generates and calls response message, calling response message includes agreement instruction and the calling through serializing As a result;And to service consumer with predetermined communication mode call by passing response message.
In certain embodiments, remote invocation message and call response message with identical structural data storage format into Row encapsulation.
In the second aspect of the present invention, a kind of method for distributed data processing is provided.This method comprises: obtaining clothes Business information, information on services includes the following information with corresponding relationship: the association to the frame mode that designation date is serialized The configuration information of service provided by view instruction, ISP and communication mode;Based on associated with requested service Communication mode configuration information, establish connection with ISP;It is indicated based on agreement associated with requested service, Generate remote invocation message;And remote invocation message is sent to ISP.
In certain embodiments, obtaining information on services from registration center includes: to registration center's subscription service information;And The information on services subscribed to is received from registration center.
In certain embodiments, communication mode includes remote procedure call mode and SMS queue's pattern, is provided with service It include: in response to communication mode associated with requested service is remote procedure call mode that person, which establishes connection, based on matching Confidence breath, establishes transmission control protocol with ISP and connect;And in response to communication associated with requested service Mode is SMS queue's pattern, is based on configuration information, establishes transmission control protocol with queue server and connect, so as to via queue Server is communicated with ISP.
In certain embodiments, generating remote invocation message includes: to be referred to based on agreement associated with requested service Show, serialized message content;And remote invocation message is generated, remote invocation message includes agreement instruction and disappears through what is serialized Cease content.
In certain embodiments, method further include: receive the calling response message from ISP, response is called to disappear Breath includes tune agreement instruction and be serialized with the frame mode that the agreement indicates associated with requested service With result.
In the third aspect of the present invention, a kind of device for distributed data processing is provided.The device includes: to receive list Member, for receiving the remote invocation message transmitted with predetermined communication mode from service consumer, remote invocation message includes The agreement instruction of message content through serializing and the frame mode being serialized to instruction message content, agreement instruction with Service and predetermined communication mode at ISP is associated;Protocol processing unit, for being indicated based on agreement, parsing disappears Cease content;Call unit, for calling service associated with agreement instruction based on the message content through parsing;And it sends Unit calls response message for sending to service consumer, and calling response message includes the calling knot for calling service and generating Fruit.
In certain embodiments, device further include: registering unit, for registration center's registration service information, service to be believed Breath includes that each service supported for ISP has the following information of corresponding relationship: to designation date by sequence The agreement instruction of the frame mode of change, service identifiers and communication mode configuration information;And service start unit, it is used for base In the configuration information of the communication mode of registration, starting service.
In certain embodiments, communication mode includes remote procedure call mode and SMS queue's pattern, and communicates mould Formula is provided at locating ISP with plug-in mode.
In certain embodiments, service start unit includes: the first start unit, for the communication mode in response to service For remote procedure call mode, it is based on configuration information, registration service;And second start unit, in response to the logical of service News mode is SMS queue's pattern, is based on configuration information, establishes connection with queue server and monitor queue.
In certain embodiments, transmission unit includes: result treatment unit, the frame mode for being indicated with agreement Serialize call result;Message generation unit calls response message for generating, and calling response message includes agreement instruction and warp The call result of serializing;And message sending unit, for being responded to service consumer with predetermined communication mode call by passing Message.
In certain embodiments, remote invocation message and call response message with identical structural data storage format into Row encapsulation.
In the fourth aspect of the present invention, a kind of device for distributed data processing is provided.The device includes: to obtain list Member, for obtaining information on services, information on services includes the following information with corresponding relationship: being serialized to designation date The configuration information of the agreement instruction of frame mode, the provided service of ISP and communication mode;Connection establishment unit, For the configuration information based on communication mode associated with requested service, connection is established with ISP;Message is raw Remote invocation message is generated for indicating based on agreement associated with requested service at unit;And transmission unit, For sending remote invocation message to ISP.
In certain embodiments, acquiring unit includes: subscriber units, is used for registration center's subscription service information;And Receiving unit, for receiving the information on services subscribed to from registration center.
In certain embodiments, communication mode includes remote procedure call mode and SMS queue's pattern, and connection is established single Member includes: the first connection establishment unit, for being remote process tune in response to communication mode associated with requested service With mode, it is based on configuration information, transmission control protocol is established with ISP and connect;And second connection establishment unit, it uses In being SMS queue's pattern in response to communication mode associated with requested service, it is based on configuration information, with queue service Device establishes transmission control protocol connection, to communicate via queue server with ISP.
In certain embodiments, message generation unit includes: protocol processing unit, for being based on and requested service phase Associated agreement instruction, serialized message content;And message generation unit, for generating remote invocation message, far call Message includes agreement instruction and the message content through serializing.
In certain embodiments, the device further include: receiving unit, for receiving the calling response from ISP Message, calling response message includes structure side agreement instruction and indicated with the agreement associated with requested service Formula serializes call result.
In the fifth aspect of the invention, a kind of electronic equipment is provided.The electronic equipment includes: processor;And memory, It is stored with the readable instruction of processor, and instruction executes processor according to a first aspect of the present invention Described method.
In the sixth aspect of the present invention, a kind of electronic equipment is provided.The electronic equipment includes: processor;And memory, It is stored with the readable instruction of processor, and instruction executes processor according to a second aspect of the present invention Described method.
In the seventh aspect of the present invention, a kind of computer readable storage medium is provided, is stored with machine readable instruction, Instruction makes machine execute described method according to a first aspect of the present invention when being executed by machine.
In the eighth aspect of the present invention, a kind of computer readable storage medium is provided, is stored with machine readable instruction, Instruction makes machine execute described method according to a second aspect of the present invention when being executed by machine.
The embodiment of the present invention provides a kind of for the method, apparatus of distributed data processing, electronic equipment and computer Storage medium unifies RPC or message queue using unified Message Processing and transmission mechanism in business processing Encapsulation realizes decoupling of the business to communication mode it is possible thereby to carry out unified abnormality processing, log printing etc..Meanwhile switching Different communication modes only needs to modify configuration, can be according to the suitable communication modes of service selection.Further, of the invention Using plug-in unit communication mode, it is with good expansibility.Moreover it is possible to support the servicing communications of different language.
Detailed description of the invention
Fig. 1, which shows the embodiment of the present invention, can be applied to system schematic therein;
Fig. 2 shows the flow charts of the method according to an embodiment of the invention for distributed data processing;
Fig. 3 shows the flow chart of the method for distributed data processing according to another embodiment of the present invention;
Fig. 4 shows the schematic diagram of the device according to an embodiment of the invention for distributed data processing;And
Fig. 5 shows the schematic diagram of the device for distributed data processing according to another embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference Attached drawing, the present invention is described in more detail.But as known to those skilled in the art, the invention is not limited to attached drawings and following reality Apply example.
As described herein, term " includes " and its various variants are construed as open-ended term, it means that " packet It includes but is not limited to ".Term "based" is construed as " being based at least partially on ".Term " one embodiment " it is understood that For " at least one embodiment ".Term " another embodiment " is construed as " at least one other embodiment ".
As previously mentioned, there is currently a variety of RPC frames and MQ scheme, RPC frame such as Dubbo, Tars, Spring Cloud etc., MQ scheme such as RabbitMq, RockMq etc..But RPC and message queue scheme are in distributed data processing Respectively there are advantage and disadvantage, usage scenario is limited.The embodiment of the present invention proposes a kind of technical solution for distributed data processing, energy It enough makes full use of the two advantage and is suitable for the distributed data processing application scenarios of various businesses.
The embodiment of the present invention is further described with reference to the accompanying drawing.Fig. 1 shows the embodiment of the present invention and can be applied to The schematic diagram of system 100 therein.
As shown, system 100 includes ISP 110, service consumer 120, registration center 130 and queue clothes Business device 140.ISP 110 provides service side or called side, can generally also claim in client-server mode Be server;Service consumer 120 requests service side or called side, generally also can be in client-server mode Referred to as client.It is appreciated that the above-mentioned entity in system 100 can be physically separate electronic equipment, be suitable for In the case of two or more entities be placed in same physical equipment be also it is possible.In addition, for ease of description, Fig. 1 is only It illustrates single each entity, however may exist any number of above-mentioned entity in system 100, the present invention is in this regard not It is limited.
According to an embodiment of the invention, can use existing or customized various RPC and message queue to support Communicating remote invocation of procedure message between ISP 110 and service consumer 120 is disappeared in business processing using unified Breath processing and transmission mechanism carry out unified encapsulation to different RPC or different message queues.Business is not only realized as a result, Decoupling to communication modes, and the advantages of integrate different message queues and different RPC, and used by being determined by business what Kind message queue or RPC communication mode.
In one embodiment, remote procedure call message uses structural data storage format, such as Protocol Buffer, Thrift etc..Protocol Buffer (or Protobuf) is a kind of format of data exchange of Google exploitation, It supports multilingual, such as java, c#, c++, go and python etc. independently of language and platform.Protobuf is widely used in The data exchange under data communication or isomerous environment between Distributed Application.In the following description with Protocol It is illustrated for Buffer, those skilled in the art's introduction according to the present invention is easy to get with the storage of other structures data The technical solution that format is realized.
As an example, puppy parc can be defined as follows in the present invention:
Wherein, application indicates service consumer application identities or title, can be optional;Code is to use With the agreement instruction for the frame mode that instruction message content (such as the parameter for calling service) is serialized, namely communication side's (clothes Business supplier 110 or service consumer 120) it can be indicated to determine the structure side that message content needs unserializing according to the agreement Formula or the frame mode for serializing message content;Content is the byte arrays after the serializing of specific message content.
According to an embodiment of the invention, within system 100, the service supported unified first of ISP 110 with The agreement instruction of corresponding with service processing is registered in registration center 140.Registration information also includes matching for corresponding communication mode Confidence breath, such as communication mode mark and communication mode communications parameter.As an example, if using RabbitMQ as message Queue, the parameter needed includes the information such as the port IP of queue, queue identity, exchange, vhost, if such as with RPC Dubbo then needs Dubbo service identifiers, registration center's relevant information etc. as communication modes.
For example, agreement 1001, agreement 1002 is respectively adopted in service 1, service 2 and service 3 that ISP 110 is supported With agreement 1003, ISP 110 is by the configuration information of service identifiers, agreement instruction and corresponding communication mode to registration It registers at center 140.Registration center 140 can realize registering functional using zookeeper, redis, mysql etc., such as register such as The information on services of following table one.
Table one
Agreement instruction Service identifiers Communication mode mark Communication mode parameter
1001 Service 1 Queue (RabbitMQ) The port IP of queue, queue identity, exchange, vhost etc.
1002 Service 2 Queue (RabbitMQ) The port IP of queue, queue identity, exchange, vhost etc.
1003 Service 3 RPC(Dubbo) Dubbo service identifiers, registration center's information etc.
After service registration is complete, ISP 110 services according to communication mode and the starting of communication mode parameter and provides not The service of same type.If communication mode is message queue, then queue server 140 is connected according to the information of registration and monitor certain A queue, such as queue 141 and queue 142;If communication mode is RPC, according to the service identifiers of registration and registration center Registration service.
In another embodiment, information on services can not also be passed to clothes via registration process by ISP 110 Be engaged in consumer 120, so that service consumer 120 initiates service request as needed.
On the other hand, service consumer 120 can be in due course to 130 subscription service information of registration center or registration center It pushes to service consumer 120 thereon by the information on services of service provider registers all in system;Or service consumer 120 know information on services by other forms.According to the configuration information that information on services namely ISP 110 are supported, clothes Business consumer 120 and ISP 110 establish communication channel.Specifically, if the service of calling needs message queue to communicate Mode is then established transmission control protocol TCP with queue server 140 and is connect;If the service of calling needs RPC communication mode, TCP connection is established with ISP 110.
Then, the message that different agreement identifies is sent to ISP by service consumer 120 in the form of puppy parc 110.For example, the message of agreement 1001 and agreement 1002 corresponds to message queue communication mode in the information on services of registration, because This sends via message queue channel;The message of agreement 1003 corresponds to RPC communication mode in the information on services of registration, therefore It is sent via the channel RPC.
After ISP 110 gets message via communication mode plug-in unit 112 by different communication modes, it is supplied to association View processing and route distribution module 113.Protocol processes and route distribution module 113 carry out protocol analysis to message, and according to clothes The information on services that business supplier 113 registers, routes messages to service call processing module 111, so that its calling refers to agreement Show corresponding service.Processing is called to generate call result, by the call result to call response message to be sent back to service consumption Person 120, and ISP 110 is changed into service consumer at this time, and service consumer 120 is changed into ISP, with class As mode call by passing response message.
From above to the description of the embodiment of the present invention as it can be seen that since business processing uses unified Message Processing and transmitter System, has carried out unified encapsulation to RPC or message queue, it is possible thereby to carry out unified abnormality processing, log printing etc., realizes Decoupling of the business to communication mode.Meanwhile switching different communication modes and only needing to modify configuration, it can be according to service selection Suitable communication modes.Further, the present invention uses plug-in unit communication mode, such as PRC and message queue or even different RPC product and different message queue products, thus be with good expansibility.Moreover it is possible to support the clothes of different language Business communication, for example, if being communicated based on Protocol Buffer, the institute that Protocol Buffer can be supported to be supported There is language.
Fig. 2 shows the flow charts of the method 200 according to an embodiment of the invention for distributed data processing. Method 200 can execute at ISP 110.210, transmitting with predetermined communication mode from service consumer is received Remote invocation message.The remote invocation message include message content through serializing and to instruction message content by sequence The agreement of the frame mode of change indicates, and agreement instruction at ISP service and predetermined communication mode it is related Connection.
According to one embodiment of present invention, service consumer 120 is believed according to the service for example obtained from registration center 130 Breath initiates far call request to ISP 110, which sent according to the communication mode indicated in information on services , and request message content is encapsulated with puppy parc and is sent.As a result, at ISP 110, receive with predetermined communication The remote invocation message of mode transmitting.The remote invocation message includes message content through serializing and in instruction message Hold the agreement instruction for the frame mode being serialized.
In one embodiment of the invention, ISP 110 is before starting service, unified first to be supported The agreement instruction of service and corresponding with service processing is registered in registration center 140, and registration information also includes corresponding communication mould The configuration information of formula.Then, according to the information of registration, ISP 110 starts service, provides service for service consumer and do It is good to prepare.The process as previously mentioned, be not described in detail herein.
Significantly, since different message queues, different RPC frames have different parameter and different Service registration mode, in embodiments of the present invention, at ISP 110 with plug-in mode provide different message queue or The communication mode of RPC.ISP 110 is obtained from queue server 140 from service consumer 120 using plug-in mode With the message that message queue communication mode transmits, or obtain the disappearing with the transmitting of RPC communication mode from service consumer 120 Breath.
It 220, is indicated based on agreement, parses message content.After ISP 110 receives remote invocation message, association View processing and route distribution module 113 are based on puppy parc to message and carry out protocol analysis, are determined in message according to protocol-identifier The structure for holding unserializing, to obtain the service invocation information (such as service call parameter) in message content.
Then, 230, based on the message content through parsing, service associated with agreement instruction is called.It is mentioned according to service The information on services that donor 110 is registered, can determine the service that needs call.Message is routed to service call processing module 111, So that it calls service corresponding with agreement instruction, call result is obtained.
240, is sent to service consumer and call response message.The calling response message includes calling service and generating Call result.Specifically, the frame mode serializing call result that ISP 110 indicates according to agreement, and with Puppy parc form, which generates, calls response message, then to service consumer 120 with the identical communication of remote call request message Mode call by passing response message.In other words, ISP 110 is changed into service consumer at this time, and service consumer 120 It is changed into ISP, in a similar way call by passing response message.
Fig. 3 shows the flow chart of the method 300 for distributed data processing according to another embodiment of the present invention. Method 300 can execute at service consumer 120.310, information on services is obtained.Service consumer 120 can be into registration 130 subscription service information of the heart obtains the information on services that ISP is supported from registration center;Or service consumer 120 The information on services that ISP is supported is known by other forms.As previously mentioned, information on services includes having corresponding relationship Following information: service provided by the agreement instruction of the frame mode being serialized to designation date, ISP with And the configuration information of communication mode.
When service consumer 120 needs remote call service, 320, according to the information on services known, based on asked The configuration information for the associated communication mode of service asked, establishes connection with ISP 110.Specifically, if calling Service needs message queue communication mode, then according to the configuration information for the communication mode known, the port IP including queue, queue The information such as mark, exchange, vhost establish connection with queue server 140, and then via queue server 140 and service Established connection communicates between supplier 110.If then basis is known using RPC such as Dubbo as communication modes Dubbo service identifiers, registration center's relevant information etc. establish connection with ISP 110.
It 330, is indicated based on agreement associated with requested service, generates remote invocation message.Service consumer 120 indicate according to agreement associated with requested service, serialized message content, such as the parameter for calling service required Deng.Then, the encapsulation messages content in the form of puppy parc, by through serializing message content and agreement instruction be included in it is long-range It calls in message.Then 340, service consumer 120 is sent via the communication channel established 320 to ISP 110 Remote invocation message.
According to an embodiment of the invention, after ISP 110 receives far call and requests and handle, to Service consumer returns to the calling response message comprising call result.Service consumer 120 is correspondingly to combine method with as above Process described in 200 obtains call result, to realize the application of itself to calling response message to carry out dissection process.
Fig. 4 shows the schematic diagram of the device 400 according to an embodiment of the invention for distributed data processing.Dress Setting 400 can be implemented as ISP 110 or part of it in such as system 100.As shown, device 400 includes: to connect Unit 410 is received, for receiving the remote invocation message transmitted with predetermined communication mode from service consumer, far call disappears Breath includes the agreement instruction of message content and the frame mode being serialized to instruction message content through serializing, agreement Indicate at ISP service and predetermined communication mode it is associated;Protocol processing unit 420, for being referred to based on agreement Show, parses message content;Call unit 430, for calling clothes associated with agreement instruction based on the message content through parsing Business;And transmission unit 440, response message is called for sending to service consumer, calling response message includes calling service And the call result generated.
In certain embodiments, device 400 further includes registering unit 450, for taking to registration center's registration service information Business information includes that each service supported for ISP has the following information of corresponding relationship: to designation date quilt The agreement instruction of the frame mode of serializing, service identifiers and communication mode configuration information.
In certain embodiments, device 400 further includes service start unit 460, for the communication mode based on registration Configuration information, starting service.Servicing start unit 460 may include: the first start unit, for the communication mould in response to service Formula is remote procedure call mode, is based on configuration information, registration service;And second start unit, in response to service Communication mode is SMS queue's pattern, is based on configuration information, establishes connection with queue server and monitor queue.
In certain embodiments, transmission unit 440 includes: result treatment unit, the structure for being indicated with agreement Mode serializes call result;Message generation unit calls response message for generating, and calling response message includes agreement instruction With the call result through serializing;And message sending unit, it is used for service consumer with predetermined communication mode call by passing Response message.
It should be appreciated that each unit side that several embodiments describe in conjunction with reference Fig. 1 and Fig. 2 respectively in device 400 Each step in method 200 is corresponding.Therefore, device is equally applicable to above in association with Fig. 1 and Fig. 2 operation described and feature 400 and unit wherein included, and have same effect, detail repeats no more.
Fig. 5 shows the schematic diagram of the device 500 for distributed data processing according to another embodiment of the present invention.Dress Setting 500 can be implemented as service consumer 120 or part of it in such as system 100.As shown, device 500 includes: to obtain Unit 510 is taken, for obtaining information on services, information on services includes the following information with corresponding relationship: to designation date quilt The configuration information of the agreement instruction of the frame mode of serializing, the provided service of ISP and communication mode;Connection Unit 520 is established, for the configuration information based on communication mode associated with requested service, is established with ISP Connection;Message generation unit 530 generates remote invocation message for indicating based on agreement associated with requested service; And transmission unit 540, for sending remote invocation message to ISP.
In certain embodiments, acquiring unit 510 includes: subscriber units, is used for registration center's subscription service information;With And receiving unit, for receiving the information on services subscribed to from registration center.
In certain embodiments, message generation unit 530 includes: protocol processing unit, for being based on and requested clothes The associated agreement of being engaged in instruction, serialized message content;And message generation unit, for generating remote invocation message, remotely Calling message includes agreement instruction and the message content through serializing.
In certain embodiments, which further includes receiving unit, for receiving the calling response from ISP Message, calling response message includes structure side agreement instruction and indicated with the agreement associated with requested service Formula serializes call result.
It should be appreciated that each unit side that several embodiments describe in conjunction with reference Fig. 1 and Fig. 3 respectively in device 500 Each step in method 300 is corresponding.Therefore, device is equally applicable to above in association with Fig. 1 and Fig. 3 operation described and feature 500 and unit wherein included, and have same effect, detail repeats no more.
The embodiment of the present invention also provides a kind of electronic equipment.The electronic equipment includes processor and memory, storage Device is stored with the readable instruction of processor, and instruction makes processor execute foregoing method 200 when executed by the processor With method 300.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored with machine readable instruction, refers to Order makes machine execute method 200 and method 300 having thus described the invention when being executed by machine.
It will be understood by those skilled in the art that in flow charts indicate or logic described otherwise above herein and/or Step may be embodied in and appoint for example, being considered the order list of the executable instruction for realizing logic function In what computer-readable medium, for instruction execution system, device or equipment (such as computer based system including processor System or other can be from instruction execution system, device or equipment instruction fetch and the system executed instruction) use, or combine this A little instruction execution systems, device or equipment and use.For the purpose of this specification, " computer-readable medium " can be it is any can be with Include, store, communicate, propagate, or transport program is for instruction execution system, device or equipment or in conjunction with these instruction execution systems System, device or equipment and the device used.
The more specific example (non-exhaustive list) of computer-readable medium include the following: there are one or more wirings Electrical connection section (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not Centainly refer to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be any One or more embodiment or examples in can be combined in any suitable manner.
More than, embodiments of the present invention are illustrated.But the present invention is not limited to above embodiment.It is all Within the spirit and principles in the present invention, any modification, equivalent substitution, improvement and etc. done should be included in guarantor of the invention Within the scope of shield.

Claims (26)

1. a kind of method for distributed data processing characterized by comprising
The remote invocation message transmitted with predetermined communication mode from service consumer is received, the remote invocation message includes Message content through serializing and the agreement instruction to indicate frame mode that the message content is serialized, the association It discusses the service indicated at the ISP and the predetermined communication mode is associated;
It is indicated based on the agreement, parses the message content;
Based on the message content through parsing, service associated with agreement instruction is called;And
It is sent to the service consumer and calls response message, the calling response message includes calling the service and generating Call result.
2. the method according to claim 1, wherein further include:
To registration center's registration service information, the information on services includes each service supported for the ISP Following information with corresponding relationship: the agreement instruction of the frame mode being serialized to designation date, service identifiers and The configuration information of communication mode;And
The configuration information of the communication mode based on registration, starting service.
3. according to the method described in claim 2, it is characterized in that, the communication mode includes remote procedure call mode and disappears Lining up mode is ceased, and the communication mode is provided at locating ISP with plug-in mode.
4. according to the method described in claim 2, it is characterized in that, starting service includes:
Communication mode in response to service is remote procedure call mode, is based on the configuration information, registers the service;And
Communication mode in response to service is SMS queue's pattern, is based on the configuration information, establishes connection with queue server And monitor queue.
5. the method according to claim 1, wherein sending the calling response message to the service consumer Include:
The call result is serialized with the frame mode that the agreement indicates;
It generates and calls response message, the calling response message includes the agreement instruction and the calling knot through serializing Fruit;And
The calling response message is transmitted with the predetermined communication mode to the service consumer.
6. the method according to claim 1, wherein the remote invocation message and the calling response message with Identical structural data storage format is packaged.
7. a kind of method for distributed data processing characterized by comprising
Information on services is obtained, the information on services includes the following information with corresponding relationship: being serialized to designation date The agreement instruction of frame mode, the configuration information of service and communication mode provided by ISP;
Based on the configuration information of communication mode associated with requested service, connection is established with the ISP;
It is indicated based on agreement associated with requested service, generates remote invocation message;And
The remote invocation message is sent to the ISP.
8. the method according to the description of claim 7 is characterized in that including: from registration center's acquisition information on services
The information on services is subscribed to registration center;And
The information on services subscribed to is received from the registration center.
9. the method according to the description of claim 7 is characterized in that the communication mode includes remote procedure call mode and disappears Lining up mode is ceased, establishing connection with the ISP includes:
It is remote procedure call mode in response to communication mode associated with requested service, is based on the configuration information, Transmission control protocol is established with the ISP to connect;And
It is SMS queue's pattern in response to communication mode associated with requested service, the configuration information is based on, with team Column server establishes transmission control protocol connection, to communicate via the queue server with the ISP.
10. the method according to the description of claim 7 is characterized in that generation remote invocation message includes:
It is indicated based on agreement associated with requested service, serialized message content;And
The remote invocation message is generated, the remote invocation message includes the agreement instruction and the message through serializing Content.
11. the method according to the description of claim 7 is characterized in that further include:
The calling response message from the ISP is received, the calling response message includes and requested service phase Associated call result agreement instruction and be serialized with the frame mode that the agreement indicates.
12. a kind of device for distributed data processing characterized by comprising
Receiving unit, it is described remote for receiving the remote invocation message transmitted with predetermined communication mode from service consumer It includes message content through serializing and the frame mode being serialized to indicate the message content that journey, which calls message, Agreement instruction, agreement instruction at the ISP service and the predetermined communication mode it is associated;
Protocol processing unit parses the message content for indicating based on the agreement;
Call unit, for calling service associated with agreement instruction based on the message content through parsing;And
Transmission unit calls response message for sending to the service consumer, and the calling response message includes calling institute The call result stating service and generating.
13. device according to claim 12, which is characterized in that further include:
Registering unit, for registration center's registration service information, the information on services to include being directed to the ISP institute The each service supported has the following information of corresponding relationship: the agreement for the frame mode being serialized to designation date refers to Show, the configuration information of service identifiers and communication mode;And
Start unit is serviced, for the configuration information of the communication mode based on registration, starting service.
14. device according to claim 13, which is characterized in that the communication mode include remote procedure call mode and SMS queue's pattern, and the communication mode is provided at locating ISP with plug-in mode.
15. device according to claim 13, which is characterized in that servicing start unit includes:
First start unit is remote procedure call mode for the communication mode in response to service, is based on the configuration information, Register the service;And
Second start unit is SMS queue's pattern for the communication mode in response to service, the configuration information is based on, with team Column server establishes connection and monitors queue.
16. device according to claim 12, which is characterized in that transmission unit includes:
Result treatment unit, the frame mode for being indicated with the agreement serialize the call result;
Message generation unit calls response message for generating, and the calling response message includes that the agreement indicates and through sequence The call result of columnization;And
Message sending unit, for transmitting the calling response message to the service consumer with the predetermined communication mode.
17. device according to claim 12, which is characterized in that the remote invocation message and the calling response message It is packaged with identical structural data storage format.
18. a kind of device for distributed data processing characterized by comprising
Acquiring unit, for obtaining information on services, the information on services includes the following information with corresponding relationship: to indicate Confidence is matched in the agreement instruction of the frame mode that data are serialized, service and communication mode provided by ISP Breath;
Connection establishment unit, for the configuration information based on communication mode associated with requested service, with the service Supplier establishes connection;
Message generation unit generates remote invocation message for indicating based on agreement associated with requested service;And
Transmission unit, for sending the remote invocation message to the ISP.
19. device according to claim 18, which is characterized in that acquiring unit includes:
Subscriber units, for subscribing to the information on services to the registration center;And
Receiving unit, for receiving the information on services subscribed to from the registration center.
20. device according to claim 18, which is characterized in that the communication mode include remote procedure call mode and SMS queue's pattern, connection establishment unit include:
First connection establishment unit, for being remote procedure call mould in response to communication mode associated with requested service Formula is based on the configuration information, establishes transmission control protocol with the ISP and connect;And
Second connection establishment unit, for being SMS queue's pattern in response to communication mode associated with requested service, Based on the configuration information, transmission control protocol is established with queue server and is connect, so as to via the queue server and institute State ISP's communication.
21. device according to claim 18, which is characterized in that message generation unit includes:
Protocol processing unit, for being indicated based on agreement associated with requested service, serialized message content;And
Message generation unit, for generating the remote invocation message, the remote invocation message include the agreement instruction and The message content through serializing.
22. device according to claim 18, which is characterized in that further include:
Receiving unit, for receiving the calling response message from the ISP, the calling response message include with The requested associated agreement of service indicates and serializes call result with the frame mode that the agreement indicates.
23. a kind of electronic equipment characterized by comprising
Processor;And
Memory, is stored with the readable instruction of the processor, and described instruction makes described when being executed by the processor Processor executes method according to claim 1 to 6.
24. a kind of electronic equipment characterized by comprising
Processor;And
Memory, is stored with the readable instruction of the processor, and described instruction makes described when being executed by the processor Processor executes method according to any one of claims 7-11.
25. a kind of computer readable storage medium, which is characterized in that it is stored with machine readable instruction, described instruction by The machine makes the machine execute method according to claim 1 to 6 when executing.
26. a kind of computer readable storage medium, which is characterized in that it is stored with machine readable instruction, described instruction by The machine makes the machine execute method according to any one of claims 7-11 when executing.
CN201810622625.XA 2018-06-15 2018-06-15 It is a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium Pending CN108984316A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810622625.XA CN108984316A (en) 2018-06-15 2018-06-15 It is a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810622625.XA CN108984316A (en) 2018-06-15 2018-06-15 It is a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN108984316A true CN108984316A (en) 2018-12-11

Family

ID=64541390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810622625.XA Pending CN108984316A (en) 2018-06-15 2018-06-15 It is a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN108984316A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109753370A (en) * 2018-12-28 2019-05-14 北京东方国信科技股份有限公司 A kind of low time delay, the high remote procedure calling (PRC) method handled up
CN109815025A (en) * 2018-12-17 2019-05-28 顺丰科技有限公司 Business model call method, device and storage medium
CN109857572A (en) * 2018-12-29 2019-06-07 北京百度网讯科技有限公司 Realize method, apparatus, equipment and the computer readable storage medium of far call
CN110191164A (en) * 2019-05-20 2019-08-30 中国工商银行股份有限公司 Distributed Services access system and method
CN111010438A (en) * 2019-12-13 2020-04-14 北京达佳互联信息技术有限公司 Remote procedure calling method, device, server and storage medium
CN111309474A (en) * 2020-01-19 2020-06-19 北京恒华伟业科技股份有限公司 Communication method, communication device and distributed service registration center
CN111580998A (en) * 2020-06-12 2020-08-25 上海通联金融服务有限公司 RPC calling method of multiple tenants in SaaS service mode
CN111866160A (en) * 2020-07-28 2020-10-30 网易(杭州)网络有限公司 Multi-machine control method, device, equipment and storage medium
CN111970349A (en) * 2020-08-07 2020-11-20 中国建设银行股份有限公司 Communication system, method, device, equipment and medium based on remote procedure call
CN112256414A (en) * 2020-10-19 2021-01-22 浪潮天元通信信息系统有限公司 Method and system for connecting multiple computing storage engines
CN112804303A (en) * 2020-12-31 2021-05-14 网银在线(北京)科技有限公司 Service providing method, device, system, transfer platform and storage medium
CN112929401A (en) * 2019-12-06 2021-06-08 华为技术有限公司 Registration method and device
CN113407366A (en) * 2021-07-15 2021-09-17 北京字节跳动网络技术有限公司 Remote calling method, device and system
CN113434316A (en) * 2021-07-16 2021-09-24 南京炫佳网络科技有限公司 Function integration method, device, equipment and storage medium based on redis plug-in
CN113454969A (en) * 2020-12-31 2021-09-28 商汤国际私人有限公司 Information interaction method and device, equipment, system and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902458A (en) * 2010-02-21 2010-12-01 中国联合网络通信集团有限公司 Interprocess communication method across host machine, device thereof and system thereof
CN103905498A (en) * 2012-12-27 2014-07-02 鼎捷软件股份有限公司 Service information management method and service information management system
CN105677397A (en) * 2015-12-30 2016-06-15 南京途牛科技有限公司 Method for optimizing PHP remote procedure call through local gateway program
CN105721473A (en) * 2016-02-24 2016-06-29 锐达互动科技股份有限公司 WEB side remote invoking optimizing method and system
US20160381182A1 (en) * 2015-06-26 2016-12-29 International Business Machines Corporation De-duplicating remote procedure calls
CN106453288A (en) * 2016-09-29 2017-02-22 上海和付信息技术有限公司 Asynchronous mode supporting distributed micro service framework system and implementation method thereof
CN106713226A (en) * 2015-11-12 2017-05-24 卓望数码技术(深圳)有限公司 Remote procedure call processing method used for distributed system and remote procedure call processing system thereof
CN106888218A (en) * 2017-04-01 2017-06-23 网易(杭州)网络有限公司 Message treatment method, device, client and service end

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902458A (en) * 2010-02-21 2010-12-01 中国联合网络通信集团有限公司 Interprocess communication method across host machine, device thereof and system thereof
CN103905498A (en) * 2012-12-27 2014-07-02 鼎捷软件股份有限公司 Service information management method and service information management system
US20160381182A1 (en) * 2015-06-26 2016-12-29 International Business Machines Corporation De-duplicating remote procedure calls
CN106713226A (en) * 2015-11-12 2017-05-24 卓望数码技术(深圳)有限公司 Remote procedure call processing method used for distributed system and remote procedure call processing system thereof
CN105677397A (en) * 2015-12-30 2016-06-15 南京途牛科技有限公司 Method for optimizing PHP remote procedure call through local gateway program
CN105721473A (en) * 2016-02-24 2016-06-29 锐达互动科技股份有限公司 WEB side remote invoking optimizing method and system
CN106453288A (en) * 2016-09-29 2017-02-22 上海和付信息技术有限公司 Asynchronous mode supporting distributed micro service framework system and implementation method thereof
CN106888218A (en) * 2017-04-01 2017-06-23 网易(杭州)网络有限公司 Message treatment method, device, client and service end

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815025A (en) * 2018-12-17 2019-05-28 顺丰科技有限公司 Business model call method, device and storage medium
CN109815025B (en) * 2018-12-17 2024-03-15 顺丰科技有限公司 Service model calling method, device and storage medium
CN109753370A (en) * 2018-12-28 2019-05-14 北京东方国信科技股份有限公司 A kind of low time delay, the high remote procedure calling (PRC) method handled up
CN109857572A (en) * 2018-12-29 2019-06-07 北京百度网讯科技有限公司 Realize method, apparatus, equipment and the computer readable storage medium of far call
CN109857572B (en) * 2018-12-29 2022-03-01 阿波罗智能技术(北京)有限公司 Method, device and equipment for realizing remote calling and computer readable storage medium
CN110191164A (en) * 2019-05-20 2019-08-30 中国工商银行股份有限公司 Distributed Services access system and method
CN110191164B (en) * 2019-05-20 2022-03-22 中国工商银行股份有限公司 Distributed service access system and method
CN112929401A (en) * 2019-12-06 2021-06-08 华为技术有限公司 Registration method and device
CN112929401B (en) * 2019-12-06 2023-12-19 华为云计算技术有限公司 Registration method and device
CN111010438A (en) * 2019-12-13 2020-04-14 北京达佳互联信息技术有限公司 Remote procedure calling method, device, server and storage medium
CN111309474A (en) * 2020-01-19 2020-06-19 北京恒华伟业科技股份有限公司 Communication method, communication device and distributed service registration center
CN111309474B (en) * 2020-01-19 2023-05-12 北京恒华伟业科技股份有限公司 Communication method, communication device and distributed service registration center
CN111580998A (en) * 2020-06-12 2020-08-25 上海通联金融服务有限公司 RPC calling method of multiple tenants in SaaS service mode
CN111866160B (en) * 2020-07-28 2023-09-15 网易(杭州)网络有限公司 Multi-machine control method, device, equipment and storage medium
CN111866160A (en) * 2020-07-28 2020-10-30 网易(杭州)网络有限公司 Multi-machine control method, device, equipment and storage medium
CN111970349A (en) * 2020-08-07 2020-11-20 中国建设银行股份有限公司 Communication system, method, device, equipment and medium based on remote procedure call
CN112256414A (en) * 2020-10-19 2021-01-22 浪潮天元通信信息系统有限公司 Method and system for connecting multiple computing storage engines
CN112804303A (en) * 2020-12-31 2021-05-14 网银在线(北京)科技有限公司 Service providing method, device, system, transfer platform and storage medium
CN113454969A (en) * 2020-12-31 2021-09-28 商汤国际私人有限公司 Information interaction method and device, equipment, system and storage medium
CN113454969B (en) * 2020-12-31 2023-09-19 商汤国际私人有限公司 Information interaction method, device, equipment, system and storage medium
CN112804303B (en) * 2020-12-31 2023-11-03 网银在线(北京)科技有限公司 Service providing method, device, system, transit platform and storage medium
CN113407366A (en) * 2021-07-15 2021-09-17 北京字节跳动网络技术有限公司 Remote calling method, device and system
CN113434316A (en) * 2021-07-16 2021-09-24 南京炫佳网络科技有限公司 Function integration method, device, equipment and storage medium based on redis plug-in

Similar Documents

Publication Publication Date Title
CN108984316A (en) It is a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium
CN105721473B (en) A kind of method and system of WEB terminal far call optimization
CN106453288B (en) A kind of distributed micro services frame system that supporting asynchronous mode and its implementation
US20140244809A1 (en) Service configuration method and apparatus
JP6795531B2 (en) API adapter, API adapter creation method, and program
CN106411933A (en) Lightweight RPC framework capable of service management and language calling
US20050114487A1 (en) Notification framework and method of distributing notification
CN109862051A (en) The realization method and system of multi-tenant under a kind of micro services framework
US7665096B2 (en) DDS-assisted CORBA discovery
CN102571550A (en) General information interaction platform and method
CN104519095B (en) A kind of dynamic message method for pushing and its system, server-side, client
US20030110239A1 (en) Application distribution system, application distribution method, and application distribution program
CN110430275A (en) Data processing method, system, calculates equipment and medium at device
US8230448B2 (en) Methods, systems and computer program products for web service interaction with a resource management system
US20080109524A1 (en) Method and system for dynamically specifying a format for data provided by a web service invocation
US10997376B2 (en) Electronic message translation management
US20040133633A1 (en) Method and apparatus for adaptive client communications
US20100011374A1 (en) Open framework system for heterogeneous computing and service integration
CN113826424A (en) Entity for providing external services to a network
US20200228478A1 (en) Electronic message control
JP2011138551A (en) Method and device for generating xml-expressed management transactions that include xpath expression
CN109922148B (en) Cross-platform service method, device and system
CN108093041A (en) Single channel VDI proxy servers and implementation method
US20200228389A1 (en) Electronic message adaptation
EP3808151A1 (en) A method of and a device for operating network gateway services in a service based telecommunications system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181211