CN103152433A - Distributed server side framework and use, interaction and request processing method thereof - Google Patents
Distributed server side framework and use, interaction and request processing method thereof Download PDFInfo
- Publication number
- CN103152433A CN103152433A CN2013101011403A CN201310101140A CN103152433A CN 103152433 A CN103152433 A CN 103152433A CN 2013101011403 A CN2013101011403 A CN 2013101011403A CN 201310101140 A CN201310101140 A CN 201310101140A CN 103152433 A CN103152433 A CN 103152433A
- Authority
- CN
- China
- Prior art keywords
- message
- framework
- invocation
- procedure
- response
- 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
Links
- 238000003672 processing method Methods 0.000 title claims description 4
- 230000003993 interaction Effects 0.000 title 1
- 238000000034 method Methods 0.000 claims description 45
- 230000004044 response Effects 0.000 claims description 26
- 230000008878 coupling Effects 0.000 claims description 10
- 238000010168 coupling process Methods 0.000 claims description 10
- 238000005859 coupling reaction Methods 0.000 claims description 10
- 238000004458 analytical method Methods 0.000 claims description 6
- 238000005538 encapsulation Methods 0.000 claims description 6
- 230000002452 interceptive effect Effects 0.000 claims description 5
- 230000015572 biosynthetic process Effects 0.000 claims description 4
- 230000000712 assembly Effects 0.000 abstract description 3
- 238000000429 assembly Methods 0.000 abstract description 3
- 238000000926 separation method Methods 0.000 abstract 1
- 238000005516 engineering process Methods 0.000 description 8
- 230000008859 change Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000000243 solution Substances 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention relates to the technical field of a server side, in particular to a distributed server side framework based on message queues for an internet network service system structure. The framework is characterized in that the inversion of control is utilized, and then requests and storage services at a client side are dynamically bound; and on the other hand, the aspect-oriented programming is utilized, and then the separation of application logic assemblies and universal service assemblies is realized, so the flexibility, the portability and the extendibility of the framework are greatly improved. The framework has the advantages that the problem of poor universality and extendibility due to the customizing of the existing server side for a foreground client side and a storage interface is solved; and the framework can be widely applied to architectures at the server side.
Description
Technical field
The present invention relates to the service end technical field, particularly a kind of Distributed Services end frame based on message queue of the Internet service architecture.
Background technology
In traditional service end, be all often by foreground client and memory interface customized.Therefore, the versatility of such service end, extensibility are all poor, and the cost compare of safeguarding is high.In case new demand and service occur, will spend many time go to safeguard and revise original code.
Now, the diversification of the quick change of demand and service is more and more general.Originally the single service end of tradition has been difficult to satisfy the demand of society.On the contrary, the service end of general high scalability loose coupling structure will become the main flow of service end technical field gradually.Solving the effective method of aforementioned technical problem is exactly a kind of general skeleton of design, cancels service end to the dependence of foreground client and memory interface, and it is therefrom spun off.
IoC(Inversion of Control), say intuitively, be exactly the relation between the container control program, and in non-traditional realization, directly controlled by program code.This is the concept place of so-called " controlling counter-rotating " namely.IoC also has another one name DI---and " rely on and inject (Dependency Injection) ".Relative IoC, " rely on and inject " described the design concept of IoC more exactly.The so-called dependence injected, and namely the dependence between assembly is determined in the runtime by container, figuratively speaking, namely dynamically certain dependence is injected among assembly by container.From in essence, IoC and DI change into present depending on " container " with the dependence of the relation between assembly and assembly by original dependence " target element ".
AOP (Aspect-Oriented Programming), towards tangent plane programming, the current programming technique that has become a kind of comparative maturity can be used for solving well the intersection focus problem that is distributed in modules in application system.In other words, can realize adding a kind of technology of function to the program dynamic unity in the situation that do not revise source code by precompile mode and runtime dynamic proxy exactly.Its mechanism comes from proxy mode, and it is related that purpose allows object and the relation between object (module and module) not come by code exactly, all by the management of configuration class declaration.
In the control counter-rotating with in the use of tangent plane programming technology, the Spring framework is undoubtedly most typical successful example, is used for management object.
Summary of the invention
One of technical problem that the present invention solves is for portability and the reusable degree of service end assembly low, and the problem of flexibility and extensibility deficiency provides a kind of loose coupling general Distributed Services end frame.Realization is carried out separating of dynamic binding, logic module and Common Services Components to client-requested with stores service, thereby greatly improves flexibility, transplantability and the extensibility of this framework.
Two of the technical problem that the present invention solves is to provide a kind of using method that realizes the Distributed Services end frame that loose coupling is general.
Three of the technical problem that the present invention solves is to provide a kind of Distributed Services end frame that loose coupling is general and interactive mode method between other application and service of realizing.
Four of the technical problem that the present invention solves is to provide a kind of Distributed Services end frame internal request processing method that realizes that loose coupling is general.
The technical scheme that the present invention solves one of technical problem is:
Described framework is made of dynamic dependency binding, Message Processing, the invocation of procedure;
Described dynamic dependency binding comprises the configuration information class and relies on binding class; Locating information, response locating information, four elements of ISP of injecting operation requestor, parameter by dependence dynamically connect, and form a new integral body;
Described Message Processing comprises that message parse and the response after the invocation of procedure before the invocation of procedure encapsulates two modules, and this two module is separated as the applied logic assembly, and Message Processing is carried out in the dependence unification that binding provides according to dynamic dependency;
The described invocation of procedure relates generally to proxy mode, singlet pattern and reflection and calls; Proxy mode is respectively general-purpose interface, agency, real object, and agency, real object are realized same interface, with the attribute of real object as the agency, openly acts on behalf of to client; When client call was acted on behalf of, the agency called in conjunction with reflection, calls the real object method, provided relevant service after before calling.
Two the technical scheme that the present invention solves technical problem is: after the locating information of the dependence between solicit operation and method of servicing and parameter all is written to the configuration information of framework, service end is the message resolution module of the part of the Message Processing take request message as the parameter call framework just, returns to analysis result; The invocation of procedure part of service end take analysis result as the parameter call framework, corresponding method of servicing is called in reflection, returns and calls result; Service end is returned to response results to call result as the response package module of the Message Processing part of parameter call framework; Each part of framework can read configuration information automatically, thereby makes correct processing.
Three the technical scheme that the present invention solves technical problem is: the loose coupling interactive mode that adopts asynchronous message; When client need to be called service, to message center transmit operation message, the message subscribing client is obtained message from formation, the message subscribing client encapsulates this three steps by Interface realization message parse, the invocation of procedure and the response of calling this framework, at last the response of returning in framework is sent it back message center.
Four the technical scheme that the present invention solves technical problem is: request message is first resolved through the message resolution module of Message Processing part, give the invocation of procedure after resolving and partly call the respective service interface, to call again result and give the response package module of Message Processing part, result is packaged into request institute wants the form that obtains, return at last the response results after encapsulation; In addition, provide the dependence configuration information by dynamic dependency binding part to other two parts.
The present invention is based on the thinking of generic service end message call framework, service end is spun off pattern one to one from tradition, become the programming framework of the general loose coupling structure of a kind of light-type.The technology that this framework provides a kind of " Message Processing and the invocation of procedure " is carried out unified Message Processing and the invocation of procedure in a kind of general mode to dissimilar operation information.And can revise dynamically the dependence between request and service, make service end can respond rapidly different demand changes.Aspect framework, improved portability and the reusable degree of assembly, inject the machine-processed dependence that has alleviated between assembly because rely on; Aspect realizing, programming that can be more succinct realizes.Framework of the present invention not only can management object, can also be used to do message parse, carries out the work such as distributed process calls, and belongs to a distributed programming framework.The main feature of this framework of the present invention and method is: decoupling zero mainly contains the embodiment of two forms:
First embodiment is: between the various piece in framework, comprise between the core classes code of framework and between the framework platform at framework and place, form a kind of structure of loose coupling as far as possible, make framework that more flexibility be arranged, thereby replace certain layer and do not affect overall architecture if reach.
Second embodiment is: the decoupling zero of the upper layer application system at framework and its place.
Aspect the embodiment that realizes these two kinds of forms, the decoupling zero between the class of framework inside mainly realizes by the technology that control is reversed, and the decoupling zero of framework and upper layer application system realizes by the technology towards tangent plane.
The configuration of this framework by " dynamic dependency binding " this part defines tangent plane one by one, just belong to towards the enhancing of cutting into slices in programming as for " Message Processing " part, actual logic during he has defined tangent plane is such as the actual code of message parse and response encapsulation.In " invocation of procedure " part, carry out the tangent plane logic by the agency at last, wherein the agency refers to the agent object of practical business object.
Description of drawings
The present invention is further described below in conjunction with accompanying drawing:
Fig. 1 is framework overall construction drawing of the present invention;
Fig. 2 is the exchange method block diagram between framework of the present invention and other application and service;
Fig. 3 is the data flow block diagram that framework internal request of the present invention is carried out.
Embodiment
As shown in Figure 1, represented the overall construction drawing of this framework, universal information is processed and invocation of procedure framework is made of dynamic dependency binding, Message Processing, these three parts of the invocation of procedure.Wherein the dynamic dependency binding comprises the configuration information class and relies on binding class; Message Processing comprises message parse and response encapsulation.In addition, message subscribing client of this framework and the common formation of other assemblies.
Following 3 basic principles of following when this framework carries out design and development:
1. directly do not create destination object in code, but describe the mode that creates them.
2. directly be not connected with the service object in code, need which service but describe which assembly with configuration data.
3. program when operation, is responsible for these object associations together by container.
The dynamic dependency binding:
Locating information, response locating information, these four elements of ISP that this part is injected operation requestor, parameter by dependence dynamically connect, and form a new integral body.Inject the machine-processed dependence that has alleviated between assembly because rely on, this is also that the J2EE platform is advocated the system development requirement of " Song Ouhe ".Can reduce widely like this requestor of object to the dependence of ISP's specific implementation logic, because concrete " locating information " that we will rely on separated from the requestor.Relevant example is described as follows shown in table:
Message Processing:
This part comprises message parse and two modules of the encapsulation of the response after the invocation of procedure before the invocation of procedure, designs according to the thought towards tangent plane programming, all belongs to the applied logic assembly that is separated.Their topmost effects are exactly to unify to carry out Message Processing according to the dependence that dynamic dependency binding part provides, thereby reduce duplicated code, build graceful solution.
The invocation of procedure:
Relating generally to of this part is proxy mode, singlet pattern and JAVA reflection calling technology.It is respectively general-purpose interface, agency, real object that proxy mode has three roles.What agency, real object were realized is same interface, with the attribute of real object as the agency, disclosed to client is the agency, when client call agency's method, the agency is in conjunction with the reflection calling technology of JAVA, call the real object method, provide relevant service after before calling.In order to guarantee only to exist in whole framework an agency's example as for the singlet pattern.
Use method of the present invention to be: after the locating information of the dependence between solicit operation and method of servicing and parameter all is written to the configuration information of framework, service end is the message resolution module of the part of the Message Processing take request message as the parameter call framework just, returns to analysis result.The invocation of procedure part of service end take analysis result as the parameter call framework, corresponding method of servicing is called in reflection, returns and calls result.Service end is returned to response results to call result as the response package module of the Message Processing part of parameter call framework.Each part of framework can read configuration information automatically, thereby makes correct processing, and Here it is controls counter-rotating and embodies towards the core of microtomy.
As shown in Figure 2, represent the interactive mode between this framework and other application and service, adopt the loose coupling interactive mode of asynchronous message.When client need to be called service, to message center transmit operation message, the message subscribing client is obtained message from formation, the message subscribing client just can realize that by the interface that calls this framework message parse, the invocation of procedure and response encapsulate this three steps, last only need to send it back message center to the response of returning in framework, the interacting activity between just having completed once request and having served.Operation as for framework inside is all that the dependence that automatically reads in configuration information is carried out.
As shown in Figure 3, represent the data flow that this framework internal request is carried out.Request message is first resolved through the message resolution module of Message Processing part, give the invocation of procedure after resolving and partly call the respective service interface, to call again result and give the response package module of Message Processing part, result is packaged into request institute wants the form that obtains, return at last the response results after encapsulation.In addition, dynamic dependency binding part provides the dependence configuration information to other two parts.
Claims (4)
1. Distributed Services end frame based on message queue, it is characterized in that: described framework is made of dynamic dependency binding, Message Processing, the invocation of procedure;
Described dynamic dependency binding comprises the configuration information class and relies on binding class; Locating information, response locating information, four elements of ISP of injecting operation requestor, parameter by dependence dynamically connect, and form a new integral body;
Described Message Processing comprises that message parse and the response after the invocation of procedure before the invocation of procedure encapsulates two modules, and this two module is separated as the applied logic assembly, and Message Processing is carried out in the dependence unification that binding provides according to dynamic dependency;
The described invocation of procedure relates generally to proxy mode, singlet pattern and reflection and calls; Proxy mode is respectively general-purpose interface, agency, real object, and agency, real object are realized same interface, with the attribute of real object as the agency, openly acts on behalf of to client; When client call was acted on behalf of, the agency called in conjunction with reflection, calls the real object method, provided relevant service after before calling.
2. the using method of framework claimed in claim 1, it is characterized in that: after the locating information of the dependence between solicit operation and method of servicing and parameter all is written to the configuration information of framework, service end is the message resolution module of the part of the Message Processing take request message as the parameter call framework just, returns to analysis result; The invocation of procedure part of service end take analysis result as the parameter call framework, corresponding method of servicing is called in reflection, returns and calls result; Service end is returned to response results to call result as the response package module of the Message Processing part of parameter call framework; Each part of framework can read configuration information automatically, thereby makes correct processing.
3. the exchange method between framework claimed in claim 1 and other application and service, is characterized in that: the loose coupling interactive mode that adopts asynchronous message; When client need to be called service, to message center transmit operation message, the message subscribing client is obtained message from formation, the message subscribing client encapsulates this three steps by Interface realization message parse, the invocation of procedure and the response of calling this framework, at last the response of returning in framework is sent it back message center.
4. the request processing method of framework claimed in claim 1, it is characterized in that: request message is first resolved through the message resolution module of Message Processing part, give the invocation of procedure after resolving and partly call the respective service interface, to call again result and give the response package module of Message Processing part, result is packaged into request institute wants the form that obtains, return at last the response results after encapsulation; In addition, provide the dependence configuration information by dynamic dependency binding part to other two parts.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310101140.3A CN103152433B (en) | 2013-01-14 | 2013-03-26 | A kind of use, interaction and the request processing method at Distributed Services end |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310013521.6 | 2013-01-14 | ||
CN2013100135216 | 2013-01-14 | ||
CN201310013521 | 2013-01-14 | ||
CN201310101140.3A CN103152433B (en) | 2013-01-14 | 2013-03-26 | A kind of use, interaction and the request processing method at Distributed Services end |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103152433A true CN103152433A (en) | 2013-06-12 |
CN103152433B CN103152433B (en) | 2017-12-05 |
Family
ID=48550292
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310101140.3A Active CN103152433B (en) | 2013-01-14 | 2013-03-26 | A kind of use, interaction and the request processing method at Distributed Services end |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103152433B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104423982A (en) * | 2013-08-27 | 2015-03-18 | 阿里巴巴集团控股有限公司 | Request processing method and device |
CN107070782A (en) * | 2017-05-02 | 2017-08-18 | 山东浪潮通软信息科技有限公司 | A kind of Interface integration method, server and the system expansible based on message queue |
CN107908397A (en) * | 2017-10-09 | 2018-04-13 | 上海壹账通金融科技有限公司 | The method for building up and application server of software frame based on IOS systems |
CN108154026A (en) * | 2017-12-28 | 2018-06-12 | 成都卫士通信息产业股份有限公司 | Safety communicating method and system of the Root without intrusion are exempted from based on android system |
WO2019227623A1 (en) * | 2018-05-30 | 2019-12-05 | 平安科技(深圳)有限公司 | Method and apparatus for processing data of call platforms, device, and storage medium |
WO2020015170A1 (en) * | 2018-07-18 | 2020-01-23 | 平安科技(深圳)有限公司 | Interface invoking method and apparatus, and computer-readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1744037A (en) * | 2005-08-26 | 2006-03-08 | 南京邮电大学 | Method for avoiding grid computing application to depend on bottom development tool box |
US20070050756A1 (en) * | 2005-08-24 | 2007-03-01 | Nokia Corporation | Component architecture |
CN1967485A (en) * | 2006-06-20 | 2007-05-23 | 华为技术有限公司 | Method and system for realizing J2EE application |
CN102566992A (en) * | 2010-12-17 | 2012-07-11 | 卓望数码技术(深圳)有限公司 | Dependency injection method and dependency injection device based on system running |
-
2013
- 2013-03-26 CN CN201310101140.3A patent/CN103152433B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070050756A1 (en) * | 2005-08-24 | 2007-03-01 | Nokia Corporation | Component architecture |
CN1744037A (en) * | 2005-08-26 | 2006-03-08 | 南京邮电大学 | Method for avoiding grid computing application to depend on bottom development tool box |
CN1967485A (en) * | 2006-06-20 | 2007-05-23 | 华为技术有限公司 | Method and system for realizing J2EE application |
CN102566992A (en) * | 2010-12-17 | 2012-07-11 | 卓望数码技术(深圳)有限公司 | Dependency injection method and dependency injection device based on system running |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104423982A (en) * | 2013-08-27 | 2015-03-18 | 阿里巴巴集团控股有限公司 | Request processing method and device |
CN104423982B (en) * | 2013-08-27 | 2018-03-06 | 阿里巴巴集团控股有限公司 | The processing method and processing equipment of request |
CN107070782A (en) * | 2017-05-02 | 2017-08-18 | 山东浪潮通软信息科技有限公司 | A kind of Interface integration method, server and the system expansible based on message queue |
CN107908397A (en) * | 2017-10-09 | 2018-04-13 | 上海壹账通金融科技有限公司 | The method for building up and application server of software frame based on IOS systems |
CN108154026A (en) * | 2017-12-28 | 2018-06-12 | 成都卫士通信息产业股份有限公司 | Safety communicating method and system of the Root without intrusion are exempted from based on android system |
CN108154026B (en) * | 2017-12-28 | 2022-01-11 | 成都卫士通信息产业股份有限公司 | Root-free and non-invasive secure communication method and system based on Android system |
WO2019227623A1 (en) * | 2018-05-30 | 2019-12-05 | 平安科技(深圳)有限公司 | Method and apparatus for processing data of call platforms, device, and storage medium |
WO2020015170A1 (en) * | 2018-07-18 | 2020-01-23 | 平安科技(深圳)有限公司 | Interface invoking method and apparatus, and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN103152433B (en) | 2017-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Baldini et al. | The serverless trilemma: Function composition for serverless computing | |
CN107526624B (en) | Intelligent contract execution engine based on Java virtual machine | |
CN109002362B (en) | Service method, device and system and electronic equipment | |
US8572236B2 (en) | Distributing services in graph-based computations | |
CN112988499B (en) | Data processing method and device, electronic equipment and storage medium | |
CN107729139B (en) | Method and device for concurrently acquiring resources | |
Schel et al. | Manufacturing service bus: an implementation | |
CN103152433A (en) | Distributed server side framework and use, interaction and request processing method thereof | |
EP1693765B1 (en) | A data processing system and method | |
CN105765578B (en) | Parallel access of data in a distributed file system | |
US20150178055A1 (en) | Methods and systems for utilizing bytecode in an on-demand service environment including providing multi-tenant runtime environments and systems | |
WO2016123921A1 (en) | Http protocol-based multiple data resource data processing method and system | |
US20170364844A1 (en) | Automated-application-release-management subsystem that supports insertion of advice-based crosscutting functionality into pipelines | |
US10089084B2 (en) | System and method for reusing JavaScript code available in a SOA middleware environment from a process defined by a process execution language | |
CN110764752A (en) | System and method for realizing graphical service arrangement of Restful service based on micro-service architecture | |
US20130151571A1 (en) | Interface defined virtual data fields | |
CN101727475A (en) | Method, device and system for acquiring database access process | |
EP2685376B1 (en) | COBOL reference architecture | |
US10803413B1 (en) | Workflow service with translator | |
US20130159966A1 (en) | Application function library framework | |
CN102945264A (en) | Method for intelligently starting distributed transaction | |
US10268496B2 (en) | System and method for supporting object notation variables in a process defined by a process execution language for execution in a SOA middleware environment | |
US10223143B2 (en) | System and method for supporting javascript as an expression language in a process defined by a process execution language for execution in a SOA middleware environment | |
CN109597611A (en) | Front end data flow control Components Development system, method, equipment and storage medium | |
CN109816546A (en) | A kind of farm farming management platform and method based on J2EE framework |
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 |