CN109298950A - Enterprise Service Bus system, data processing method, terminal and storage medium - Google Patents
Enterprise Service Bus system, data processing method, terminal and storage medium Download PDFInfo
- Publication number
- CN109298950A CN109298950A CN201810928828.1A CN201810928828A CN109298950A CN 109298950 A CN109298950 A CN 109298950A CN 201810928828 A CN201810928828 A CN 201810928828A CN 109298950 A CN109298950 A CN 109298950A
- Authority
- CN
- China
- Prior art keywords
- request
- data
- esb
- service
- message
- 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
Links
- 238000003860 storage Methods 0.000 title claims abstract description 19
- 238000003672 processing method Methods 0.000 title claims abstract description 17
- 238000004891 communication Methods 0.000 claims abstract description 11
- 238000000034 method Methods 0.000 claims description 46
- 238000004590 computer program Methods 0.000 claims description 18
- 238000005538 encapsulation Methods 0.000 claims description 18
- 230000005540 biological transmission Effects 0.000 claims description 8
- 235000013399 edible fruits Nutrition 0.000 claims description 3
- 230000001360 synchronised effect Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 15
- 230000008569 process Effects 0.000 description 13
- 230000007246 mechanism Effects 0.000 description 8
- 230000004044 response Effects 0.000 description 6
- 206010033799 Paralysis Diseases 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 2
- 238000000151 deposition Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
- G06F13/4221—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer And Data Communications (AREA)
Abstract
A kind of Enterprise Service Bus architecture system, for communication connection business system and third party system, it include: ESB-ADAPTER, ESB-PROXY-IN, ESB-PROXY-OUT and ESB-FILE-PROXY-OUT subsystem, wherein, ESB-ADAPTER respectively with ESB-PROXY-IN, ESB-PROXY-OUT and ESB-FILE-PROXY-OUT communication connection.The present invention also provides a kind of Enterprise Service Bus data processing method, terminal and storage mediums.The request of data that different requesting parties sends can be converted into unified message and request protocol by the present invention, and is realized and synchronized the function of turning Asynchronous Invocation, and data processing speed is improved.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of light Mode Enterprise service bus system, light mode enterprise
Industry service bus data processing method, terminal and storage medium.
Background technique
With the development of computer information system, information system is also more and more huger, becomes increasingly complex.In connecting object ratio
When more situation, point-to-point connection type is at high cost, and availability and maintainability are low, thus, the concept of bus therewith by
It is introduced on the architecture construction of information system.Follow Service-Oriented Architecture Based (Service oriented architecture,
SOA the bus of concept), information system is usually service bus.The bus of its strategic layer is referred to as Enterprise Service Bus
(Enterprise Service Bus, ESB).Enterprise Service Bus be one have standard interface, realize interconnection, communication,
Service routing is supported to realize the enterprise information system basic platform of SOA.
In the enterprise of some light modes (platform model) of selection, because that eliminates storages, so operation cost is low, if but
Want to service with other application and faster establishes connection, thus it is necessary to establish a kind of framework of Enterprise Service Bus, to meet
A variety of different message requests and transmission.
Summary of the invention
In view of the foregoing, it is necessary to propose a kind of light Mode Enterprise service bus system, light Mode Enterprise service bus
The request of data that the requesting party of different request of data sends can be converted by data processing method, terminal and storage medium
Unified message and request protocol, and realize the function that synchronization process mechanism changes into Asynchronous Invocation.
First aspect present invention provides a kind of Enterprise Service Bus system, and the Enterprise Service Bus system communication connection is more
A business system and multiple third party systems, the Enterprise Service Bus system include:
ESB-ADAPTER subsystem, ESB-PROXY-IN subsystem, ESB-PROXY-OUT subsystem, ESB-FILE-
PROXY-OUT subsystem, the ESB-ADAPTER subsystem respectively with the ESB-PROXY-IN subsystem, the ESB-
PROXY-OUT subsystem and the ESB-FILE-PROXY-OUT subsystem communication connection, wherein
For issuing dubbo service agreement, the ESB-PROXY-IN subsystem is used for the ESB-ADAPTER subsystem
Issue http agreement and https service agreement;
In the ESB-ADAPTER subsystem is also used to for the message after Enterprise Service Bus system encapsulation being temporarily stored into
In depositing;
The ESB-ADAPTER subsystem is also used to detect when storing pending message in the memory, obtains
The message to be processed, according to the corresponding message queue of message arrangement to be processed, and to the message to be processed
It is handled;
The ESB-ADAPTER subsystem be also used to every preset time period pulled from message queue it is described to be processed
Message, according to the corresponding thread of message establishing to be processed;
The ESB-ADAPTER subsystem is also used to parse the message to be processed, and will be in after parsing
Appearance is sent to the corresponding data request service side of the request of data;
The ESB-ADAPTER subsystem is also used to obtain the request results of service side's transmission of the request of data and will
The request results are kept in the message queue into the memory;
The ESB-ADAPTER subsystem is also used to obtain the request results from the message queue in the memory,
And the request results are sent to the requesting party of the request of data.
Second aspect of the present invention, which provides, a kind of utilizes the Enterprise Service Bus system to carry out Enterprise Service Bus data
Processing method, which comprises
Issuing service is called for requesting party, and the ESB-ADAPTER subsystem issuing service agreement is dubbo agreement, institute
Stating ESB-PROXY-IN subsystem issuing service agreement is http agreement and https agreement;
Whether detecting receives the request of data of requesting party;
After detecting the request of data for receiving requesting party, identify whether the requesting party of the request of data is legal;
When the requesting party for identifying the request of data is legal, the clothes of the request of data are identified according to the request of data
Business side;
The request of data is packaged into corresponding message, ESB-ADAPTER according to the service side of the request
Message after encapsulation is temporarily stored into memory by system;
The ESB-ADAPTER subsystem detects when storing pending message in the memory, obtain it is described to
The message of processing, according to the corresponding message queue of message arrangement to be processed, and to the message to be processed at
Reason;
ESB-ADAPTER subsystem described in every preset time period pulls the message to be processed from message queue,
According to the corresponding thread of message establishing to be processed;
The ESB-ADAPTER subsystem parses the message to be processed, and the content after parsing is sent
To the corresponding data request service side of the request of data;
The ESB-ADAPTER subsystem obtains the request results of service side's transmission of the request of data and asks by described in
Result is asked to keep in the message queue into the memory;
The ESB-ADAPTER subsystem obtains the request results from the message queue in the memory, and by institute
State the requesting party that request results are sent to the request of data.
Preferably, the request of data of the requesting party is assisted by the requesting party according to the service that enterprises service system is issued
Discuss the request of data after being packaged to request of data, comprising:
When the requesting party is the business system, the request of data is packaged according to the dubbo agreement;
When the requesting party is third party system, the data are asked according to the http agreement or https agreement
It asks and is packaged.
Preferably, described to identify that the service side of the request of data includes: according to the request of data
The service side of the request of data is identified according to the data request service side's mark carried in the request of data;
When identifying that the data request service side is identified as first identifier, determine that the data request service side is enterprise
System;
When identifying that the data request service side is identified as second identifier, determine that the data request service side is third
Method, system.
Preferably, the request of data is packaged into corresponding message by the service side according to the request, described
Message after encapsulation is temporarily stored into memory by ESB-ADAPTER subsystem
When the reception system of the request of data is the ESB-ADAPTER subsystem, the request of data is encapsulated
For message, and the message after encapsulation is temporarily stored into the memory.
When the reception system of the request of data is the ESB-PROXY-IN subsystem, the request of data is encapsulated
For message, and it is forwarded to after the ESB-ADAPTER subsystem and is temporarily stored into described by the ESB-PROXY-IN subsystem
In depositing.
Preferably, described according to the corresponding thread of message establishing to be processed includes: corresponding according to the service side
The request Concurrency number create thread pool of corresponding size, the request Concurrency number is equal to the size of the thread pool.
Preferably, it includes: when the number that the content by after parsing, which is sent to the corresponding service side of the request of data,
According to request service side be the third party system when, pass through the ESB-PROXY-OUT subsystem or the ESB-FILE-
Content after parsing is sent to the service side of the request of data by PROXY-OUT subsystem;When the service of the request of data
When side is the business system, directly the content after parsing will be sent to the business system.
Preferably, the request results that the service side for obtaining the request of data sends include: when the request of data
Service side be the third party system when, pass through the ESB-PROXY-OUT subsystem or the ESB-FILE-PROXY-
OUT subsystem obtains the request results from the third party system, and the request results are kept in into the memory
Message queue in;When the service side of the request of data is the business system, directly obtained from the business system
The request results, and the request results are kept in the message queue into the memory.
Preferably, the requesting party that the request results are sent to the request of data includes: when the data are asked
When the requesting party asked is the business system, the request results are directly sent to described by the ESB-ADAPTER subsystem
Business system;When the requesting party of the request of data is the third party system, the ESB-ADAPTER subsystem passes through institute
It states ESB-PROXY-IN subsystem and the request results is sent to the third party system.
Preferably, the method also includes:
Judge whether current request state meets fusing condition;
When current request state meets fusing condition, the message queue of the first quantity is configured, and to being currently received
The requesting party of request of data returns to presupposed information;
When current request state is unsatisfactory for fusing condition, the message queue of the second quantity is configured.
Preferably, the fusing condition includes the combination of one or more of:
The short time consumption of current request of data is more than default short time consumption;Or
It is more than the time that the average value of the short time consumption of all request of data in preset time period, which is more than or equal to interface,;
Or
Message number in the memory message queue is more than preset quantity;Or
The quantity for receiving the request of data of the requesting party of the same request of data is more than preset quantity.
The third aspect of the present invention provides a kind of terminal, and the terminal includes processor and memory, and the processor is used
The Enterprise Service Bus data processing method is realized when executing the computer program stored in the memory.
The fourth aspect of the present invention provides a kind of computer readable storage medium, deposits on the computer readable storage medium
Computer program is contained, the Enterprise Service Bus data processing side is realized when the computer program is executed by processor
Method.
In conclusion light Mode Enterprise service bus system, data processing method, terminal described in the embodiment of the present invention
And storage medium, using the synchronization process mechanism of Open Framework dubbo, and the Asynchronous Invocation of ESB-ADAPTER is combined, it will
Synchronization process mechanism changes into Asynchronous Invocation, so that ESB not only has the characteristics that the equally loaded of dubbo, also has both
The feature of the low cost of ESB-ADAPTER: ESB-ADAPTER, which has, integrates ESB-API, KAFKA and ESB-CONSUMER
Function, to reduce the cost for carrying multiple servers.Secondly, the unified message format of setting, by by different data
The request of data that the requesting party of request sends is converted into unified message and request protocol, can shield the bottom skill of heterogeneous system
Art difference is also convenient for the exploitation and management of the requesting party of request of data.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the running environment figure for the light Mode Enterprise service bus system that the embodiment of the present invention one provides.
Fig. 2 is the flow chart of light Mode Enterprise service bus data processing method provided by Embodiment 2 of the present invention.
Fig. 3 is the schematic diagram for the terminal that the embodiment of the present invention three provides.
The present invention that the following detailed description will be further explained with reference to the above drawings.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real
Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, the embodiment of the present invention and embodiment
In feature can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, described embodiment is only
It is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill
Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention
The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool
The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Embodiment one
Fig. 1 is the running environment figure for the light Mode Enterprise service bus system that the embodiment of the present invention one provides.
In the present embodiment, business system 200 passes through light 100 (Enterprise of Mode Enterprise service bus system
Service Bus, ESB, hereinafter referred to as ESB100) with third party system 300 carry out communication connection and data interaction.Third party
System 300 carries out communication connection and data interaction by ESB100 and business system 200.
The business system 200 may include multiple enterprises applications or enterprises file service, for example, enterprise
3 are applied using 2 and enterprise using 1, enterprise, different enterprises applications or enterprises file service can be only fitted to not
On same server.
The third party system 300 may include multiple third-party applications or third party's file service, for example, third party
Using 1, third-party application 2, third-party application 3 and tripartite's file service, different third-party applications or third party's file clothes
Business can be only fitted on different servers.
The ESB100 may include multiple subsystems, such as: ESB-ADAPTER103, ESB-PROXY-IN subsystem
(hereinafter referred to as ESB-PROXY-IN) 104, ESB-PROXY-OUT subsystem (hereinafter referred to as ESB-PROXY-OUT) 105,
ESB-FILE-PROXY-OUT subsystem (hereinafter referred to as ESB-FILE-PROXY-OUT) 106.Wherein, ESB-ADAPTER103
Respectively with ESB-PROXY-IN104, ESB-PROXY-OUT105 and ESB-FILE-PROXY-OUT106 communication connection.ESB-
PROXY-IN104 can be referred to as access proxy server.ESB-PROXY-OUT105 and ESB-FILE-PROXY-OUT106 can
To be referred to as to pick out proxy server.
In other embodiments, the ESB100 can also include ZOOKEEPER subsystem 107 and NAS subsystem 108.
In the present embodiment, each subsystem in the ESB100 is (for example, ESB-ADAPTER103, ESB-PROXY-
IN104, ESB-PROXY-OUT105, ESB-FILE-PROXY-OUT106) it is used for issuing service.Issuing service is issuing service
Agreement, the service agreement may include: dubbo agreement, http agreement, https agreement.
In the present embodiment, the business system 200, ESB100, third party system 300 can be requesting party, or
Service side.ESB100 can establish unique identification for the different business systems 200 and the different third party systems 300
With request Concurrency number, for example, a certain bank establishes mark " B10047 ", and request Concurrency number is 100.
In the present embodiment, the ESB-ADAPTER103 issuing service agreement is dubbo agreement, and service name format is
" esb-api.service.XXXXXX_YYYYYY ", " XXXXXX " in the interface name are service side's (business system
200 or the third party system 300) mark, the service that " YYYYYY " in the interface name provides for the service side
Title, the ESB-ADAPTER103 issuing service are called for business system 200 and the ESB-PROXY-IN104.
In the present embodiment, the ESB-PROXY-IN104 issuing service agreement is http agreement and https agreement, service
Name format is " esb.YYYYYY ", " YYYYYY " in the interface name for the service side (business system 200 or
The third party system 300) provide service name, the ESB-PROXY-IN104 issuing service supply the third party system
300 call.The corresponding table of a service can be safeguarded in the ESB-PROXY-IN104 issuing service, by the ESB-PROXY-
The service of IN104 publication is mapped with the ESB-ADAPTER103 service issued, such as the ESB-PROXY-IN104
The esb-api.se of the esb.customer.queryReferrerList service and ESB-ADAPTER103 publication of publication
rvice.Fin004.ff.customer.query
ReferrerList service is mapped.
In the present embodiment, ESB-PROXY-OUT105, ESB-FILE-PROXY-OUT106 issuing service agreement is
Dubbo agreement, service name format is " esb-proxy.service.XXXXXX_YYYYYY ", in the interface name
" XXXXXX " is the mark of service side (business system 200 or the third party system 300), in the interface name
The service name that " YYYYYY " provides for the service side, described ESB-PROXY-OUT105, ESB-FILE-PROXY-OUT106
Issuing service is called for the ESB-ADAPTER104.ESB-PROXY-OUT105, ESB-FILE-PROXY-OUT106 hair
The service of cloth occurs in pairs with the ESB-ADAPTER103 service issued, such as ESB-PROXY-OUT105 publication
Esb-proxy.service.B10043.QueryGradingInterestRateService service and the ESB-
The esb-api.service.B10043.QueryGradingInterestRate of ADAPTER103 publication
Service service occurs in pairs.
It should be noted that for ESB100 is as each subsystem inside the mainly opposite ESB100 of requesting party, because
There is also call relations between each subsystem in the inside ESB100.
Such as: the ESB-PROXY-IN104 of ESB100 is called to other subsystems of ESB100, while the ESB- of ESB100
PROXY-IN104 can also call the ESB-ADAPTER104 of ESB100, and at this moment ESB-PROXY-IN104 is relative to ESB-
ADAPTER104 is exactly requesting party.
The ESB100 is for the request of data for whether receiving requesting party to be detected.
The request of data of requesting party request of data is packaged according to the service that ESB is issued by requesting party after data
Request.
In the present embodiment, requesting party, which is packaged request of data according to the service issued, may include:
1) when requesting party is business system 200, according to the dubbo agreement logarithm of each subsystem of ESB100 publication
It is packaged according to request.
2) when requesting party be third party system 300 when, according to each subsystem of the ESB100 publication http agreement or
Person's https agreement is packaged request of data.
Request of data is packaged according to the service that each subsystem of the ESB100 is issued by requesting party, requesting party is only
Need to be packaged according to the unified request message format of ESB100 can, be not required to pay close attention to the request report of different service sides
The literary different problem of format.
For example, unified request message format provided in this embodiment is as follows:
The ESB100 is also used to after detecting the request of data for receiving requesting party, identifies asking for the request of data
Whether the side of asking is legal.
In the present embodiment, when ESB100 receives request of data, the request of data is identified according to the request of data
Whether requesting party is legal.The legal legal business system 200 or third for referring to requesting party and whether being recognized by ESB100
Method, system 300, the business system 200 and the third party system 300 refer to that ESB100 is docked and are that it establishes unique
The system of mark.
When the ESB100 is also used to identify that the requesting party of the request of data is illegal, interrupt requests.
When the ESB100 is also used to identify that the requesting party of the request of data is legal, institute is identified according to the request of data
State the service side of request of data.
In the present embodiment, request of data source identification, the request of data source can be carried in the request of data
Identify the identity to show the requesting party of the request of data.Source identification, that is, the ESB is unique mark that the system is established
Know.
In the present embodiment, ESB100 is when the requesting party for determining request of data is legal requesting party, according to the data
Request identifies the service side of the request of data, and the service side can be business system 200 or third party system 300.
In the present embodiment, the request of data can carry service side's mark of request of data, the request of data clothes
Business side identifies the identity to show the service side of the request of data.Data request service side's mark includes: the first mark
Knowledge and second identifier, wherein the first identifier is to show that the data request service side is enterprises application or enterprise
Internal file service, the second identifier is to show that the data request service side is third-party application or third party's file
Service.
Identify that the service side of the request of data may include: to take according in the request of data according to the request of data
Data request service side's mark of band identifies the service side of the request of data;When the identification data request service side is identified as
When first identifier, determine that the data request service side is business system;When identifying that the data request service side is identified as the
When two marks, determine that the data request service side is third party system.
For example, the data request service side mark in the present embodiment can be described ESB-ADAPTER, ESB-
Part " XXXXXX " in the service name that PROXY-OUT, ESB-FILE-PROXY-OUT are issued.
ESB-ADAPTER103 is used to that the request of data to be packaged into corresponding message according to the service side of the request,
Message after encapsulation is temporarily stored into memory.
In the present embodiment, it is service entrance and the message of ESB100 that ESB-ADAPTER103, which is the adapter of ESB100,
Producers and consumers.
In the present embodiment, the request of data is packaged into corresponding message by the service side according to the request,
Message after encapsulation is temporarily stored into memory by ESB-ADAPTER
1) when the reception system of the request of data is the ESB-ADAPTER, request of data is encapsulated as message, and
Message after encapsulation is temporarily stored into memory.
2) when the reception system of the request of data is first agent's server, request of data is encapsulated as message, and
It is temporarily stored into memory after being forwarded to ESB-ADAPTER by first agent's server.
It is directly sent in message queue by the message producer in ESB-ADAPTER after message encapsulation, in the message
Identification number is carried, the location information of the message queue to show storage.For example, showing to disappear described when identification number is A
Breath is stored in message queue 1, when identification number is B, shows for the message to be stored in message queue 2.The message team
Column are the message queues in memory.
First agent's server can be access proxy server (ESB-PROXY-IN)
First agent's server can also include load-balancing function (for example, F5 shown in figure), to third party
The request of data of system carries out load balancing control.It prevents from causing stress business system (for example, banking system) when high concurrent
Cause to paralyse.
In the present embodiment, by by encapsulation after message be temporarily stored into the message queue in the memory of the machine, because without
The processing such as distributed storage is done, and external server or equipment can not directly acquire the message in memory, ensure that message
High security.
The ESB-ADAPTER103 is also used to detect in memory when storing pending message, obtains described wait locate
The message of reason is handled according to the corresponding message queue of message arrangement to be processed, and to the message to be processed.
In the present embodiment, when ESB-ADAPTER103 is detected and is stored with message in memory and needs to handle, obtain wait locate
The message of reason configures corresponding message queue.
The ESB-ADAPTER103 is also used to every preset time period and pulls described to be processed disappear from message queue
Breath, according to the corresponding thread of message establishing to be processed.
Whether ESB-ADAPTER103 can be monitored in memory with every preset time period (for example, 200 milliseconds) has message to want
Processing pulls message when ESB-ADAPTER103, which is listened in memory, has message to handle from message queue, and according to disappearing
Breath content is routed to corresponding proxy server.ESB100 can create corresponding thread pool, a message team according to message queue
Arrange a corresponding thread pool, the message to be processed in the corresponding message queue of per thread pond fixed consumption, different threads
It is not interfere with each other mutually between pond.For example, thread pool 1 message to be processed being responsible in consumption message queue 1, thread pool 2 negative
Message to be processed in duty consumption message queue 2.
In the present embodiment, described according to the corresponding thread of message establishing to be processed may include: according to the clothes
The corresponding number of concurrent in business side creates thread pool of corresponding size.The number of concurrent is equal to the size of thread pool.
Different size of thread pool is created according to the pre-configured number of concurrent of the service side, to realize according to not
Same data request amount executes different con current controls, for example, the data request amount of business system is generally less, the service side
(third party system) pre-configured number of concurrent is also corresponding lower, thus the thread pool of ESB-ADAPTER103 creation also compared with
It is small, for example, 20-50;For another example, the data request amount of third party system is generally more, and service side's (business system) is preparatory
Configured number of concurrent is also corresponding higher, thus the thread pool of ESB-ADAPTER103 creation is larger, for example, 100-150.
The ESB-ADAPTER103 is also used to parse the message to be processed, and the content after parsing is sent out
Send data request service side corresponding to the request of data.
In the present embodiment, the thread of ESB-ADAPTER103 can be provided in advance corresponding with the message to be processed
Allocation list.The allocation list includes: system service name required for completing request of data, the routing of system service physics, system
Serve future flow path conditions code, condition code correspond to the information such as follow-up service.It is exactly logical for being parsed to the message to be processed
Retrieval allocation list is crossed, explains wherein content, to determine specific service content, and determines system service name, system service physics road
By, follow-up process condition code, condition code correspond to follow-up service etc..
In the present embodiment, the service side refers to the request of data for responding the requesting party, and according to the request of data
The server of corresponding request results is provided, the service side may include: business system or third party system.Certainly, if
Business system includes multiple enterprise's subsystems, for example, enterprise's subsystem 1, enterprise's subsystem 2.The service side can also be more
Enterprise's subsystem in a enterprise's subsystem.Similarly, if third party system includes multiple third party subsystems, for example, the
Three party subsystems 1, third party subsystem 2.The service side can also be a third prescription in multiple third party subsystems
System.That is, requesting party and service side can be business system simultaneously, it can also simultaneously be third party system, e.g., when enterprise's subsystem
Unite 1 request call enterprise subsystem 2 when, at this point, enterprise's subsystem 1 be requesting party, enterprise's subsystem 2 be service side.
For example, the service side of the request of data provided in the present embodiment responds the request of data, i.e., described in response
Message format is as follows:
In the present embodiment, the content after parsing, which is sent to the corresponding data request service side of the request of data, be can wrap
It includes:
It 1), will be in after parsing by second agent's server when the service side of the request of data is third party system
Hold the service side's (third party system) for being sent to the request of data.
Second agent's server can be to pick out proxy server (service adapter ESB-PROXY-OUT or clothes
Be engaged in file adapter ESB-FILE-PROXY-OUT), the thread that second agent's server receives ESB-ADAPTER is sent
Parsing after content when, the content after forwarding the parsing is into third party system.The ESB-PROXY-OUT is to receive
The message of ESB-ADAPTER, and rung according to the message according to the preset request method request third party system of third party system
It answers the request of data and returns to request results.The ESB-FILE-PROXY-OUT is used to receive the message of ESB-ADAPTER,
And third party system is requested according to the preset request method of third party system according to the message, upload or download the data
Corresponding file in request.
2) when the service side of the request of data is business system, directly the content after parsing will be sent to the enterprise
Industry system.
Request results that the service side that the ESB-ADAPTER103 is also used to obtain the request of data sends and by institute
It states in the message queue that request results are kept in into memory.
In the present embodiment, the request results that the service side for obtaining the request of data sends may include:
1) when the service side of the request of data is third party system, by second agent's server from described the
The request results are obtained in three method, systems, and the request results are kept in the message queue into memory.
2) when the service side of the request of data is business system, the request is directly obtained from the business system
As a result, and the request results are kept in the message queue into memory.
The ESB-ADAPTER103 is also used to obtain the request results from the message queue in the memory, and will
The request results are sent to the requesting party of the request of data.
In the present embodiment, may include: by the requesting party that the request results are sent to the request of data
1) when the requesting party of the request of data is business system, ESB-ADAPTER directly sends out the request results
It send to the business system.
2) when the requesting party of the request of data is third party system, ESB-ADAPTER is taken by the first agent
The request results are sent to the third party system by business device.
It should be noted that either business system or third party system, all can both be the requesting party of request of data,
It can also do and respond the request of data and the service side of request of data that request results are provided.That is, business system is as data
The requesting party of request can also be used as number while service side's (third party system) to institute's request of data sends request of data
Requesting party's (third party system) offer request results of request of data are requested and are according to service side's response data of request.Third party
System as request of data requesting party to institute's request of data service side's (business system) send request of data while,
Requesting party's (business system) offer request knot of request of data is requested and be to the service side's response data that can be used as request of data
Fruit.
Further, the ESB100 is also used to when a request for data is received, judge whether current request state meets
Fusing condition;When current request state meets fusing condition, the message queue of the first quantity is configured, and to being currently received
The requesting party of request of data returns to presupposed information.When current request state is unsatisfactory for fusing condition, the second quantity of configuration disappears
Cease queue.
ESB100 can count the short time consumption of each request of data, and the short time consumption of the request of data refers to
ESB100 returns to the data to the requesting party of request of data from the request of data that the requesting party for receiving request of data sends
Request the time of corresponding request results.
The current request state may include the combination of one or more of: when the time-consuming of current request of data
Between;The average value of the short time consumption of all request of data in preset time period;Message number in memory in message queue;It connects
Receive the quantity of the request of data of the requesting party of the same request of data.
The fusing condition may include the combination of one or more of: the short time consumption of current request of data is more than
Default short time consumption;The average value of the short time consumption of all request of data in preset time period is more than more than or equal to interface
Time;Message number in message queue is more than preset quantity;Receive the request of data of the requesting party of the same request of data
Quantity be more than preset quantity.
The default short time consumption is a time value predetermined.The presupposed information can be that " system business is numerous
It is busy, please try again later ".First quantitative value is equal to the sizes values of thread pool, and second quantitative value is equal to the big of thread pool
The small ratio being worth multiplied by interface timeout value and average short time consumption value.
In the present embodiment, by presetting fusing condition, when detect meet the fusing condition when, may make instantaneous
When high concurrent is more than ESB processing capacity, for example, ESB-ADAPTER comes when the message number in message queue is more than preset quantity
It can be automatically to current data either when a large amount of exceptions of third party system or request timed out not as good as processing request of data
Request carries out fusing control, increases waiting time of the message in message queue, plays the role of buffered messages, reduce ESB's
Pressure, while presupposed information can also be returned to the requesting party of current request of data in time, accomplish to timely respond to, has improved number
According to the Experience Degree of the requesting party of request.
Further, the ESB100 also provides for distributed application program coordination service, for providing note for dubbo
Volume center.The distributed application program coordination service can be ZooKeeper component.
In conclusion light Mode Enterprise service bus system described in the embodiment of the present invention, using Open Framework dubbo
Synchronization process mechanism, and combine ESB-ADAPTER Asynchronous Invocation, synchronization process mechanism is changed into asynchronous process machine
System has also had both the feature of the low cost of ESB-ADAPTER so that ESB not only has the characteristics that the equally loaded of dubbo:
ESB-ADAPTER has the function of integrating ESB-API, KAFKA and ESB-CONSUMER, carries multiple services to reduce
The cost of device.Secondly, the message format that setting is unified, by the way that the request of data of requesting party's transmission of different request of data is turned
It changes unified message and request protocol into, the Floor layer Technology difference of heterogeneous system can be shielded, be also convenient for the request of request of data
The exploitation and management of side.In addition, according to the corresponding thread of message establishing to be processed in message queue, and dynamic configuration thread
The size in pond, pressure caused by the service side of request of data results in the service side of request of data when effectively preventing high concurrent
The paralysis of system.And producers and consumers merge deployment, the corresponding consumer of a producer.Finally, setting fusing item
Part can be certainly when instantaneous high concurrent is more than ESB processing capacity or when a large amount of exceptions of third party system or request timed out
It is dynamic that fusing control is carried out to current request of data, increase waiting time of the message in message queue, plays buffered messages
Effect, reduces the pressure of ESB, while can also return to presupposed information to the requesting party of current request of data in time, accomplished and
When respond, improve the Experience Degree of the requesting party of request of data.
Embodiment two
Fig. 2 is the flow chart of the data processing method of Enterprise Service Bus provided by Embodiment 2 of the present invention.According to difference
Demand, the execution sequence in the flow chart can change, and certain steps can be omitted.
The data processing method of the Enterprise Service Bus of the embodiment of the present invention can be applied in one or more terminal.
The data processing method of the Enterprise Service Bus also can be applied to be attached by terminal and by network and the terminal
The hardware environment that is constituted of server in.Network includes but is not limited to: wide area network, Metropolitan Area Network (MAN) or local area network.The present invention is implemented
The data processing method of the Enterprise Service Bus of example can be executed by server, can also be executed by terminal;It can also be
It is executed jointly by server and terminal.
The terminal for needing to carry out the data processing method of Enterprise Service Bus, can directly integrate at the terminal
The data processing function of Enterprise Service Bus provided by method of the invention, or installation is for realizing method of the invention
Client.For another example, method provided by the present invention can also be with Software Development Kit (Software Development
Kit, SDK) form operate in the equipment such as server, in the form of SDK provide Enterprise Service Bus form and function interface,
The data processing to Enterprise Service Bus can be realized by the interface provided in terminal or other equipment.
S11, issuing service are called for requesting party.
, can be by each subsystem issuing service in ESB in the present embodiment, each subsystem in ESB includes: ESB-
ADAPTER, ESB-PROXY-IN, ESB-PROXY-OUT, ESB-FILE-PROXY-OUT, issuing service are issuing service agreement,
The service agreement includes: dubbo agreement, http agreement, https agreement.
In the present embodiment, the requesting party can be business system, ESB system, third party system, and the business system can
To include multiple enterprises applications perhaps different enterprises application of enterprises file service or enterprises file
Service can be only fitted on different servers.The ESB system can be each subsystem in ESB described in this programme.Institute
Stating third party system may include multiple third-party applications perhaps different third-party application of third party's file service or third
Square file service can be only fitted on different servers.ESB can be the different business system and different described the
Three method, systems establish unique identification and request Concurrency number, and for example, a certain bank establishes mark " B10047 ", number of concurrent 100.
In the present embodiment, the ESB-ADAPTER issuing service agreement is dubbo agreement, and service name format is " esb-
Api.service.XXXXXX_YYYYYY ", " XXXXXX " in the interface name is service side (business system or institute
State third party system) mark, the service name that " YYYYYY " in the interface name provides for the service side is described
ESB-ADAPTER issuing service is called for business system and the ESB-PROXY-IN.
In the present embodiment, the ESB-PROXY-IN issuing service agreement is http agreement and https agreement, service name
Format is " esb.YYYYYY ", and " YYYYYY " in the interface name is the service side (business system or described the
Three method, systems) provide service name, the ESB-PROXY-IN issuing service for the third party system calling.Described
Can safeguard service corresponding table when ESB-PROXY-IN issuing service, the service that the ESB-PROXY-IN is issued with it is described
The service of ESB-ADAPTER publication is mapped, such as ESB-PROXY-IN publication
The esb-api.service.Fin of esb.customer.queryReferrerList service and ESB-ADAPTER publication
004.ff.customer.queryReferrerList service is mapped.
In the present embodiment, ESB-PROXY-OUT, ESB-FILE-PROXY-OUT issuing service agreement is dubbo association
View, service name format are " esb-proxy.service.XXXXXX_YYYYYY ", and " XXXXXX " in the interface name is
The mark of service side's (business system or third party system), " YYYYYY " in the interface name mention for the service side
The service name of confession, ESB-PROXY-OUT, ESB-FILE-PROXY-OUT issuing service supply the ESB-ADAPTER tune
With.The service of the service and ESB-ADAPTER publication of ESB-PROXY-OUT, ESB-FILE-PROXY-OUT publication
Occur in pairs, such as the esb-proxy.service.B10043.QueryGradingInt of ESB-PROXY-OUT publication
The esb-api.service.B10043.QueryGradi of erestRateService service and ESB-ADAPTER publication
NgInterestRateService service occurs in pairs.
It should be noted that for ESB system is as the system inside the mainly opposite ESB of requesting party, because of ESB system
There is also call relations between the internal each subsystem of system.
Such as: ESB subsystem ESB-PROXY-IN is called to other subsystems of ESB, while ESB subsystem ESB-PROXY-
IN can also call ESB subsystem ESB-ADAPTER, and at this moment ESB-PROXY-IN is exactly requesting party relative to ESB-ADAPTER.
Whether S12, detecting receive the request of data of requesting party.
The request of data of requesting party request of data is packaged according to the service that ESB is issued by requesting party after data
Request.
In the present embodiment, requesting party, which is packaged request of data according to the service issued, may include:
1) when requesting party is business system, according to the dubbo agreement of each subsystem of ESB publication to request of data
It is packaged.
2) when requesting party is third party system, according to the http agreement or https of the publication of each subsystem of the ESB
Agreement is packaged request of data.
Request of data is packaged according to the service that each subsystem of the ESB is issued by requesting party, requesting party only needs
To be packaged according to the unified request message format of ESB can, be not required to pay close attention to the request message lattice of different service sides
The different problem of formula.
For example, unified request message format provided in this embodiment is as follows:
After detecting the request of data for receiving requesting party, step S13 is executed;Otherwise, it can continue whether detecting connects
Receive the request of data of requesting party.
Whether S13, the requesting party of the identification request of data are legal.
In the present embodiment, when ESB receives request of data, the request of the request of data is identified according to the request of data
Whether side is legal.The legal legal business system or third party system for referring to requesting party and whether being recognized by ESB, it is described
Business system and the third party system refer to that ESB is docked and are that it establishes the systems of unique identification.If requesting party does not conform to
Rule interrupt requests, requesting party is legal, carries out follow-up process S14.
In the present embodiment, request of data source identification, the request of data source can be carried in the request of data
Identify the identity to show the requesting party of the request of data.Source identification, that is, the ESB is unique mark that the system is established
Know.
S14, the service side that the request of data is identified according to the request of data.
In the present embodiment, ESB is when the requesting party for determining request of data is legal requesting party, according to the request of data
Identify that the service side of the request of data, the service side can be business system or third party system.The business system
It may include multiple enterprises applications perhaps different enterprises application of enterprises file service or enterprises text
Part service can be only fitted on different servers.The third party system may include multiple third-party applications or third party
File service, different third-party applications or third party's file service can be only fitted on different servers.
In the present embodiment, the request of data can carry service side's mark of request of data, the request of data clothes
Business side identifies the identity to show the service side of the request of data.Data request service side's mark includes: the first mark
Knowledge and second identifier, wherein the first identifier is to show that the data request service side is enterprises application or enterprise
Internal file service, the second identifier is to show that the data request service side is third-party application or third party's file
Service.
Identify that the service side of the request of data may include: to take according in the request of data according to the request of data
Data request service side's mark of band identifies the service side of the request of data;When the identification data request service side is identified as
When first identifier, determine that the data request service side is business system;When identifying that the data request service side is identified as the
When two marks, determine that the data request service side is third party system.
For example, the data request service side mark in the present embodiment can be described ESB-ADAPTER, ESB-
Part " XXXXXX " in the service name that PROXY-OUT, ESB-FILE-PROXY-OUT are issued.
S15, the request of data is packaged by corresponding message according to the service side of the request, ESB-ADAPTER will
Message after encapsulation is temporarily stored into memory.
In the present embodiment, ESB-ADAPTER be ESB adapter, be ESB service entrance and message the producer and disappear
Fei Zhe.
In the present embodiment, the request of data is packaged into corresponding message by the service side according to the request,
Message after encapsulation is temporarily stored into memory by ESB-ADAPTER
1) when the reception system of the request of data is the ESB-ADAPTER, request of data is encapsulated as message, and
Message after encapsulation is temporarily stored into memory.
2) when the reception system of the request of data is first agent's server, request of data is encapsulated as message, and
It is temporarily stored into memory after being forwarded to ESB-ADAPTER by first agent's server.
It is directly sent in message queue by the message producer in ESB-ADAPTER after message encapsulation, in the message
Identification number is carried, the location information of the message queue to show storage.For example, showing to disappear described when identification number is A
Breath is stored in message queue 1, when identification number is B, shows for the message to be stored in message queue 2.The message team
Column are the message queues in memory.
First agent's server can be access proxy server (ESB-PROXY-IN)
First agent's server can also include load-balancing function (for example, F5 shown in figure), to third party
The request of data of system carries out load balancing control.It prevents from causing stress business system (for example, banking system) when high concurrent
Cause to paralyse.
In the present embodiment, by by encapsulation after message be temporarily stored into the message queue in the memory of the machine, because without
The processing such as distributed storage is done, and external server or equipment can not directly acquire the message in memory, ensure that message
High security.
S16, ESB-ADAPTER are detected when storing pending message in memory, obtain the message to be processed,
It is handled according to the corresponding message queue of message arrangement to be processed, and to the message to be processed.
In the present embodiment, when ESB-ADAPTER is detected and is stored with message in memory and needs to handle, obtain to be processed
Message configures corresponding message queue.
S17, every preset time period ESB-ADAPTER pull the message to be processed from message queue, according to institute
State the corresponding thread of message establishing to be processed.
Whether ESB-ADAPTER can be monitored in memory with every preset time period (for example, 200 milliseconds) has message to locate
Reason, when ESB-ADAPTER, which is listened in memory, has message to handle, pulls message, and according in message from message queue
Appearance is routed to corresponding proxy server.ESB can create corresponding thread pool, a message queue corresponding one according to message queue
A thread pool, the message to be processed in the corresponding message queue of per thread pond fixed consumption, phase between different thread pools
It does not interfere with each other.For example, thread pool 1 message to be processed being responsible in consumption message queue 1, is responsible for for thread pool 2 disappearing
Cease the message to be processed in queue 2.
In the present embodiment, described according to the corresponding thread of message establishing to be processed may include: according to the clothes
The corresponding number of concurrent in business side creates thread pool of corresponding size.The number of concurrent is equal to the size of thread pool.
Different size of thread pool is created according to the pre-configured number of concurrent of the service side, to realize according to not
Same data request amount executes different con current controls, for example, the data request amount of business system is generally less, the service side
(third party system) pre-configured number of concurrent is also corresponding lower, thus the thread pool of ESB-ADAPTER creation is also smaller, example
Such as, 20-50;For another example, the data request amount of third party system is generally more, and service side's (business system) is pre-configured
Number of concurrent it is also corresponding higher, thus the thread pool of ESB-ADAPTER creation is larger, for example, 100-150.
S18, ESB-ADAPTER parse the message to be processed, and the content after parsing are sent to described
The corresponding data request service side of request of data.
In the present embodiment, the thread of ESB-ADAPTER can be provided in advance corresponding with the message to be processed
Allocation list.The allocation list includes: system service name required for completing request of data, the routing of system service physics, system clothes
Business follow-up process condition code, condition code correspond to the information such as follow-up service.Parse to the message to be processed is exactly to pass through
Retrieve allocation list, explain wherein content, to determine specific service content, and determine system service name, the routing of system service physics,
Follow-up process condition code, condition code correspond to follow-up service etc..
In the present embodiment, the service side refers to the request of data for responding the requesting party, and according to the request of data
The server of corresponding request results is provided, the service side may include: business system or third party system.Certainly, if
Business system includes multiple enterprise's subsystems, for example, enterprise's subsystem 1, enterprise's subsystem 2.The service side can also be more
Enterprise's subsystem in a enterprise's subsystem.Similarly, if third party system includes multiple third party subsystems, for example, the
Three party subsystems 1, third party subsystem 2.The service side can also be a third prescription in multiple third party subsystems
System.That is, requesting party and service side can be business system simultaneously, it can also simultaneously be third party system, e.g., when enterprise's subsystem
Unite 1 request call enterprise subsystem 2 when, at this point, enterprise's subsystem 1 be requesting party, enterprise's subsystem 2 be service side.
For example, the service side of the request of data provided in the present embodiment responds the request of data, i.e., described in response
Message format is as follows:
In the present embodiment, the content after parsing, which is sent to the corresponding data request service side of the request of data, be can wrap
It includes:
It 1), will be in after parsing by second agent's server when the service side of the request of data is third party system
Hold the service side's (third party system) for being sent to the request of data.
Second agent's server can be to pick out proxy server (service adapter ESB-PROXY-OUT or clothes
Be engaged in file adapter ESB-FILE-PROXY-OUT), the thread that second agent's server receives ESB-ADAPTER is sent
Parsing after content when, the content after forwarding the parsing is into third party system.The ESB-PROXY-OUT is to receive
The message of ESB-ADAPTER, and rung according to the message according to the preset request method request third party system of third party system
It answers the request of data and returns to request results.The ESB-FILE-PROXY-OUT is used to receive the message of ESB-ADAPTER,
And third party system is requested according to the preset request method of third party system according to the message, upload or download the data
Corresponding file in request.
2) when the service side of the request of data is business system, directly the content after parsing will be sent to the enterprise
Industry system.
Request results that the service side that S19, ESB-ADAPTER obtain the request of data sends and by the request results
It keeps in the message queue into memory.
In the present embodiment, the request results that the service side for obtaining the request of data sends may include:
1) when the service side of the request of data is third party system, by second agent's server from described the
The request results are obtained in three method, systems, and the request results are kept in the message queue into memory.
2) when the service side of the request of data is business system, the request is directly obtained from the business system
As a result, and the request results are kept in the message queue into memory.
S20, ESB-ADAPTER obtain the request results from the message queue in the memory, and by the request
As a result it is sent to the requesting party of the request of data.
In the present embodiment, may include: by the requesting party that the request results are sent to the request of data
1) when the requesting party of the request of data is business system, ESB-ADAPTER directly sends out the request results
It send to the business system.
2) when the requesting party of the request of data is third party system, ESB-ADAPTER is taken by the first agent
The request results are sent to the third party system by business device.
It should be noted that either business system or third party system, all can both do the source side of request of data,
It can also do and respond the request of data and the service side of request of data that request results are provided.That is, business system is as data
The source side of request can also be used as number while service side's (third party system) to institute's request of data sends request of data
Source side's (third party system) offer request results of request of data are requested and are according to service side's response data of request.Third party
System as request of data source side to institute's request of data service side's (business system) send request of data while,
Source side's (business system) offer request knot of request of data is requested and be to the service side's response data that can be used as request of data
Fruit.
Further, when a request for data is received, the method can also include: to judge whether current request state is full
Foot fusing condition;When current request state meets fusing condition, the message queue of the first quantity is configured, and to being currently received
Request of data source side return presupposed information.When current request state is unsatisfactory for fusing condition, the second quantity of configuration
Message queue.
ESB can count the short time consumption of each request of data, and the short time consumption of the request of data refers to ESB from connecing
The request of data for receiving source side's transmission of request of data is corresponding to the request of data is returned to the source side of request of data
The time of request results.
The current request state may include the combination of one or more of: when the time-consuming of current request of data
Between;The average value of the short time consumption of all request of data in preset time period;Message number in memory in message queue;It connects
Receive the quantity of the request of data of the source side of the same request of data.
The fusing condition may include the combination of one or more of: the short time consumption of current request of data is more than
Default short time consumption;The average value of the short time consumption of all request of data in preset time period is more than more than or equal to interface
Time;Message number in message queue is more than preset quantity;Receive the request of data of the source side of the same request of data
Quantity be more than preset quantity.
The default short time consumption is a time value predetermined.The presupposed information can be that " system business is numerous
It is busy, please try again later ".First quantitative value is equal to the sizes values of thread pool, and second quantitative value is equal to the big of thread pool
The small ratio being worth multiplied by interface timeout value and average short time consumption value.
In the present embodiment, by presetting fusing condition, when detect meet the fusing condition when, may make instantaneous
When high concurrent is more than ESB processing capacity, for example, ESB-ADAPTER comes when the message number in message queue is more than preset quantity
It can be automatically to current data either when a large amount of exceptions of third party system or request timed out not as good as processing request of data
Request carries out fusing control, increases waiting time of the message in message queue, plays the role of buffered messages, reduce ESB's
Pressure, while presupposed information can also be returned to the source side of current request of data in time, accomplish to timely respond to, has improved number
According to the Experience Degree of the source side of request.
Further, the method can also include: to provide distributed application program coordination service, for mentioning for dubbo
For registration center.The distributed application program coordination service can be ZooKeeper component.
In conclusion light Mode Enterprise service bus data processing method described in the embodiment of the present invention, using open source
The synchronization process mechanism of frame dubbo, and the Asynchronous Invocation of ESB-ADAPTER is combined, synchronization process mechanism is changed into different
Step mechanism has also had both the spy of the low cost of ESB-ADAPTER so that ESB not only has the characteristics that the equally loaded of dubbo
Point: ESB-ADAPTER has the function of integrating ESB-API, KAFKA and ESB-CONSUMER, so that it is multiple to reduce carrying
The cost of server.Secondly, the message format that setting is unified, by the way that the data of requesting party's transmission of different request of data are asked
It asks and is converted into unified message and request protocol, the Floor layer Technology difference of heterogeneous system can be shielded, be also convenient for request of data
The exploitation and management of requesting party.In addition, according to the corresponding thread of message establishing to be processed in message queue, and dynamic configuration
The size of thread pool, pressure caused by the service side of request of data results in the clothes of request of data when effectively preventing high concurrent
The paralysis of business method, system.And producers and consumers merge deployment, the corresponding consumer of a producer.Finally, setting is molten
Broken strip part, when instantaneous high concurrent is more than ESB processing capacity or when a large amount of exceptions of third party system or request timed out, energy
It is enough that fusing control is carried out to current request of data automatically, increase waiting time of the message in message queue, plays buffering and disappear
The effect of breath reduces the pressure of ESB, while can also return to presupposed information to the source side of current request of data in time, accomplishes
It timely responds to, improves the Experience Degree of the requesting party of request of data.
The above is only a specific embodiment of the invention, but scope of protection of the present invention is not limited thereto, for
For those skilled in the art, without departing from the concept of the premise of the invention, improvement, but these can also be made
It all belongs to the scope of protection of the present invention.
Embodiment three
Fig. 3 is the schematic diagram for the terminal that the embodiment of the present invention five provides.
The terminal 3 includes: memory 31, at least one processor 32, is stored in the memory 31 and can be in institute
State the computer program 33 run at least one processor 32 and at least one communication bus 34.
At least one described processor 32 is realized at above-mentioned Enterprise Service Bus data when executing the computer program 33
Manage the step in embodiment of the method.
Illustratively, the computer program 33 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 31, and are executed by least one described processor 32, to complete this hair
It is bright.One or more of module/units can be the series of computation machine program instruction section that can complete specific function, this refers to
Enable section for describing implementation procedure of the computer program 33 in the terminal 3.
The terminal 3 can be desktop PC, notebook, palm PC and cloud server etc. and calculate equipment.This
Field technical staff is appreciated that the schematic diagram 3 is only the example of terminal 3, and the not restriction of structure paired terminal 3 can be with
Including components more more or fewer than diagram, certain components or different components are perhaps combined, such as the terminal 3 may be used also
To include input-output equipment, network access equipment, bus etc..
At least one described processor 32 can be central processing unit (Central Processing Unit, CPU),
It can also be other general processors, digital signal processor (Digital Signal Processor, DSP), dedicated integrated
Circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..The processor 32 can be microprocessor or the processor 32 is also possible to any conventional processor
Deng the processor 32 is the control centre of the terminal 3, utilizes each portion of various interfaces and the entire terminal 3 of connection
Point.
The memory 31 can be used for storing the computer program 33 and/or module/unit, and the processor 32 passes through
Operation executes the computer program and/or module/unit being stored in the memory 31, and calls and be stored in memory
Data in 31 realize the various functions of the terminal 3.The memory 31 can mainly include storing program area and storing data
Area, wherein storing program area can application program needed for storage program area, at least one function (such as sound-playing function,
Image player function etc.) etc.;Storage data area, which can be stored, uses created data (such as audio data, electricity according to terminal 3
Script for story-telling etc.) etc..In addition, memory 31 may include high-speed random access memory, it can also include nonvolatile memory, example
Such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other volatibility are solid
State memory device.
If the integrated module/unit of the terminal 3 is realized in the form of SFU software functional unit and as independent product
When selling or using, it can store in a computer readable storage medium.Based on this understanding, in present invention realization
The all or part of the process in embodiment method is stated, relevant hardware can also be instructed to complete by computer program, institute
The computer program stated can be stored in a computer readable storage medium, which, can when being executed by processor
The step of realizing above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, the computer
Program code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer can
Reading medium may include: any entity or device, recording medium, USB flash disk, mobile hard that can carry the computer program code
Disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory
(RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs to illustrate
It is that the content that the computer-readable medium includes can be fitted according to the requirement made laws in jurisdiction with patent practice
When increase and decrease, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier wave letter
Number and telecommunication signal.
In several embodiments provided by the present invention, it should be understood that disclosed terminal and method can pass through it
Its mode is realized.For example, terminal embodiment described above is only schematical, for example, the division of the unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in same treatment unit
It is that each unit physically exists alone, can also be integrated in same unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie
In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims
Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This
Outside, it is clear that one word of " comprising " is not excluded for other units or, odd number is not excluded for plural number.The multiple units stated in system claims
Or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to indicate name
Claim, and does not indicate any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference
Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention
Technical solution is modified or equivalent replacement, without departing from the spirit of the technical scheme of the invention range.
Claims (10)
1. a kind of Enterprise Service Bus system, the Enterprise Service Bus system communication connects multiple business systems and multiple thirds
Method, system, which is characterized in that the Enterprise Service Bus system includes:
ESB-ADAPTER subsystem, ESB-PROXY-IN subsystem, ESB-PROXY-OUT subsystem, ESB-FILE-PROXY-
OUT subsystem, the ESB-ADAPTER subsystem respectively with the ESB-PROXY-IN subsystem, the ESB-PROXY-OUT
Subsystem and the ESB-FILE-PROXY-OUT subsystem communication connection, wherein
The ESB-ADAPTER subsystem is for issuing dubbo service agreement, and the ESB-PROXY-IN subsystem is for issuing
Http agreement and https service agreement;
Message after the ESB-ADAPTER subsystem is also used to encapsulate the Enterprise Service Bus system is temporarily stored into memory
In;
The ESB-ADAPTER subsystem is also used to detect when storing pending message in the memory, described in acquisition
Message to be processed is carried out according to the corresponding message queue of message arrangement to be processed, and to the message to be processed
Processing;
The ESB-ADAPTER subsystem is also used to every preset time period and pulls described to be processed disappear from message queue
Breath, according to the corresponding thread of message establishing to be processed;
The ESB-ADAPTER subsystem is also used to parse the message to be processed, and the content after parsing is sent out
Send data request service side corresponding to the request of data;
The ESB-ADAPTER subsystem is also used to obtain the request results of service side's transmission of the request of data and will be described
Request results are kept in the message queue into the memory;
The ESB-ADAPTER subsystem is also used to obtain the request results from the message queue in the memory, and will
The request results are sent to the requesting party of the request of data.
2. a kind of carry out Enterprise Service Bus data processing method using Enterprise Service Bus system as described in claim 1,
It is characterized in that, which comprises
Issuing service is called for requesting party, and the ESB-ADAPTER subsystem issuing service agreement is dubbo agreement, described
ESB-PROXY-IN subsystem issuing service agreement is http agreement and https agreement;
Whether detecting receives the request of data of requesting party;
After detecting the request of data for receiving requesting party, identify whether the requesting party of the request of data is legal;
When the requesting party for identifying the request of data is legal, the service of the request of data is identified according to the request of data
Side;
The request of data is packaged into corresponding message, the ESB-ADAPTER subsystem according to the service side of the request
Message after encapsulation is temporarily stored into memory;
The ESB-ADAPTER subsystem detects when storing pending message in the memory, obtains described to be processed
Message, handled according to the corresponding message queue of message arrangement to be processed, and to the message to be processed;
ESB-ADAPTER subsystem described in every preset time period pulls the message to be processed from message queue, according to
The corresponding thread of message establishing to be processed;
The ESB-ADAPTER subsystem parses the message to be processed, and the content after parsing is sent to institute
State the corresponding data request service side of request of data;
The ESB-ADAPTER subsystem obtains the request results of service side's transmission of the request of data and ties the request
Fruit is kept in the message queue into the memory;
The ESB-ADAPTER subsystem obtains the request results from the message queue in the memory, and asks by described in
Result is asked to be sent to the requesting party of the request of data.
3. method according to claim 2, which is characterized in that the request of data of the requesting party is the requesting party according to enterprise
The service agreement that industry service system is issued request of data is packaged after request of data, comprising:
When the requesting party is the business system, the request of data is packaged according to the dubbo agreement;
When the requesting party is third party system, according to the http agreement or https agreement to the request of data into
Row encapsulation.
4. method according to claim 2, which is characterized in that described to identify the request of data according to the request of data
Service side includes:
The service side of the request of data is identified according to the data request service side's mark carried in the request of data;
When identifying that the data request service side is identified as first identifier, determine the data request service side for system of enterprise
System;
When identifying that the data request service side is identified as second identifier, determine the data request service side for third party system
System.
5. method according to claim 2, which is characterized in that the service side according to the request is by the request of data
It is packaged into corresponding message, the message after encapsulation is temporarily stored into memory by the ESB-ADAPTER subsystem includes:
When the reception system of the request of data is the ESB-ADAPTER subsystem, the request of data is encapsulated as disappearing
Breath, and the message after encapsulation is temporarily stored into the memory;
When the reception system of the request of data is the ESB-PROXY-IN subsystem, the request of data is encapsulated as disappearing
Breath, and be temporarily stored into the memory after being forwarded to the ESB-ADAPTER subsystem by the ESB-PROXY-IN subsystem.
6. method according to claim 2, which is characterized in that
It is described according to the corresponding thread of message establishing to be processed include: according to the service side it is corresponding it is described request simultaneously
It sends out number and creates thread pool of corresponding size, the request Concurrency number is equal to the size of the thread pool;
It includes: the service when the request of data that the content by after parsing, which is sent to the corresponding service side of the request of data,
When side is the third party system, pass through the ESB-PROXY-OUT subsystem or the ESB-FILE-PROXY-OUT subsystem
Content after parsing is sent to the service side of the request of data by system;When the service side of the request of data is system of the enterprise
When system, directly the content after parsing will be sent to the business system;
The request results that the service side for obtaining the request of data sends include: when the service side of the request of data is institute
When stating third party system, by the ESB-PROXY-OUT subsystem or the ESB-FILE-PROXY-OUT subsystem from institute
It states and obtains the request results in third party system, and the request results are kept in the message queue into the memory;
When the service side of the request of data is the business system, the request results are directly obtained from the business system,
And in the message queue kept in the request results into the memory;
The requesting party that the request results are sent to the request of data includes: when the requesting party of the request of data is
When the business system, the request results are directly sent to the business system by the ESB-ADAPTER subsystem;Work as institute
When the requesting party for stating request of data is the third party system, the ESB-ADAPTER subsystem passes through the ESB-PROXY-
The request results are sent to the third party system by IN subsystem.
7. the method as described in claim 2 to 6 any one, which is characterized in that the method also includes:
Judge whether current request state meets fusing condition;
When current request state meets fusing condition, the message queue of the first quantity is configured, and to the data being currently received
The requesting party of request returns to presupposed information;
When current request state is unsatisfactory for fusing condition, the message queue of the second quantity is configured.
8. the method for claim 7, which is characterized in that the fusing condition includes the combination of one or more of:
The short time consumption of current request of data is more than default short time consumption;Or
It is more than the time that the average value of the short time consumption of all request of data in preset time period, which is more than or equal to interface,;Or
Message number in the ESB-API subsystem message queue is more than preset quantity;Or
The quantity for receiving the request of data of the requesting party of the same request of data is more than preset quantity.
9. a kind of terminal, which is characterized in that the terminal includes processor and memory, and the processor is for executing described deposit
It is realized when the computer program stored in reservoir at the Enterprise Service Bus data as described in any one of claim 2 to 8
Reason method.
10. a kind of computer readable storage medium, computer program, feature are stored on the computer readable storage medium
It is, realizes that the enterprises service as described in any one of claim 2 to 8 is total when the computer program is executed by processor
Line data processing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810928828.1A CN109298950A (en) | 2018-08-15 | 2018-08-15 | Enterprise Service Bus system, data processing method, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810928828.1A CN109298950A (en) | 2018-08-15 | 2018-08-15 | Enterprise Service Bus system, data processing method, terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109298950A true CN109298950A (en) | 2019-02-01 |
Family
ID=65165074
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810928828.1A Pending CN109298950A (en) | 2018-08-15 | 2018-08-15 | Enterprise Service Bus system, data processing method, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109298950A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112306701A (en) * | 2019-07-25 | 2021-02-02 | 中移动信息技术有限公司 | Service fusing method, device, equipment and storage medium |
CN114116067A (en) * | 2021-12-02 | 2022-03-01 | 多点生活(武汉)科技有限公司 | Information configuration method and device for internal and external systems, electronic equipment and readable storage medium |
CN116962547A (en) * | 2023-08-29 | 2023-10-27 | 宁波鑫义信息科技有限公司 | MQ-based dynamic data gateway communication method |
US11922026B2 (en) | 2022-02-16 | 2024-03-05 | T-Mobile Usa, Inc. | Preventing data loss in a filesystem by creating duplicates of data in parallel, such as charging data in a wireless telecommunications network |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110125821A1 (en) * | 2009-11-24 | 2011-05-26 | International Business Machines Corporation | Service Oriented Architecture Enterprise Service Bus With Universal Ports |
CN102364921A (en) * | 2011-11-21 | 2012-02-29 | 携程计算机技术(上海)有限公司 | Realization method and equipment for enterprise service bus and corresponding platform |
CN102497419A (en) * | 2011-12-09 | 2012-06-13 | 电子科技大学 | ESB (Enterprise Service Bus) task scheduling method orienting to large-scale requests and scheduling system |
CN103577257A (en) * | 2012-08-03 | 2014-02-12 | 杭州勒卡斯广告策划有限公司 | REST (representational state transfer) service method, device and system |
CN103870337A (en) * | 2014-02-28 | 2014-06-18 | 浪潮集团山东通用软件有限公司 | ESB assembly realization method based on SEDA |
CN104468299A (en) * | 2013-09-16 | 2015-03-25 | 清华大学 | Enterprise service bus system based on user rule |
CN105320522A (en) * | 2015-09-24 | 2016-02-10 | 四川长虹电器股份有限公司 | Service-oriented architecture based XBRL application platform |
CN106716367A (en) * | 2014-09-25 | 2017-05-24 | 甲骨文国际公司 | System and method for supporting dynamic thread pool sizing in distributed data grid |
CN108074076A (en) * | 2017-12-08 | 2018-05-25 | 上海壹账通金融科技有限公司 | Service providing method, device, equipment and readable storage medium storing program for executing based on ESB |
-
2018
- 2018-08-15 CN CN201810928828.1A patent/CN109298950A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110125821A1 (en) * | 2009-11-24 | 2011-05-26 | International Business Machines Corporation | Service Oriented Architecture Enterprise Service Bus With Universal Ports |
CN102364921A (en) * | 2011-11-21 | 2012-02-29 | 携程计算机技术(上海)有限公司 | Realization method and equipment for enterprise service bus and corresponding platform |
CN102497419A (en) * | 2011-12-09 | 2012-06-13 | 电子科技大学 | ESB (Enterprise Service Bus) task scheduling method orienting to large-scale requests and scheduling system |
CN103577257A (en) * | 2012-08-03 | 2014-02-12 | 杭州勒卡斯广告策划有限公司 | REST (representational state transfer) service method, device and system |
CN104468299A (en) * | 2013-09-16 | 2015-03-25 | 清华大学 | Enterprise service bus system based on user rule |
CN103870337A (en) * | 2014-02-28 | 2014-06-18 | 浪潮集团山东通用软件有限公司 | ESB assembly realization method based on SEDA |
CN106716367A (en) * | 2014-09-25 | 2017-05-24 | 甲骨文国际公司 | System and method for supporting dynamic thread pool sizing in distributed data grid |
CN105320522A (en) * | 2015-09-24 | 2016-02-10 | 四川长虹电器股份有限公司 | Service-oriented architecture based XBRL application platform |
CN108074076A (en) * | 2017-12-08 | 2018-05-25 | 上海壹账通金融科技有限公司 | Service providing method, device, equipment and readable storage medium storing program for executing based on ESB |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112306701A (en) * | 2019-07-25 | 2021-02-02 | 中移动信息技术有限公司 | Service fusing method, device, equipment and storage medium |
CN112306701B (en) * | 2019-07-25 | 2024-05-03 | 中移动信息技术有限公司 | Service fusing method, device, equipment and storage medium |
CN114116067A (en) * | 2021-12-02 | 2022-03-01 | 多点生活(武汉)科技有限公司 | Information configuration method and device for internal and external systems, electronic equipment and readable storage medium |
CN114116067B (en) * | 2021-12-02 | 2024-02-27 | 多点生活(武汉)科技有限公司 | Information configuration method and device for internal and external systems, electronic equipment and readable storage medium |
US11922026B2 (en) | 2022-02-16 | 2024-03-05 | T-Mobile Usa, Inc. | Preventing data loss in a filesystem by creating duplicates of data in parallel, such as charging data in a wireless telecommunications network |
CN116962547A (en) * | 2023-08-29 | 2023-10-27 | 宁波鑫义信息科技有限公司 | MQ-based dynamic data gateway communication method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109298950A (en) | Enterprise Service Bus system, data processing method, terminal and storage medium | |
CN103365713B (en) | A kind of scheduling of resource and management method and device | |
EP2947569B1 (en) | Hybrid applications operating between on-premise and cloud platforms | |
US9276864B1 (en) | Dynamic network traffic throttling | |
WO2020062793A1 (en) | Message queue-based request processing method, apparatus and device, and storage medium | |
WO2021017301A1 (en) | Management method and apparatus based on kubernetes cluster, and computer-readable storage medium | |
US8898731B2 (en) | Association of service policies based on the application of message content filters | |
US10205773B2 (en) | Service platform architecture | |
US10079865B2 (en) | Method and system for an ontology based request/reply service | |
CN109271259A (en) | Enterprise Service Bus system, data processing method, terminal and storage medium | |
US10057186B2 (en) | Service broker for computational offloading and improved resource utilization | |
US20100042720A1 (en) | Method and system for intelligently leveraging cloud computing resources | |
WO2021088641A1 (en) | Data transmission method, data processing method, data reception method and device, and storage medium | |
CN110442610A (en) | The method, apparatus of load balancing calculates equipment and medium | |
US20240095082A1 (en) | Method and system for multiple services to share same gpu, and device and medium | |
CN108337275A (en) | Task distribution method, device and equipment for Distributor | |
CN108897854A (en) | A kind of monitoring method and device of overtime task | |
CN109995801A (en) | A kind of method for message transmission and device | |
CN111858007A (en) | Task scheduling method and device based on message middleware | |
US11178252B1 (en) | System and method for intelligent distribution of integration artifacts and runtime requests across geographic regions | |
CN107682572A (en) | Client's inlet wire distribution method, system, computer equipment and storage medium | |
CN110019539A (en) | A kind of method and apparatus that the data of data warehouse are synchronous | |
US9292466B1 (en) | Traffic control for prioritized virtual machines | |
CN106406836A (en) | Power system analysis-oriented software platform and running and distributed development methods thereof | |
CN110515741A (en) | A kind of degradation processing method and device based on local task queue |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1260953 Country of ref document: HK |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20190201 |
|
WD01 | Invention patent application deemed withdrawn after publication |