📜 ⬆️ ⬇️

Transaction monitoring, my little success story

In this article I want to share an example of the implementation of monitoring business transactions. The reasoning will lead on the example of the stand with the banking application, I will use the Hewlett-Packard product - HP Transaction Vision to monitor transactions.

Go to the point!


There is a banking application developed on the j2ee platform that runs on the IBM WebSphere Application Server version 8.5 application server, uses IBM WebSphere MQ and Oracle database.

Banking application through a web interface allows you to manage customer accounts. We consider the operation of transferring money from one account to another, then we will call this operation a transaction.

A transaction is an atomic sequence of actions, i.e. such a sequence, which is performed entirely or nothing.
')
Now I demonstrate the interface of my banking application, showing what happens as part of our transaction on the part of the user:
  1. Log in;
  2. Go to the transfer of funds;
  3. We select the account of write-off, the account of the recipient, specifies the amount;
  4. We confirm the operation;
  5. We see a change in the state of the account or an error message operation.

Below is what the user sees:






What happens with the system:


  1. The banking application receives an HTTP request to transfer the specified amount from account 1 to account 2;
  2. The banking application redirects the request to the IBM WebSphere MQ server to queue Q1;
  3. Message Driven Bean (MDB) retrieves the request from the Q1 queue;
  4. MDB performs the necessary actions for the transfer of funds, in my case it is a set of SQL queries to the Oracle database;
  5. The result of the transfer of funds MDB informs the banking application through the Q2 queue, i.e. the results of the transaction are reported exactly in it;
  6. After reading the message in the Q2 queue, the banking application returns the result of the transaction.

Below is an illustration of the events described in relation to the infrastructure:


Same events, but in the sequence diagram:


HP Transaction Vision


As I said, I have deployed a Hewlett Packard product - HP Transaction Vision. I will describe now what HP Transaction Vision performs:
  1. Intercepts HTTP calls to the banking application;
  2. Intercepts JMS calls from a banking application and MDB;
  3. Intercepts queue manager invocation API - IBM WebSphere MQ;
  4. Intercepts JDBC calls;
  5. Intercepted messages are sent to a single processing point;
  6. Using event handling rules, information about completed transactions is collected: time, result, amount, etc.


Technical capabilities, methods of configuration is not the subject of discussion of this article, if any questions arise on this topic is ready to answer.

To demonstrate the results, I conducted three types of testing.
  1. All data is entered correctly. At the end of the transaction, the banking application reports the success of the transaction;
  2. Deliberately making a mistake, indicating the amount of the transfer is more than what is on the account debit. At the end of the transaction, the banking application reports an erroneous transaction;
  3. I stop the MDB application, i.e. I create a situation where transaction execution requests “hang” in the IBM WebSphere MQ queue - Q1. Then I turn on the MDB application back, thereby increasing the transaction execution time.

I propose to remember all three types of testing, because I will refer to them, while further demonstrating the various options for presenting information about transactions. I’m clarifying, showing only the pictures that the HP Transaction Vision product shows us.

Examples of events coming to a single processing point:


List of detected transactions:


Summary report of detected transactions:


The overall architecture of my application, the interaction between components (HP Transaction Vision and it can):


I’ll add to the subject of HP Transaction Vision that he is able to notify when certain transaction conditions occur: too long, erroneous result, etc.

HP Business Process Insight


For the sake of completeness, I deployed HP Business Process Insight (BPI), which receives transaction flow events from HP Transaction Vision. It is HP BPI that allows you to know at what stage and how many transactions are currently located + the transaction processing time at each stage.

Here is what HP BPI picture I can show:


All who were interested and who have any questions, I am pleased to invite you to the dialogue.
Ref to previous topic

Source: https://habr.com/ru/post/229413/


All Articles