CN113515375B - Calling method and device for multiple CICS nodes - Google Patents
Calling method and device for multiple CICS nodes Download PDFInfo
- Publication number
- CN113515375B CN113515375B CN202110544845.7A CN202110544845A CN113515375B CN 113515375 B CN113515375 B CN 113515375B CN 202110544845 A CN202110544845 A CN 202110544845A CN 113515375 B CN113515375 B CN 113515375B
- Authority
- CN
- China
- Prior art keywords
- cics
- node
- pool
- nodes
- server
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 101001074449 Crotalus durissus terrificus Phospholipase A2 inhibitor CNF Proteins 0.000 title abstract description 272
- 230000004044 response Effects 0.000 claims description 14
- 230000036541 health Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 8
- 238000003860 storage Methods 0.000 claims description 3
- 230000002159 abnormal effect Effects 0.000 abstract description 20
- 238000012545 processing Methods 0.000 abstract description 14
- 230000005856 abnormality Effects 0.000 abstract description 13
- 230000008569 process Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 230000008439 repair process Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000011664 signaling Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- 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/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a calling method and a device for multiple CICS nodes, wherein a node pool is configured on each application server, the node pool comprises a plurality of CICS nodes, the CICS nodes can be called by a server where the CICS nodes are located and servers where other CICS nodes are located, when the application server receives a service request sent by a load balancing server, the application server queries the target node pool according to the identification of the target node pool to be accessed, which is included in the service request, a CICS node which is normally operated is selected as a target CICS node, and then the target CICS node is called to access a background server. Because each application server can access other CICS nodes in the node pool besides the CICS node of the application server, when the CICS node of the application server is abnormal, the CICS node of the application server can be called to process the service request, thereby avoiding the problem of failure in processing the service request caused by the abnormality of the CICS node of the application server.
Description
Technical Field
The present invention relates to database technologies, and in particular, to a method and an apparatus for calling a node of a multi-client information control system (Customer Information Control System, abbreviated as CICS).
Background
CICS is a series of middleware for providing online transaction processing and transaction management for applications, and has the function of providing a transaction processing environment for the applications, helping clients to establish online transaction processing applications with three-layer structure, and is widely applied to systems such as banks.
The CICS is generally applied to a cluster system, wherein the cluster system is to centralize a plurality of servers to provide the same service, each server is provided with the CICS service, and the plurality of servers can run in parallel to improve the technical speed and can also be used for backup, so that the fault tolerance and the risk resistance of the cluster system are improved, and the stability of the cluster system is improved. At present, the cluster system generally adopts a load balancing mode to improve the performance of the system, a load balancing server distributes a request sent by a client to a server with normal CICS service, and when a certain server is down, the load balancing server can identify the abnormality and distribute the request to other normal servers, so that the stability of the system is ensured.
However, when an anomaly occurs in the CICS service of the server, the load balancing server cannot recognize the anomaly, and still distributes the request to the server, thereby causing a failure in processing the request.
Disclosure of Invention
The invention provides a calling method and a device for multiple CICS nodes, which can avoid the problem that an application server fails to process a service request due to the abnormality of the CICS nodes.
In a first aspect, the present invention provides a method for calling multiple CICS nodes, which is applied to a cluster system, where the cluster system includes a load balancing server, multiple application servers and at least one background server, each application server is configured with a client information control system CICS node, each application server is configured with a node pool, configuration information of the node pool includes information of multiple CICS nodes, multiple CICS nodes in the node pool are used to access the same background server, and all CICS nodes in the node pool can be called by a server where the node pool is located and servers where other CICS nodes are located; the method comprises the following steps:
The application server receives a service request sent by a load balancing server, wherein the service request comprises an identification of a target node pool to be accessed;
The application server queries the target node pool according to the identification of the target node pool, and selects a CICS node which normally operates from the target node pool as a target CICS node;
the application server calls the target CICS node to access the background server;
and the application server returns a response of the service request to the load balancing server.
Optionally, the nodes included in the target node pool are normal-running CICS nodes.
Optionally, the method further comprises:
The application server periodically reads information of a plurality of CICS nodes in the target node pool according to a preset scanning period;
for any CICS node, the application server sends a CICS request to the background server according to the information of the CICS node;
The application server judges whether the CICS node operates normally according to the returned result of the CICS request;
and when the CICS node is abnormally operated, the application server deletes the CICS node from the cache pool corresponding to the target node pool, and the CICS node which is normally operated is stored in the cache pool corresponding to the target node pool.
Optionally, the method further comprises:
and the application server outputs the log information of the CICS node which runs abnormally.
Optionally, the selecting a normal CICS node from the target node pool as the target CICS node includes:
Selecting a candidate CICS node from the target node pool;
Sending a CICS request to the background server according to the information of the candidate CICS nodes;
judging whether the candidate CICS node operates normally or not according to a return result of the CICS request;
when the candidate CICS node operates normally, determining the candidate CICS node as the target CICS node;
and when the candidate CICS nodes are very running, selecting one candidate CICS node from the rest CICS nodes in the target node pool, and returning to execute the step of sending the CICS request to the background server according to the information of the candidate CICS node.
Optionally, the information of the CICS node includes: the identification of the node pool, the identification of each CICS node, the Internet protocol IP address, the port number, the service name, the user name, the password, the timeout time, the version, the character set and the channel identification bit.
The second aspect of the present invention provides an application server, where the application server belongs to a cluster system, the cluster system includes a load balancing server, a plurality of application servers, and at least one background server, each application server is configured with a client information control system CICS node, each application server is configured with a node pool, configuration information of the node pool includes information of a plurality of CICS nodes, and the plurality of CICS nodes in the node pool are used to access the same background server, and all CICS nodes in the node pool can be invoked by a server where the node pool is located and servers where other CICS nodes are located; the application server includes:
the receiving module is used for receiving a service request sent by the load balancing server, wherein the service request comprises an identifier of a target node pool to be accessed;
The selecting module is used for inquiring the target node pool according to the identification of the target node pool, and selecting one CICS node which normally operates from the target node pool as a target CICS node;
the calling module is used for calling the target CICS node to access the background server;
and the sending module is used for returning the response of the service request to the load balancing server.
Optionally, the nodes included in the target node pool are normal-running CICS nodes.
Optionally, the health check module is further included for:
periodically reading information of a plurality of CICS nodes in the target node pool according to a preset scanning period;
for any CICS node, sending a CICS request to the background server according to the information of the CICS node;
judging whether the CICS node operates normally or not according to a return result of the CICS request;
and deleting the CICS node from the cache pool corresponding to the target node pool when the CICS node is abnormally operated, and storing the CICS node which is normally operated in the cache pool corresponding to the target node pool.
Optionally, the method further comprises:
and the log output module is used for outputting the log information of the CICS node which runs abnormally.
Optionally, the selecting module is specifically configured to:
Selecting a candidate CICS node from the target node pool;
Sending a CICS request to the background server according to the information of the candidate CICS nodes;
judging whether the candidate CICS node operates normally or not according to a return result of the CICS request;
when the candidate CICS node operates normally, determining the candidate CICS node as the target CICS node;
and when the candidate CICS nodes are very running, selecting one candidate CICS node from the rest CICS nodes in the target node pool, and returning to execute the step of sending the CICS request to the background server according to the information of the candidate CICS node.
Optionally, the information of the CICS node includes: the identification of the node pool, the identification of each CICS node, the Internet protocol IP address, the port number, the service name, the user name, the password, the timeout time, the version, the character set and the channel identification bit.
In a third aspect, the present invention provides an application server comprising: at least one processor and memory; the memory stores computer-executable instructions; the at least one processor executes computer-executable instructions stored in the memory such that the at least one processor performs the method according to the first aspect of the invention.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method according to the first aspect of the invention when executed by a processor.
In a fifth aspect, the invention provides a computer program product comprising a computer program which, when executed by a processor, implements a method according to the first aspect of the invention.
According to the method and the device for calling the multiple CICS nodes, the node pool is configured on each application server, the node pools comprise the multiple CICS nodes, the CICS nodes in the node pools can be called by the server where the node pool is located and the server where the other CICS nodes are located, when the application server receives a service request sent by the load balancing server, the application server inquires the target node pool according to the identification of the target node pool to be accessed, which is included in the service request, one CICS node which is normally operated is selected from the target node pool as the target CICS node, then the target CICS node is called to access the background server, and the response of the service request is returned to the load balancing server. Because each application server can access other CICS nodes in the node pool besides the CICS node where the application server is located, when the CICS node where the application server is located is abnormal, the CICS node of the other server can be called to process the service request, so that the problem that the service request processing fails due to the fact that the CICS node of the application server is abnormal is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic diagram of a conventional cluster system;
FIG. 2 is a schematic diagram of communication when server abnormality occurs in a conventional cluster system;
Fig. 3 is a communication schematic diagram of the existing cluster system when a CICS node is abnormal;
FIG. 4 is a schematic diagram of a cluster system according to the present invention;
FIG. 5 is a schematic diagram of a configuration of a node pool on an application server;
Fig. 6 is a flowchart of a method for calling a multi-CICS node according to the first embodiment of the present invention;
fig. 7 is a signaling flow chart of a calling method of a multi-CICS node according to the second embodiment of the present invention;
Fig. 8 is a schematic structural diagram of an application server according to a third embodiment of the present invention;
fig. 9 is a schematic structural diagram of an application server according to a fourth embodiment of the present invention.
Specific embodiments of the present invention have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
Fig. 1 is a schematic architecture diagram of an existing cluster system, as shown in fig. 1, where the cluster system includes a load balancing server, an application server a, an application server B, an application server C, and a background server, where the application server a, the application server B, and the application server C are configured to provide the same application, and each application server is deployed or installed with a CICS node, which is also referred to as a CICS service, and the CICE node is an effective and complete minimum structural unit in CICS access, and includes basic information such as an accessed internet protocol (Internet Protocol, abbreviated as IP) address, a port, and a service name. And the application server and the background server are connected and communicated through CICS nodes.
The client sends a service request, and the client can be user equipment such as a mobile phone, a tablet personal computer and the like, and a user can trigger service operation through Application (APP) installed on the client. When the cluster system is a banking system, the service request can be a transaction request, and the user triggers the transaction through the mobile banking APP according to the mobile phone.
The load balancing server receives the service request sent by the client, performs basic conversion of the source IP address and the destination IP address, and guides the flow to the corresponding application server capable of providing service. The load balancing server can adopt an F5 load balancing scheme, which is also called an F5 technical scheme, and is a network performance optimization technology.
The load balancing server periodically detects the IP address of the background server through an internet control message protocol (Internet Control Message Protocol, abbreviated ICMP) packet (e.g., PING message) or a transmission control protocol (Transmission Control Protocol, abbreviated TCP) packet (e.g., port test message), and if the response of the ICMP/server Port of the address can be received within a set time, the application server can be considered to provide service.
After receiving the service request sent by the load balancing server, the application server calls up the background server through the CICS node.
After receiving the response packet of the application server, the load balancing server changes the address of the response packet back to the address of the client, returns the response of the service request to the client, and completes the standard server load balancing process.
During the running process of the cluster system, server abnormality or CICS node abnormality may occur, and when two abnormalities occur, the processing flow of the load balancing server is described below.
Fig. 2 is a communication schematic diagram of a conventional cluster system when a server is abnormal, as shown in fig. 2, when an application server C is down, a load balancing server can detect that the application server C is abnormal through an ICMP packet or a TCP packet, so that the abnormal application server C is gradually processed, and a request of a client is not distributed to the application server C any more, but is forwarded to other servers with normal operation. The roll-out is that the load balancing server detects that the application server is abnormal, and the request is not distributed to the server with the abnormality.
Fig. 3 is a communication schematic diagram when a CICS node is abnormal in the conventional cluster system, as shown in fig. 3, in reality, there is a case where a server is operating normally, but a CICS node of a certain server is abnormal (for example, blocking/timeout/retransmission, etc.), and in this case, the load balancing server fails to identify the CICS node abnormality of the server through health check. For example, in fig. 3, the CICS node of the application server C is abnormal, but the load server is not identified, and the application server C is considered to be normal, so the load balancing server still distributes the request of the client to the application server C with abnormal CICS, which results in a failure of the request.
The health check of the load balancing server simply identifies whether an application server is abnormal only through whether the ICMP packet or the TCP packet is responded, and the abnormal condition of the middleware CICS node of the application server cannot be identified, and the load balancing server still sends a request to the application server with the abnormal CICS node for processing, so that the request processing fails.
When an anomaly occurs in a CICS node of an application server, an operation and maintenance person is generally required to perform manual repair. Whether a method exists can prevent this situation from happening again in the production environment, avoiding affecting customer requests. The invention refers to a load balancing method among application servers, and the invention also carries out load balancing on middleware CICS nodes in a cluster system, thereby improving the stability of the system and effectively solving the problems.
Fig. 4 is a schematic diagram of an architecture of a cluster system suitable for the present invention, as shown in fig. 4, where the cluster system includes a load balancing server, application servers A, B, C and a background server, and each application server is deployed with a CICS node. It will be appreciated that more or fewer application servers, background servers, may be included in the clustered system, and the invention is not limited in this regard.
The architecture shown in fig. 4 differs from the existing architecture in that each application server can access CICS nodes deployed on other application servers in addition to invoking the CICS nodes deployed on its own. Specifically, each application server is configured with a node pool, the node pool includes a plurality of CICS nodes, the configuration information of the node pool includes information of a plurality of CICS nodes, the CICS nodes in the node pool are used for accessing the same background server, and the CICS nodes in the node pool can be called by the server where the node pool is located and the servers where other CICS nodes are located.
As shown in fig. 4, the CICS nodes on the application server A, B, B form a node pool, where the node pool includes three nodes, and the application server A, B, C can access all the nodes in the node pool, so when the CICS node of a certain application server is abnormal, the application server can also access other CICS nodes in the node pool, so as to avoid failure in service request processing caused by abnormality of its CICS node.
Illustratively, the information of the CICS node includes: the identity of the node pool (poolNo in table one), the identity of each CICS node (node in table one), the IP address, port number, service name, user name, password, timeout time, version, character set, and channel identification bit. The roles of the information of the CICS node are shown in table one.
List one
It will be appreciated that multiple node pools may also be configured on one application server, with different node pools being used to access different background application servers. FIG. 5 is a schematic diagram of a configuration structure of node pools on an application server, where two node pools are configured in an application program of the application server as shown in FIG. 5: node pool A and node pool B, node pool A includes three CICS nodes: CICS node 1, CICS node 2 and CICS node 3, CICS node 1, CICS node 2 and CICS node 3 can access the same background server with IP address 127.1.1.1. The node pool B comprises three CICS nodes: CICS node 4, CICS node 5 and CICS node 6, CICS node 4, CICS node 5 and CICS node 6 can access the same background server with IP address 127.1.1.2. Only the information of CICS node 1 is shown in fig. 5, and the information of other nodes is similar.
Alternatively, the information of the CICS node may be configured in an extensible markup language (Extensible Markup Language, abbreviated as XML) format in an src/main/resource/ctgconfiguration.xml file of the application.
Based on the architecture shown in fig. 4, an embodiment of the present invention provides a method for calling multiple CICS nodes, and fig. 6 is a flowchart of the method for calling multiple CICS nodes according to the embodiment of the present invention, where the embodiment is described from the perspective of an application server, and as shown in fig. 6, the method provided in the embodiment includes the following steps.
Step S101, an application server receives a service request sent by a load balancing server, wherein the service request comprises an identification of a target node pool to be accessed.
Unlike the prior art, when a client initiates a service request, the service request carries an identifier of a target node pool to be accessed, and the identifier of the node pool is also called a number of the node pool, and the service request can be a hypertext transfer protocol (hypertext transfer protocol, http) request or a hypertext transfer protocol (hyper text transfer protocol over secure socket layer, https) request based on a security layer. When the client accesses the server, the identification of the target node pool to be accessed is configured in the Header of the https request according to the node pool identification agreed with the server in advance.
S102, the application server queries a target node pool according to the identification of the target node pool, and selects a normal CICS node from the target node pool as a target CICS node.
Multiple node pools may be configured in an application server, which queries a target node pool from the configured node pools based on an identification of the target node pool.
In an exemplary manner, nodes included in the target node pool are all normal-operation CICS nodes, and abnormal-operation CICS nodes are deleted from the target node pool. In the running process of the application program, normal running CICS nodes can be stored in a cache pool corresponding to the target node pool, wherein each node pool corresponds to one cache pool, the cache pool can be JavaGateWay cache pools, and when the application server selects the CICS nodes, the application server selects the normal running CICS nodes from the JavaGateWay cache pools.
Accordingly, the application server periodically reads information of a plurality of CICS nodes in the target node pool according to a pre-configured scanning period, for example, the nodes in the node pool are trained every 60 seconds or 90 seconds. For any CICS node, sending a CICS request to a background server according to the information of the CICS node, judging whether the CICS node operates normally or not according to the return result of the CICS request, wherein the return result of the CICS request can be a return code, if the return code is normal, the return is determined to be successful, and if the return code is abnormal, the return failure is determined, the CICS node operates abnormally, and the abnormal operation is also called CICS node abnormality or operation abnormality.
And deleting the CICS node from the cache pool corresponding to the target node pool when the CICS node does not normally operate. And when the CICS node normally operates, continuously storing the CICS node in a cache pool corresponding to the target node pool.
Optionally, log information of the CICS node which runs abnormally can be output, so that a worker can perform optimization processing or repair the CICS node according to the log information.
Optionally, notification information can be output to notify workers that the CICS node fails, so that the workers can repair the CICS in time.
In another exemplary manner, state information is added to each CICS node in the target node pool or the cache pool corresponding to the target node pool, where the state information is used to indicate whether the CICS node operates normally, and the application server periodically detects whether each CICS node operates normally according to the above manner, and updates the state information of each CICS node according to the detection result. Correspondingly, the application server selects a CICS node with a normal running state as a target node according to the state information of each CICS node in the target node pool.
In yet another exemplary manner, the application server selects a candidate CICS node from the target node pool, sends a CICS request to the background server according to information of the candidate CICS node, and determines whether the candidate CICS node operates normally according to a return result of the CICS request. When the candidate CICS node operates normally, determining the candidate CICS node as a target CICS node; when the candidate CICS nodes are very running, selecting one candidate CICS node from the rest CICS nodes in the target node pool, and returning to execute the step of sending the CICS request to the background server according to the information of the candidate CICS node until the CICS node which runs normally is found. This approach may result in a delay of service requests due to real-time detection of whether the CICS node is operating properly.
Optionally, when the application server selects the target CICS node in the target node pool, the application server preferentially selects the CICS node where the application server is located, and when the application server is abnormally operated, the CICS node where other servers are located is selected as the target node. Because the load balancing server performs load balancing when sending a service request to the application server, the CICS node where the load balancing server is selected can ensure the load balancing.
S103, the application server calls the target CICS node to access the background server.
And the server side assembles an XML message request corresponding to the target CICS node according to the transaction data and the transaction request of the front end and in combination with the message content agreed by the background server.
S104, the application server returns a response of the service request to the load balancing server.
The application server analyzes the XML message of the target CICS node responded by the background server, carries out corresponding logic processing, and returns the response of the service request to the load balancing server.
In this embodiment, a node pool is configured on each application server, where the node pool includes a plurality of CICS nodes, and each CICS node in the node pool can be invoked by a server where the node pool itself is located and a server where other CICS nodes are located, when the application server receives a service request sent by a load balancing server, the application server queries the target node pool according to an identifier of a target node pool to be accessed included in the service request, selects a normal operation CICS node from the target node pool as a target CICS node, and invokes the target CICS node to access a background server, and returns a response of the service request to the load balancing server. Because each application server can access other CICS nodes in the node pool besides the CICS node where the application server is located, when the CICS node where the application server is located is abnormal, the CICS node of the other server can be called to process the service request, so that the problem that the service request processing fails due to the fact that the CICS node of the application server is abnormal is solved.
Fig. 7 is a signaling flow chart of a calling method of a multi-CICS node according to the second embodiment of the present invention, and as shown in fig. 7, the method provided in this embodiment includes the following steps.
S201, configuring a plurality of CICS node information on an application server.
And configuring a plurality of CICS node information in the application program, wherein the CICS nodes belong to one or a plurality of node pools, the configuration information is configured in a file of src/main/resource/ctgConfiguration.xml in an XML format, and the configuration structure relationship of the node pools is shown by referring to FIG. 5.
S202, initializing a CICS node scanner by an application server.
When an application program is started, initializing a node pool in the src/main/resource/ctgConfiguration.xml configuration file, caching information in the node pool into CtgSendAndRecXML types, starting CICS nodes, and scanning whether each CICS node is normally started or not by a scanner.
S203, the application server trains CICS nodes of each node pool in the configuration file every 60 seconds.
When an application program is started, the node can be set to be trained every 60 seconds, and a longer or shorter period can also be set.
S204, the application server performs CICS node health check.
The health check is to detect whether the nodes in each node pool are operating normally, and perform health check on each node in each node pool in turn, and the specific health check mode is described in reference to the first embodiment, which is not described herein.
S205, the application server continuously stores the CICS nodes which normally run in the JavaGateWay cache pool.
S206, the application server deletes the CICS node which is not normally operated from the JavaGateWay cache pool and prints an error log.
The error log is log information of the CICS node which runs abnormally, so that the reasons of abnormality of the CICS node can be conveniently located later.
S207, the client adds the identification of the target node pool to be accessed in the service request according to an application program interface (Application Programming Interfac, API for short) appointed with the server.
When the client accesses the server, the identifier of the node pool needing to be accessed is configured in the Header in the https request according to the node pool identifier agreed with the server in advance.
And S208, the load balancing server distributes the service request to an application server which operates normally.
S209, the application server judges whether the CICS node needs to be called.
The application server receives the service request distributed by the load balancing server, judges whether the CICS node needs to be called according to the agreed API, executes step S209 if the CICS node needs to be called, and processes the service request if the CICS node does not need to be called.
S210, the application server queries the target node pool according to the identification of the target node pool in the service request.
S211, the application server assembles the message of the CICS node.
And the application server assembles an XML message corresponding to the CICS node according to the service data and the service request of the front end and the message content agreed by the background.
S212, the application server selects a CICS node which operates normally from the target node pool.
S213, the application server successfully accesses the background application server through the selected CICS node to perform corresponding logic processing.
S214, the application server returns a response of the service request to the client.
Fig. 8 is a schematic structural diagram of an application server provided in the third embodiment of the present invention, where the application server 100 belongs to a cluster system, and the cluster system includes a load balancing server, a plurality of application servers, and at least one background server, where each application server is deployed with a client information control system CICS node, and each application server is configured with a node pool, where configuration information of the node pool includes information of a plurality of CICS nodes, and the plurality of CICS nodes in the node pool are used to access the same background server, and all CICS nodes in the node pool can be invoked by a server where the application server is located and servers where other CICS nodes are located. The application server 100 includes: the device comprises a receiving module 11, a selecting module 12, a calling module 14 and a sending module 15.
A receiving module 11, configured to receive a service request sent by a load balancing server, where the service request includes an identifier of a target node pool to be accessed;
a selecting module 12, configured to query the target node pool according to the identifier of the target node pool, and select a normal-running CICS node from the target node pool as a target CICS node;
A calling module 13, configured to call the target CICS node to access the background server;
And the sending module 14 is used for returning the response of the service request to the load balancing server.
Optionally, the nodes included in the target node pool are normal-running CICS nodes.
Optionally, the health check module is further included for:
periodically reading information of a plurality of CICS nodes in the target node pool according to a preset scanning period;
for any CICS node, sending a CICS request to the background server according to the information of the CICS node;
judging whether the CICS node operates normally or not according to a return result of the CICS request;
and deleting the CICS node from the cache pool corresponding to the target node pool when the CICS node is abnormally operated, and storing the CICS node which is normally operated in the cache pool corresponding to the target node pool.
Optionally, the method further comprises: and the log output module is used for outputting the log information of the CICS node which runs abnormally.
Optionally, the selecting module 12 is specifically configured to:
Selecting a candidate CICS node from the target node pool;
Sending a CICS request to the background server according to the information of the candidate CICS nodes;
judging whether the candidate CICS node operates normally or not according to a return result of the CICS request;
when the candidate CICS node operates normally, determining the candidate CICS node as the target CICS node;
and when the candidate CICS nodes are very running, selecting one candidate CICS node from the rest CICS nodes in the target node pool, and returning to execute the step of sending the CICS request to the background server according to the information of the candidate CICS node.
Optionally, the information of the CICS node includes: the identification of the node pool, the identification of each CICS node, the Internet protocol IP address, the port number, the service name, the user name, the password, the timeout time, the version, the character set and the channel identification bit.
The device of the present embodiment may be used to execute the method executed by the application server in the foregoing method embodiment, and the specific implementation manner and technical effects are similar, and are not repeated herein.
Fig. 9 is a schematic structural diagram of an application server according to a fourth embodiment of the present invention, as shown in fig. 9, the application server 200 includes: the processor 21, the memory 22, and the transceiver 23, where the memory 22 is used to store instructions, the transceiver 23 is used to communicate with other devices, and the processor 21 is used to execute the instructions stored in the memory, so that the application server 200 executes the method steps executed by the application server in the above method embodiment, and detailed implementation and technical effects are similar, and are not repeated herein.
The fifth embodiment of the present invention provides a computer readable storage medium, where computer executing instructions are stored, where the computer executing instructions are used to implement a method executed by an application server in the foregoing method embodiment when executed by a processor, and detailed implementation manner and technical effects are similar, and are not repeated herein.
The sixth embodiment of the present invention provides a computer program product, which includes a computer program, where the computer program when executed by a processor implements a method executed by an application server in the foregoing method embodiment, and the specific implementation manner and technical effect are similar, and are not described herein again.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (11)
1. The calling method of the multi-CICS node is characterized by being applied to a cluster system, wherein the cluster system comprises a load balancing server, a plurality of application servers and at least one background server, a client information control system CICS node is deployed on each application server, a node pool is configured on each application server, configuration information of the node pool comprises information of the plurality of CICS nodes, the plurality of CICS nodes in the node pool are used for accessing the same background server, and the CICS nodes in the node pool can be called by the server where the CICS node is located and the servers where other CICS nodes are located; the method comprises the following steps:
The application server receives a service request sent by a load balancing server, wherein the service request comprises an identification of a target node pool to be accessed;
The application server queries the target node pool according to the identification of the target node pool, and selects a CICS node which normally operates from the target node pool as a target CICS node;
the application server calls the target CICS node to access the background server;
the application server returns a response of the service request to the load balancing server;
the method further comprises the steps of:
The application server periodically reads information of a plurality of CICS nodes in the target node pool according to a preset scanning period;
for any CICS node, the application server sends a CICS request to the background server according to the information of the CICS node;
The application server judges whether the CICS node operates normally according to the returned result of the CICS request;
when the CICS node is abnormally operated, the application server deletes the CICS node from the cache pool corresponding to the target node pool, and the CICS node which is normally operated is stored in the cache pool corresponding to the target node pool;
The selecting a normal-running CICS node from the target node pool as a target CICS node includes:
Selecting a candidate CICS node from the target node pool;
Sending a CICS request to the background server according to the information of the candidate CICS nodes;
judging whether the candidate CICS node operates normally or not according to a return result of the CICS request;
when the candidate CICS node operates normally, determining the candidate CICS node as the target CICS node;
And when the candidate CICS nodes abnormally run, selecting one candidate CICS node from the rest CICS nodes in the target node pool, and returning to execute the step of sending the CICS request to the background server according to the information of the candidate CICS node.
2. The method of claim 1, wherein the nodes included in the target node pool are normal-running CICS nodes.
3. The method as recited in claim 1, further comprising:
and the application server outputs the log information of the CICS node which runs abnormally.
4. A method according to any of claims 1-3, characterized in that the information of the CICS node comprises: the identification of the node pool, the identification of each CICS node, the Internet protocol IP address, the port number, the service name, the user name, the password, the timeout time, the version, the character set and the channel identification bit.
5. The application server is characterized by belonging to a cluster system, wherein the cluster system comprises a load balancing server, a plurality of application servers and at least one background server, a Client Information Control System (CICS) node is deployed on each application server, a node pool is configured on each application server, configuration information of the node pool comprises information of a plurality of CICS nodes, the CICS nodes in the node pool are used for accessing the same background server, and the CICS nodes in the node pool can be called by the server where the CICS nodes are located and the servers where other CICS nodes are located; the application server includes:
the receiving module is used for receiving a service request sent by the load balancing server, wherein the service request comprises an identifier of a target node pool to be accessed;
The selecting module is used for inquiring the target node pool according to the identification of the target node pool, and selecting one CICS node which normally operates from the target node pool as a target CICS node;
the calling module is used for calling the target CICS node to access the background server;
the sending module is used for returning a response of the service request to the load balancing server;
also included is a health check module for:
periodically reading information of a plurality of CICS nodes in the target node pool according to a preset scanning period;
for any CICS node, sending a CICS request to the background server according to the information of the CICS node;
judging whether the CICS node operates normally or not according to a return result of the CICS request;
Deleting the CICS node from the cache pool corresponding to the target node pool when the CICS node is abnormally operated, and storing the CICS node which is normally operated in the cache pool corresponding to the target node pool;
The selection module is specifically configured to:
Selecting a candidate CICS node from the target node pool;
Sending a CICS request to the background server according to the information of the candidate CICS nodes;
judging whether the candidate CICS node operates normally or not according to a return result of the CICS request;
when the candidate CICS node operates normally, determining the candidate CICS node as the target CICS node;
And when the candidate CICS nodes abnormally run, selecting one candidate CICS node from the rest CICS nodes in the target node pool, and returning to execute the step of sending the CICS request to the background server according to the information of the candidate CICS node.
6. The server of claim 5, wherein the nodes included in the target node pool are normal-running CICS nodes.
7. The server of claim 5, further comprising:
and the log output module is used for outputting the log information of the CICS node which runs abnormally.
8. The server according to any of claims 5-7, wherein the information of the CICS node comprises: the identification of the node pool, the identification of each CICS node, the Internet protocol IP address, the port number, the service name, the user name, the password, the timeout time, the version, the character set and the channel identification bit.
9. An application server, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
The at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the method of any one of claims 1 to 4.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1 to 4.
11. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110544845.7A CN113515375B (en) | 2021-05-19 | 2021-05-19 | Calling method and device for multiple CICS nodes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110544845.7A CN113515375B (en) | 2021-05-19 | 2021-05-19 | Calling method and device for multiple CICS nodes |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113515375A CN113515375A (en) | 2021-10-19 |
CN113515375B true CN113515375B (en) | 2024-05-24 |
Family
ID=78064628
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110544845.7A Active CN113515375B (en) | 2021-05-19 | 2021-05-19 | Calling method and device for multiple CICS nodes |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113515375B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1997024664A1 (en) * | 1995-12-29 | 1997-07-10 | Mci Communications Corporation | System and method for transferring messages between application programs running in a distributed computing environment |
CN101778017A (en) * | 2010-01-05 | 2010-07-14 | 中国工商银行股份有限公司 | Method and server for processing on-line transaction fault event of mainframe |
CN109067611A (en) * | 2018-07-13 | 2018-12-21 | 中国银行股份有限公司 | The method, apparatus of communication state, storage medium and processor between detection system |
US10216612B1 (en) * | 2016-07-01 | 2019-02-26 | Fundi Software Pty Ltd | System and method for accessing server information |
CN111176715A (en) * | 2019-12-16 | 2020-05-19 | 青岛聚看云科技有限公司 | Information calling method and server |
-
2021
- 2021-05-19 CN CN202110544845.7A patent/CN113515375B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1997024664A1 (en) * | 1995-12-29 | 1997-07-10 | Mci Communications Corporation | System and method for transferring messages between application programs running in a distributed computing environment |
CN101778017A (en) * | 2010-01-05 | 2010-07-14 | 中国工商银行股份有限公司 | Method and server for processing on-line transaction fault event of mainframe |
US10216612B1 (en) * | 2016-07-01 | 2019-02-26 | Fundi Software Pty Ltd | System and method for accessing server information |
CN109067611A (en) * | 2018-07-13 | 2018-12-21 | 中国银行股份有限公司 | The method, apparatus of communication state, storage medium and processor between detection system |
CN111176715A (en) * | 2019-12-16 | 2020-05-19 | 青岛聚看云科技有限公司 | Information calling method and server |
Also Published As
Publication number | Publication date |
---|---|
CN113515375A (en) | 2021-10-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10880231B2 (en) | Systems and methods for determining routing information for a network request | |
US9794365B2 (en) | Re-establishing push notification channels via user identifiers | |
US9774697B2 (en) | Method, apparatus, and system for pushing notification | |
WO2016184175A1 (en) | Database processing method and apparatus | |
US10958735B2 (en) | Client connection method and system | |
CN107181779B (en) | Method, device and system for processing access request | |
US10924326B2 (en) | Method and system for clustered real-time correlation of trace data fragments describing distributed transaction executions | |
CN113259479B (en) | Data processing method and equipment | |
CN113347037B (en) | Data center access method and device | |
US10645183B2 (en) | Redirection of client requests to multiple endpoints | |
CN112003721B (en) | Method and device for realizing high availability of large data platform management node | |
US8671180B2 (en) | Method and system for generic application liveliness monitoring for business resiliency | |
CN113515375B (en) | Calling method and device for multiple CICS nodes | |
CN111162952A (en) | Equipment fault tolerance method and device | |
CN116414628A (en) | Transaction request processing method and device in new and old system switching process | |
CN115580658A (en) | Service access method and device, storage medium and electronic equipment | |
US20180048697A1 (en) | Method and apparatus for detecting access path | |
CN105245512B (en) | A kind of unidirectional file transmission method and the server for realizing the transmission method | |
CN112363887A (en) | Distributed application monitoring method and device and storage medium | |
CN113220491B (en) | Remote call self-adaptive load balancing method, device and system and computer equipment | |
CN114448703B (en) | Request processing method, request processing device, electronic equipment and storage medium | |
US20240231878A1 (en) | Application chaos injection for improved system resilience | |
US11876684B1 (en) | Controlled cross-cell migration of data in cell-based distributed computing architecture | |
CN117560248A (en) | Database access method, database gateway device, electronic device, and storage medium | |
CN116488897A (en) | Method, system, electronic equipment and storage medium for deploying privately-owned items |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |