CN104506584A - Request processing method and request processing device - Google Patents

Request processing method and request processing device Download PDF

Info

Publication number
CN104506584A
CN104506584A CN201410743735.3A CN201410743735A CN104506584A CN 104506584 A CN104506584 A CN 104506584A CN 201410743735 A CN201410743735 A CN 201410743735A CN 104506584 A CN104506584 A CN 104506584A
Authority
CN
China
Prior art keywords
sub
services system
services
request
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410743735.3A
Other languages
Chinese (zh)
Other versions
CN104506584B (en
Inventor
郝学武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHANJET INFORMATION TECHNOLOGY Co Ltd
Original Assignee
CHANJET INFORMATION TECHNOLOGY 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 CHANJET INFORMATION TECHNOLOGY Co Ltd filed Critical CHANJET INFORMATION TECHNOLOGY Co Ltd
Priority to CN201410743735.3A priority Critical patent/CN104506584B/en
Publication of CN104506584A publication Critical patent/CN104506584A/en
Application granted granted Critical
Publication of CN104506584B publication Critical patent/CN104506584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a request processing method and a request processing device. The request processing method comprises the following steps: receiving a request from a terminal through an application interface of an application layer of a server; calling a target service subsystem from a plurality of service subsystems of the server to process the request according to service system information included in the request, wherein the multiple service subsystems are independent of each other, and the target service subsystem is at least one service subsystem in multiple service subsystems. Through the technical scheme, a data integration mode can be broken, and each subsystem can be integrated without using data as the center, so the code of each subsystem is reduced, and the maintenance efficiency, the safety and the extensibility of the subsystem are improved.

Description

Request processing method and request processing unit
Technical field
The present invention relates to request processing technology field, in particular to a kind of request processing method and a kind of request processing unit.
Background technology
Current system generally all adopts data integration, and data integration is a kind of more traditional system integration mode, and its center is data.Such as transaction system can operate order table and subscriber's meter to generate order.And SMS notification system also can access order table and subscriber's meter, send different notes to notify different users according to the state of order: such as send out some advertising campaign notes to the user that the order that the amount of money is larger is corresponding, send short messages to the user of some backlogs and remind it to complete order.A kind of data integration mode that Here it is, but transaction system and SMS notification system all rely on order table and subscriber's meter to carry out integrated, and the advantage of this integration mode is to realize simply, and shortcoming is:
Because multiple system all accesses same several the tables of same database, therefore, Service Database burden is larger;
Poor stability: outside interface is exposed in HTTP (Hyper Text Transfer Protocol, HTML (Hypertext Markup Language)) mode by each system, the fail safe of interface is poor;
Scaling concern: if want order table to move away from RDBMS (RelationalDatabase Management System) may be just so easy for transaction system later, because also have a lot of other system also to rely on this order table, be really pull one hair and move the whole body; Or each system may be decided without authorization to table increase and decrease field, and brings bad consequence;
Code repeats: if transaction system and SMS notification system are developed by the team of two different departments, Dao (Data AccessObject, DAO), Cache (high level cache memory), Service (service) code for order table and subscriber's meter can be had in so each system.
In a word, the code of existing data integration is numerous and jumbled, and understand difficulty, new person's left-hand seat is also difficult; Difficult in maintenance, need the people safeguarded many, Team Management's cost is high, and team efficiency is lower; System starts general slower; Continue to dispose difficulty: little change each time all needs to redeploy whole application; Technology stack is solidified: the cost of attempting new technology is too high; Expansion difficulty: apply some part inclined IO intensity, but CPU is intensive partially for some part, but application is only deployed on a machine, is difficult to meet with single hardware apply each several part to the different requirements of hardware resource.
Therefore, how to break data integration pattern, no longer data-centered integrated subsystems, to reduce the code of subsystems, improve the maintenance efficiency of subsystem, fail safe and autgmentability, become problem demanding prompt solution.
Summary of the invention
The present invention is just based on above-mentioned technical problem, propose a kind of new technical scheme, data integration pattern can be broken, no longer data-centered integrated subsystems, to reduce the code of subsystems, improve the maintenance efficiency of subsystem, fail safe and autgmentability.
In view of this, an aspect of of the present present invention proposes a kind of request processing method, for server, comprising: the request receiving self terminal by the application interface of the application layer of described server; According to the service system information that described request comprises, from multiple sub-services systems of described server, invocation target sub-services system is with processes said request, wherein, described multiple sub-services system is independent mutually, and described target sub-services system is at least one the sub-services system in described multiple sub-services system.
In this technical scheme, because the multiple sub-services systems in server are independent mutually, not coupling, therefore, after the application interface of the application layer of server receives the request of terminal, according to the service system information of asking comprise, one or more separate sub-services system and target sub-services system can be called from multiple sub-services systems of server, to respond this request fast, improve the experience of user; And due to multiple sub-services system independence mutually, storage is not had to be mutually related data, it is a holonomic system that can independently dispose, therefore, server is when receiving different requests and call different subsystems, other subsystems can not be involved, this can break data integration pattern, make subsystems no longer data-centered integrated, in addition, because subsystems is absolute coding, size of code is few and simple, therefore, maintenance efficiency and the autgmentability of subsystem can be improved by the present invention.Such as: former building ring service is all put into a web engineering, then can be split into coil subsystem, relational system, Commentary Systems by the present invention, praise system, reporting system, Accounting system, system etc. is set, subsystems then externally can provide service independently, externally can provide service by application layer assembling.
In technique scheme, preferably, described server comprises configuration center, for the configuration information corresponding stored by each sub-services system in described service system information and described multiple sub-services system, described configuration information comprises: the internet protocol address of each described sub-services system, the remote procedure call protocol interface of each described sub-services system, the path of each described sub-services system, at least one information in service list under the path of each described sub-services system, described service system information comprises the path of described target sub-services system and/or the service list of described target sub-services system, and, each sub-services system in described multiple sub-services system includes remote procedure call protocol interface.
In this technical scheme, configuration center is by carrying out corresponding stored by after the configuration information of each sub-services system and the service system Information encapsulation of terminal, be convenient to according to the request of terminal be terminal rapidly, call different sub-services systems exactly, simultaneously, also be convenient to when the configuration information of the sub-services system of server changes (having been increased newly the configuration information of other sub-services systems in the deleted or configuration center of the configuration information as some the sub-services system in configuration center), in time to terminal sending out notice information, delete the service system information of these sub-services systems stored in buffer memory to make terminal in time or in buffer memory, add the service system information of newly-increased sub-services system.
In technique scheme, preferably, described from multiple sub-services systems of described server invocation target sub-services system with processes said request, specifically comprise: after described application layer receives described request, described request is sent to described configuration center, and described configuration center determines described target sub-services system according to the configuration information of the service system information in described request and each described sub-services system; Described configuration center is after determining described target sub-services system, notify target sub-services system described in described application layer, to make described application layer by target sub-services system described in the remote procedure call protocol interface interchange of described target sub-services system, to make described target sub-services service system processes said request.
In this technical scheme, application layer is receiving the request of terminal and after getting the target sub-services system of this request correspondence, can by RPC (the Remote Procedure Call Protocol of each sub-services system in target sub-services system, remote procedure call protocol) these target sub-services systems of interface interchange, with the request of response terminal, wherein, RPC interface is Avro (interface of Data Serialization); Thrift (data type and service interface); Spring_rmi (RMI interface) etc.
In technique scheme, preferably, also comprise: described configuration center sends " heartbeat " request according to predetermined period to each sub-services system in described multiple sub-services system, and judge that " heartbeat " whether received in the first Preset Time from each described sub-services system responds, " heartbeat " do not received in Preset Time described in first if judge from arbitrary described sub-services system responds, then add up the number of times that continuous " heartbeat " not receiving arbitrary described sub-services system responds in the second Preset Time, and when described number of times is greater than preset times, described configuration center deletes the configuration information of arbitrary described sub-services system, and described configuration center is after the configuration information deleting arbitrary described sub-services system, notifies described terminal, with the described service system information making described terminal deletion corresponding with described configuration information.
In this technical scheme, configuration center can send " heartbeat " request according to predetermined period to each sub-services system in multiple sub-services system, whether abnormal to judge the state of each sub-services system, if arbitrary sub-services system does not respond " heartbeat " request of configuration center in the first Preset Time, and continuous several times does not respond " heartbeat " request of configuration center in the second Preset Time, then configuration center will judge the abnormal state of this sub-services system, automatically the configuration information of this sub-services system can be deleted, and this sub-services system of notification terminal is removed, also from local cache, the service system information corresponding with this configuration information is deleted to make terminal, avoid again sending to server the solicited message making this sub-services system process request.In addition, because each sub-services system is independent mutually, storage is not had to be mutually related data, it is a holonomic system that can independently dispose, therefore, configuration center, deleting the corresponding service system information of this configuration information, also can not have influence on other sub-services system, avoid the situation occurring pulling one hair and move the whole body.
In technique scheme, preferably, also comprise: described configuration center, when receiving configuration information and adding order, adds new configuration information, and notify described terminal, add the new service system information corresponding with described new configuration information to make described terminal.
In this technical scheme, because each sub-services system is independent mutually, therefore, developer freely can add the configuration information of the sub-services system that will increase newly in configuration center, and configuration center is after adding new configuration information, meeting notification terminal in time, server upon receiving the request, can the new service system information corresponding with this newly-increased configuration information be added in local cache, like this, when terminal sends request to server again, corresponding service system information will be selected from the local cache comprising this new service system information according to preset algorithm, then terminal is made to call the target sub-services system corresponding with this service system information, to respond this request fast.In addition, because each sub-services system is independent mutually, size of code is little, be therefore convenient to upgrading, safeguard, and developer also can use different programming languages to write different sub-services systems according to actual conditions.
Another aspect of the present invention proposes a kind of request processing unit, for server, comprising: receiving element, receives the request of self terminal by the application interface of the application layer of described server; Call unit, according to the service system information that described request comprises, from multiple sub-services systems of described server, invocation target sub-services system is with processes said request, wherein, described multiple sub-services system is independent mutually, and described target sub-services system is at least one the sub-services system in described multiple sub-services system.
In this technical scheme, because the multiple sub-services systems in server are independent mutually, not coupling, therefore, after the application interface of the application layer of server receives the request of terminal, according to the service system information of asking comprise, one or more separate sub-services system and target sub-services system can be called from multiple sub-services systems of server, to respond this request fast, improve the experience of user; And due to multiple sub-services system independence mutually, storage is not had to be mutually related data, it is a holonomic system that can independently dispose, therefore, server is when receiving different requests and call different subsystems, other subsystems can not be involved, this can break data integration pattern, make subsystems no longer data-centered integrated, in addition, because subsystems is absolute coding, size of code is few and simple, therefore, maintenance efficiency and the autgmentability of subsystem can be improved by the present invention.Such as: former building ring service is all put into a web engineering, then can be split into coil subsystem, relational system, Commentary Systems by the present invention, praise system, reporting system, Accounting system, system etc. is set, subsystems then externally can provide service independently, externally can provide service by application layer assembling.
In technique scheme, preferably, described server comprises configuration center, for the configuration information corresponding stored by each sub-services system in described service system information and described multiple sub-services system, wherein, described configuration information comprises: the internet protocol address of each described sub-services system, the remote procedure call protocol interface of each described sub-services system, the path of each described sub-services system, at least one information in service list under the path of each described sub-services system, described service system information comprises the path of described target sub-services system and/or the service list of described target sub-services system, and, each sub-services system in described multiple sub-services system includes remote procedure call protocol interface.
In this technical scheme, configuration center is by carrying out corresponding stored by after the configuration information of each sub-services system and the service system Information encapsulation of terminal, be convenient to according to the request of terminal be terminal rapidly, call different sub-services systems exactly, simultaneously, also be convenient to when the configuration information of the sub-services system of server changes (having been increased newly the configuration information of other sub-services systems in the deleted or configuration center of the configuration information as some the sub-services system in configuration center), in time to terminal sending out notice information, delete the service system information of these sub-services systems stored in buffer memory to make terminal in time or in buffer memory, add the service system information of newly-increased sub-services system.
In technique scheme, preferably, described call unit specifically for: after described application layer receives described request, described request is sent to described configuration center, determines described target sub-services system to make described configuration center according to the configuration information of the service system information in described request and each described sub-services system; And after the heart determines described target sub-services system in the configuration, notify target sub-services system described in described application layer, to make described application layer by target sub-services system described in the remote procedure call protocol interface interchange of described target sub-services system, to make described target sub-services service system processes said request.
In this technical scheme, application layer is receiving the request of terminal and after getting the target sub-services system of this request correspondence, can by RPC (the Remote Procedure Call Protocol of each sub-services system in target sub-services system, remote procedure call protocol) these target sub-services systems of interface interchange, with the request of response terminal, wherein, RPC interface is Avro (interface of Data Serialization); Thrift (data type and service interface); Spring_rmi (RMI interface) etc.
In technique scheme, preferably, also comprise: transmitting element, " heartbeat " request is sent according to predetermined period to each sub-services system in described multiple sub-services system by described configuration center, judging unit, judge that " heartbeat " whether received in the first Preset Time from each described sub-services system responds, statistic unit, " heartbeat " do not received in Preset Time described in first if judge from arbitrary described sub-services system responds, then add up the number of times that continuous " heartbeat " not receiving arbitrary described sub-services system responds in the second Preset Time, delete cells, when described number of times is greater than preset times, the configuration information of arbitrary described sub-services system is deleted by described configuration center, and notification unit, after the heart deletes the configuration information of arbitrary described sub-services system in the configuration, notify described terminal, with the described service system information making described terminal deletion corresponding with described configuration information.
In this technical scheme, configuration center can send " heartbeat " request according to predetermined period to each sub-services system in multiple sub-services system, whether abnormal to judge the state of each sub-services system, if arbitrary sub-services system does not respond " heartbeat " request of configuration center in the first Preset Time, and continuous several times does not respond " heartbeat " request of configuration center in the second Preset Time, then configuration center will judge the abnormal state of this sub-services system, automatically the configuration information of this sub-services system can be deleted, and this sub-services system of notification terminal is removed, also from local cache, the service system information corresponding with this configuration information is deleted to make terminal, avoid again sending to server the solicited message making this sub-services system process request.In addition, because each sub-services system is independent mutually, storage is not had to be mutually related data, it is a holonomic system that can independently dispose, therefore, configuration center, deleting the corresponding service system information of this configuration information, also can not have influence on other sub-services system, avoid the situation occurring pulling one hair and move the whole body.
In technique scheme, preferably, also comprise: adding device, when the heart receives configuration information interpolation order in the configuration, new configuration information is added to described configuration center, and notify described terminal, add the new service system information corresponding with described new configuration information to make described terminal.
In this technical scheme, because each sub-services system is independent mutually, therefore, developer freely can add the configuration information of the sub-services system that will increase newly in configuration center, and configuration center is after adding new configuration information, meeting notification terminal in time, server upon receiving the request, can the new service system information corresponding with this newly-increased configuration information be added in local cache, like this, when terminal sends request to server again, corresponding service system information will be selected from the local cache comprising this new service system information according to preset algorithm, then terminal is made to call the target sub-services system corresponding with this service system information, to respond this request fast.In addition, because each sub-services system is independent mutually, size of code is little, be therefore convenient to upgrading, safeguard, and developer also can use different programming languages to write different sub-services systems according to actual conditions.
By technique scheme, data integration pattern can be broken, no longer data-centered integrated subsystems, to reduce the code of subsystems, improve the maintenance efficiency of subsystem, fail safe and autgmentability.
Accompanying drawing explanation
Fig. 1 shows the schematic flow sheet of request processing method according to an embodiment of the invention;
Fig. 2 shows the structural representation of asking processing unit according to an embodiment of the invention.
Embodiment
In order to more clearly understand above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments, the present invention is further described in detail.It should be noted that, when not conflicting, the feature in the embodiment of the application and embodiment can combine mutually.
Set forth a lot of detail in the following description so that fully understand the present invention; but; the present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention is not by the restriction of following public specific embodiment.
Fig. 1 shows the schematic flow sheet of request processing method according to an embodiment of the invention.
As shown in Figure 1, request processing method according to an embodiment of the invention, comprising: step 102, receives the request of self terminal by the application interface of the application layer of described server; Step 104, according to the service system information that described request comprises, from multiple sub-services systems of described server, invocation target sub-services system is with processes said request, wherein, described multiple sub-services system is independent mutually, and described target sub-services system is at least one the sub-services system in described multiple sub-services system.
In this technical scheme, because the multiple sub-services systems in server are independent mutually, not coupling, therefore, after the application interface of the application layer of server receives the request of terminal, according to the service system information of asking comprise, one or more separate sub-services system and target sub-services system can be called from multiple sub-services systems of server, to respond this request fast, improve the experience of user; And due to multiple sub-services system independence mutually, storage is not had to be mutually related data, it is a holonomic system that can independently dispose, therefore, server is when receiving different requests and call different subsystems, other subsystems can not be involved, this can break data integration pattern, make subsystems no longer data-centered integrated, in addition, because subsystems is absolute coding, size of code is few and simple, therefore, maintenance efficiency and the autgmentability of subsystem can be improved by the present invention.Such as: former building ring service is all put into a web engineering, then can be split into coil subsystem, relational system, Commentary Systems by the present invention, praise system, reporting system, Accounting system, system etc. is set, subsystems then externally can provide service independently, externally can provide service by application layer assembling.
In technique scheme, preferably, described server comprises configuration center, for the configuration information corresponding stored by each sub-services system in described service system information and described multiple sub-services system, described configuration information comprises: the internet protocol address of each described sub-services system, the remote procedure call protocol interface of each described sub-services system, the path of each described sub-services system, at least one information in service list under the path of each described sub-services system, described service system information comprises the path of described target sub-services system and/or the service list of described target sub-services system, and, each sub-services system in described multiple sub-services system includes remote procedure call protocol interface.
In this technical scheme, configuration center is by carrying out corresponding stored by after the configuration information of each sub-services system and the service system Information encapsulation of terminal, be convenient to according to the request of terminal be terminal rapidly, call different sub-services systems exactly, simultaneously, also be convenient to when the configuration information of the sub-services system of server changes (having been increased newly the configuration information of other sub-services systems in the deleted or configuration center of the configuration information as some the sub-services system in configuration center), in time to terminal sending out notice information, delete the service system information of these sub-services systems stored in buffer memory to make terminal in time or in buffer memory, add the service system information of newly-increased sub-services system.
In technique scheme, preferably, described from multiple sub-services systems of described server invocation target sub-services system with processes said request, specifically comprise: after described application layer receives described request, described request is sent to described configuration center, and described configuration center determines described target sub-services system according to the configuration information of the service system information in described request and each described sub-services system; Described configuration center is after determining described target sub-services system, notify target sub-services system described in described application layer, to make described application layer by target sub-services system described in the remote procedure call protocol interface interchange of described target sub-services system, to make described target sub-services service system processes said request.
In this technical scheme, application layer is receiving the request of terminal and after getting the target sub-services system of this request correspondence, can by RPC (the Remote Procedure Call Protocol of each sub-services system in target sub-services system, remote procedure call protocol) these target sub-services systems of interface interchange, with the request of response terminal, wherein, RPC interface is Avro (interface of Data Serialization); Thrift (data type and service interface); Spring_rmi (RMI interface) etc.
In technique scheme, preferably, also comprise: described configuration center sends " heartbeat " request according to predetermined period to each sub-services system in described multiple sub-services system, and judge that " heartbeat " whether received in the first Preset Time from each described sub-services system responds, " heartbeat " do not received in Preset Time described in first if judge from arbitrary described sub-services system responds, then add up the number of times that continuous " heartbeat " not receiving arbitrary described sub-services system responds in the second Preset Time, and when described number of times is greater than preset times, described configuration center deletes the configuration information of arbitrary described sub-services system, and described configuration center is after the configuration information deleting arbitrary described sub-services system, notifies described terminal, with the described service system information making described terminal deletion corresponding with described configuration information.
In this technical scheme, configuration center can send " heartbeat " request according to predetermined period to each sub-services system in multiple sub-services system, whether abnormal to judge the state of each sub-services system, if arbitrary sub-services system does not respond " heartbeat " request of configuration center in the first Preset Time, and continuous several times does not respond " heartbeat " request of configuration center in the second Preset Time, then configuration center will judge the abnormal state of this sub-services system, automatically the configuration information of this sub-services system can be deleted, and this sub-services system of notification terminal is removed, also from local cache, the service system information corresponding with this configuration information is deleted to make terminal, avoid again sending to server the solicited message making this sub-services system process request.In addition, because each sub-services system is independent mutually, storage is not had to be mutually related data, it is a holonomic system that can independently dispose, therefore, configuration center, deleting the corresponding service system information of this configuration information, also can not have influence on other sub-services system, avoid the situation occurring pulling one hair and move the whole body.
In technique scheme, preferably, also comprise: described configuration center, when receiving configuration information and adding order, adds new configuration information, and notify described terminal, add the new service system information corresponding with described new configuration information to make described terminal.
In this technical scheme, because each sub-services system is independent mutually, therefore, developer freely can add the configuration information of the sub-services system that will increase newly in configuration center, and configuration center is after adding new configuration information, meeting notification terminal in time, server upon receiving the request, can the new service system information corresponding with this newly-increased configuration information be added in local cache, like this, when terminal sends request to server again, corresponding service system information will be selected from the local cache comprising this new service system information according to preset algorithm, then terminal is made to call the target sub-services system corresponding with this service system information, to respond this request fast.In addition, because each sub-services system is independent mutually, size of code is little, be therefore convenient to upgrading, safeguard, and developer also can use different programming languages to write different sub-services systems according to actual conditions.
Fig. 2 shows the structural representation of asking processing unit according to an embodiment of the invention.
As shown in Figure 2, ask processing unit 200 according to an embodiment of the invention, comprising: receiving element 202, receive the request of self terminal by the application interface of the application layer of described server; Call unit 204, according to the service system information that described request comprises, from multiple sub-services systems of described server, invocation target sub-services system is with processes said request, wherein, described multiple sub-services system is independent mutually, and described target sub-services system is at least one the sub-services system in described multiple sub-services system.
In this technical scheme, because the multiple sub-services systems in server are independent mutually, not coupling, therefore, after the application interface of the application layer of server receives the request of terminal, according to the service system information of asking comprise, one or more separate sub-services system and target sub-services system can be called from multiple sub-services systems of server, to respond this request fast, improve the experience of user; And due to multiple sub-services system independence mutually, storage is not had to be mutually related data, it is a holonomic system that can independently dispose, therefore, server is when receiving different requests and call different subsystems, other subsystems can not be involved, this can break data integration pattern, make subsystems no longer data-centered integrated, in addition, because subsystems is absolute coding, size of code is few and simple, therefore, maintenance efficiency and the autgmentability of subsystem can be improved by the present invention.Such as: former building ring service is all put into a web engineering, then can be split into coil subsystem, relational system, Commentary Systems by the present invention, praise system, reporting system, Accounting system, system etc. is set, subsystems then externally can provide service independently, externally can provide service by application layer assembling.
In technique scheme, preferably, described server comprises configuration center, for the configuration information corresponding stored by each sub-services system in described service system information and described multiple sub-services system, wherein, described configuration information comprises: the internet protocol address of each described sub-services system, the remote procedure call protocol interface of each described sub-services system, the path of each described sub-services system, at least one information in service list under the path of each described sub-services system, described service system information comprises the path of described target sub-services system and/or the service list of described target sub-services system, and, each sub-services system in described multiple sub-services system includes remote procedure call protocol interface.
In this technical scheme, configuration center is by carrying out corresponding stored by after the configuration information of each sub-services system and the service system Information encapsulation of terminal, be convenient to according to the request of terminal be terminal rapidly, call different sub-services systems exactly, simultaneously, also be convenient to when the configuration information of the sub-services system of server changes (having been increased newly the configuration information of other sub-services systems in the deleted or configuration center of the configuration information as some the sub-services system in configuration center), in time to terminal sending out notice information, delete the service system information of these sub-services systems stored in buffer memory to make terminal in time or in buffer memory, add the service system information of newly-increased sub-services system.
In technique scheme, preferably, described call unit 204 specifically for: after described application layer receives described request, described request is sent to described configuration center, determines described target sub-services system to make described configuration center according to the configuration information of the service system information in described request and each described sub-services system; And after the heart determines described target sub-services system in the configuration, notify target sub-services system described in described application layer, to make described application layer by target sub-services system described in the remote procedure call protocol interface interchange of described target sub-services system, to make described target sub-services service system processes said request.
In this technical scheme, application layer is receiving the request of terminal and after getting the target sub-services system of this request correspondence, can by RPC (the Remote Procedure Call Protocol of each sub-services system in target sub-services system, remote procedure call protocol) these target sub-services systems of interface interchange, with the request of response terminal, wherein, RPC interface is Avro (interface of Data Serialization); Thrift (data type and service interface); Spring_rmi (RMI interface) etc.
In technique scheme, preferably, also comprise: transmitting element 206, " heartbeat " request is sent according to predetermined period to each sub-services system in described multiple sub-services system by described configuration center, judging unit 208, judge that " heartbeat " whether received in the first Preset Time from each described sub-services system responds, statistic unit 210, " heartbeat " do not received in Preset Time described in first if judge from arbitrary described sub-services system responds, then add up the number of times that continuous " heartbeat " not receiving arbitrary described sub-services system responds in the second Preset Time, delete cells 212, when described number of times is greater than preset times, the configuration information of arbitrary described sub-services system is deleted by described configuration center, and notification unit 214, after the heart deletes the configuration information of arbitrary described sub-services system in the configuration, notify described terminal, with the described service system information making described terminal deletion corresponding with described configuration information.
In this technical scheme, configuration center can send " heartbeat " request according to predetermined period to each sub-services system in multiple sub-services system, whether abnormal to judge the state of each sub-services system, if arbitrary sub-services system does not respond " heartbeat " request of configuration center in the first Preset Time, and continuous several times does not respond " heartbeat " request of configuration center in the second Preset Time, then configuration center will judge the abnormal state of this sub-services system, automatically the configuration information of this sub-services system can be deleted, and this sub-services system of notification terminal is removed, also from local cache, the service system information corresponding with this configuration information is deleted to make terminal, avoid again sending to server the solicited message making this sub-services system process request.In addition, because each sub-services system is independent mutually, storage is not had to be mutually related data, it is a holonomic system that can independently dispose, therefore, configuration center, deleting the corresponding service system information of this configuration information, also can not have influence on other sub-services system, avoid the situation occurring pulling one hair and move the whole body.
In technique scheme, preferably, also comprise: adding device 216, when the heart receives configuration information interpolation order in the configuration, new configuration information is added to described configuration center, and notify described terminal, add the new service system information corresponding with described new configuration information to make described terminal.
In this technical scheme, because each sub-services system is independent mutually, therefore, developer freely can add the configuration information of the sub-services system that will increase newly in configuration center, and configuration center is after adding new configuration information, meeting notification terminal in time, server upon receiving the request, can the new service system information corresponding with this newly-increased configuration information be added in local cache, like this, when terminal sends request to server again, corresponding service system information will be selected from the local cache comprising this new service system information according to preset algorithm, then terminal is made to call the target sub-services system corresponding with this service system information, to respond this request fast.In addition, because each sub-services system is independent mutually, size of code is little, be therefore convenient to upgrading, safeguard, and developer also can use different programming languages to write different sub-services systems according to actual conditions.
More than be described with reference to the accompanying drawings technical scheme of the present invention, by technical scheme of the present invention, data integration pattern can be broken, no longer data-centered integrated subsystems, to reduce the code of subsystems, improve the maintenance efficiency of subsystem, fail safe and autgmentability.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. a request processing method, for server, is characterized in that, comprising:
The request of self terminal is received by the application interface of the application layer of described server;
According to the service system information that described request comprises, from multiple sub-services systems of described server, invocation target sub-services system is with processes said request, wherein, described multiple sub-services system is independent mutually, and described target sub-services system is at least one the sub-services system in described multiple sub-services system.
2. request processing method according to claim 1, is characterized in that,
Described server comprises configuration center, for the configuration information corresponding stored by each sub-services system in described service system information and described multiple sub-services system, described configuration information comprises: the internet protocol address of each described sub-services system, the remote procedure call protocol interface of each described sub-services system, the path of each described sub-services system, at least one information in service list under the path of each described sub-services system, described service system information comprises the path of described target sub-services system and/or the service list of described target sub-services system, and,
Each sub-services system in described multiple sub-services system includes remote procedure call protocol interface.
3. request processing method according to claim 2, is characterized in that,
Described from multiple sub-services systems of described server invocation target sub-services system with processes said request, specifically comprise:
After described application layer receives described request, described request is sent to described configuration center, described configuration center determines described target sub-services system according to the configuration information of the service system information in described request and each described sub-services system;
Described configuration center is after determining described target sub-services system, notify target sub-services system described in described application layer, to make described application layer by target sub-services system described in the remote procedure call protocol interface interchange of described target sub-services system, to make described target sub-services service system processes said request.
4. request processing method according to any one of claim 1 to 3, is characterized in that, also comprises:
Described configuration center sends " heartbeat " request according to predetermined period to each sub-services system in described multiple sub-services system, and judge that " heartbeat " whether received in the first Preset Time from each described sub-services system responds, " heartbeat " do not received in Preset Time described in first if judge from arbitrary described sub-services system responds, then add up the number of times that continuous " heartbeat " not receiving arbitrary described sub-services system responds in the second Preset Time, and when described number of times is greater than preset times, described configuration center deletes the configuration information of arbitrary described sub-services system, and
Described configuration center, after the configuration information deleting arbitrary described sub-services system, notifies described terminal, with the described service system information making described terminal deletion corresponding with described configuration information.
5. request processing method according to claim 4, is characterized in that, also comprises:
Described configuration center, when receiving configuration information and adding order, adds new configuration information, and notifies described terminal, adds the new service system information corresponding with described new configuration information to make described terminal.
6. a request processing unit, for server, is characterized in that, comprising:
Receiving element, receives the request of self terminal by the application interface of the application layer of described server;
Call unit, according to the service system information that described request comprises, from multiple sub-services systems of described server, invocation target sub-services system is with processes said request, wherein, described multiple sub-services system is independent mutually, and described target sub-services system is at least one the sub-services system in described multiple sub-services system.
7. request processing unit according to claim 6, is characterized in that,
Described server comprises configuration center, for the configuration information corresponding stored by each sub-services system in described service system information and described multiple sub-services system, wherein, described configuration information comprises: the internet protocol address of each described sub-services system, the remote procedure call protocol interface of each described sub-services system, the path of each described sub-services system, at least one information in service list under the path of each described sub-services system, described service system information comprises the path of described target sub-services system and/or the service list of described target sub-services system, and,
Each sub-services system in described multiple sub-services system includes remote procedure call protocol interface.
8. request processing unit according to claim 7, is characterized in that,
Described call unit specifically for:
After described application layer receives described request, described request is sent to described configuration center, determines described target sub-services system to make described configuration center according to the configuration information of the service system information in described request and each described sub-services system; And
After the heart determines described target sub-services system in the configuration, notify target sub-services system described in described application layer, to make described application layer by target sub-services system described in the remote procedure call protocol interface interchange of described target sub-services system, to make described target sub-services service system processes said request.
9. the request processing unit according to any one of claim 6 to 8, is characterized in that, also comprise:
Transmitting element, sends " heartbeat " request according to predetermined period to each sub-services system in described multiple sub-services system by described configuration center,
Judging unit, judges that " heartbeat " whether received in the first Preset Time from each described sub-services system responds,
Statistic unit, " heartbeat " do not received in Preset Time described in first if judge from arbitrary described sub-services system responds, then add up the number of times that continuous " heartbeat " not receiving arbitrary described sub-services system responds in the second Preset Time,
Delete cells, when described number of times is greater than preset times, deletes the configuration information of arbitrary described sub-services system by described configuration center, and
Notification unit, after the heart deletes the configuration information of arbitrary described sub-services system in the configuration, notifies described terminal, with the described service system information making described terminal deletion corresponding with described configuration information.
10. request processing unit according to claim 9, is characterized in that, also comprise:
Adding device, when the heart receives configuration information interpolation order in the configuration, adds new configuration information to described configuration center, and notifies described terminal, add the new service system information corresponding with described new configuration information to make described terminal.
CN201410743735.3A 2014-12-08 2014-12-08 Request processing method and request processing unit Active CN104506584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410743735.3A CN104506584B (en) 2014-12-08 2014-12-08 Request processing method and request processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410743735.3A CN104506584B (en) 2014-12-08 2014-12-08 Request processing method and request processing unit

Publications (2)

Publication Number Publication Date
CN104506584A true CN104506584A (en) 2015-04-08
CN104506584B CN104506584B (en) 2018-06-22

Family

ID=52948299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410743735.3A Active CN104506584B (en) 2014-12-08 2014-12-08 Request processing method and request processing unit

Country Status (1)

Country Link
CN (1) CN104506584B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852931A (en) * 2015-06-12 2015-08-19 北京京东尚科信息技术有限公司 Communication method and device
CN106936937A (en) * 2015-12-29 2017-07-07 阿里巴巴集团控股有限公司 For the implementation method and device of the general-purpose interface of Internet service interaction
CN106960335A (en) * 2017-03-28 2017-07-18 中国建设银行股份有限公司 System outer call method, device and communication system
CN109257337A (en) * 2018-08-28 2019-01-22 科大国创软件股份有限公司 Internet of things equipment method for converting protocol and lamp stand operation platform based on this method
CN109391588A (en) * 2017-08-04 2019-02-26 北京国双科技有限公司 Request processing method and device
CN109391589A (en) * 2017-08-04 2019-02-26 北京国双科技有限公司 Request processing method and device
CN110622570A (en) * 2017-06-14 2019-12-27 摩托罗拉移动有限责任公司 Performing contention resolution for system information requests
CN111371631A (en) * 2018-12-25 2020-07-03 成都鼎桥通信技术有限公司 Heartbeat mechanism detection method, terminal device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040221065A1 (en) * 2003-04-30 2004-11-04 International Business Machines Corporation Apparatus and method for dynamic sharing of server network interface resources
CN102333067A (en) * 2010-07-14 2012-01-25 蔡权伟 Omnibearing diversified financial information service system and transaction and information inquiry method
CN102413181A (en) * 2011-11-16 2012-04-11 中国软件与技术服务股份有限公司 Method and system for improving performance of server
CN103391278A (en) * 2012-05-11 2013-11-13 杨雪 Method and system for terminals to connect server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040221065A1 (en) * 2003-04-30 2004-11-04 International Business Machines Corporation Apparatus and method for dynamic sharing of server network interface resources
CN102333067A (en) * 2010-07-14 2012-01-25 蔡权伟 Omnibearing diversified financial information service system and transaction and information inquiry method
CN102413181A (en) * 2011-11-16 2012-04-11 中国软件与技术服务股份有限公司 Method and system for improving performance of server
CN103391278A (en) * 2012-05-11 2013-11-13 杨雪 Method and system for terminals to connect server

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852931B (en) * 2015-06-12 2019-02-01 北京京东尚科信息技术有限公司 A kind of communication means and device
CN104852931A (en) * 2015-06-12 2015-08-19 北京京东尚科信息技术有限公司 Communication method and device
CN106936937A (en) * 2015-12-29 2017-07-07 阿里巴巴集团控股有限公司 For the implementation method and device of the general-purpose interface of Internet service interaction
CN106936937B (en) * 2015-12-29 2020-09-08 阿里巴巴集团控股有限公司 Method and device for realizing universal interface for internet service interaction
CN106960335A (en) * 2017-03-28 2017-07-18 中国建设银行股份有限公司 System outer call method, device and communication system
CN110622570A (en) * 2017-06-14 2019-12-27 摩托罗拉移动有限责任公司 Performing contention resolution for system information requests
CN110622570B (en) * 2017-06-14 2022-04-12 摩托罗拉移动有限责任公司 Performing contention resolution for system information requests
CN109391589A (en) * 2017-08-04 2019-02-26 北京国双科技有限公司 Request processing method and device
CN109391588A (en) * 2017-08-04 2019-02-26 北京国双科技有限公司 Request processing method and device
CN109391588B (en) * 2017-08-04 2021-03-12 北京国双科技有限公司 Request processing method and device
CN109391589B (en) * 2017-08-04 2021-06-29 北京国双科技有限公司 Request processing method and device
CN109257337A (en) * 2018-08-28 2019-01-22 科大国创软件股份有限公司 Internet of things equipment method for converting protocol and lamp stand operation platform based on this method
CN111371631A (en) * 2018-12-25 2020-07-03 成都鼎桥通信技术有限公司 Heartbeat mechanism detection method, terminal device and storage medium
CN111371631B (en) * 2018-12-25 2022-04-19 成都鼎桥通信技术有限公司 Heartbeat mechanism detection method, terminal device and storage medium

Also Published As

Publication number Publication date
CN104506584B (en) 2018-06-22

Similar Documents

Publication Publication Date Title
CN104506584A (en) Request processing method and request processing device
US11411837B2 (en) Systems and methods for providing notifications of changes in a cloud-based file system
US11847576B2 (en) Methods and system for managing predictive models
AU2019228483B2 (en) Method, apparatus, system, and electronic device for cross-blockchain interaction
JP6533384B2 (en) Question delivery method of question answering platform and question delivery system
US9026659B2 (en) Method and apparatus for supporting scalable multi-modal dialog application sessions
WO2017177830A1 (en) Two-dimensional code-based method and system for seeking ward
CN110515748B (en) Message processing method and related device
KR101885586B1 (en) Apparatus and method for managing microservice
US20160099895A1 (en) System and Method for Alerting a List of Multiple Recipients of a User's Request for Assistance
US10255341B2 (en) Mode switching in high availability disaster recovery (HADR) systems
CN110838071A (en) Policy data processing method and device and server
CN106412078B (en) Accurate information method for pushing, device and system
CN113723061A (en) Data processing method and device based on multi-person collaboration framework
CN107665403A (en) Palm is alarmed and wisdom responding scheduling system and its application method
EP3373608B1 (en) Method and apparatus for acquiring resources
CN108270798A (en) A kind of mobile terminal device safety management system
WO2023208132A1 (en) Api conversion system and access request processing method therefor, and electronic device and medium
CN102917008B (en) A kind of mobile terminal monitored method based on Android platform
TWI531188B (en) Request information processing method and system applied to network architecture
Marimon-Suñol et al. Shared electronic health record in Catalonia, Spain
CN102904742A (en) Operational method and system for executable nodes
CN106534322B (en) Equipment and method for directly responding to bottom layer message
CN103929398A (en) Security information interaction system, device and method
CN107463562A (en) A kind of information processing method, system and server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant