Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Asynchronous Transactions Power Real-time Web Applications

DZone's Guide to

Asynchronous Transactions Power Real-time Web Applications

· Performance Zone
Free Resource

Transform incident management with machine learning and analytics to help you maintain optimal performance and availability while keeping pace with the growing demands of digital business with this eBook, brought to you in partnership with BMC.

Real-time web applications are becoming very popular in this software-defined world. “Real-time” often means a very quick response time from the web/application server. In modern programming, it is typically accomplished by making a series of non-blocking asynchronous calls. Most of the popular programming languages are now supporting asynchronous transactions. Node.js, for example, was primarily developed to efficiently process I/O intensive real-time web requests by making event-driven non-blocking asynchronous calls.  

Before we talk more about asynchronous transactions and how to measure its performance, let me give an example of an asynchronous transaction. I live in the silicon valley where many of us are slaves of our home mortgage. I go to my mortgage bank account many times to look for my account balance. Looking up the balance from the online mortgage account is a synchronous transaction where I request for balance, the server sends the information and I see it in my browser.

Screen Shot 2015-06-29 at 12.02.43 AM.png

However, refinancing the mortgage is an asynchronous transaction where I initiate the transaction by submitting the online mortgage refinance application. The bank needs to perform multiple back-end activities like ordering a credit report, ordering a home appraisal, underwriter reviews, locking rates, presenting conditions, approving loans, signing loans, funding and closing the loan. Some of these can happen in parallel, and some need to wait for other activities to finish. The refinance process is only completed after it is funded and closes. So, the correct measure of a refinance transaction is the end-to-end time between the application to close, instead of the response time for submitting the application.  

Similarly, in order to measure the performance of an asynchronous transaction correctly, you will need to compute and track the end-to-end latency of an asynchronous transaction rather than the response time of initiating the client request.

AppDynamics discovers asynchronous transactions, computes the end-to-end latency of the transaction and uses this metric to track business transaction performance. AppDynamics Summer ‘15 (4.1) release introduced many configuration and visualization enhancements for asynchronous transaction performance monitoring making it the most robust solution.  

The Server Monitoring dashboard provides a comprehensive summary of all server resources – CPU, memory, storage and networking. In addition, the dashboard also provides details about the top ten processes consuming CPUs and memory on the dashboard.

Asynchronous Business Transaction Discovery – AppDynamics discovers a lot of frameworks and services out of the box for asynchronous transactions. Examples of some such frameworks are Azure Service Bus, Azure Table Storage, WCF async, IBM ActiveMQ, and many more.

Asynchronous Transaction Demarcation - Since async transactions come in a lot of custom flavors, and it’s not possible to discover all of them out of box, AppDynamics makes it easy for customers to specify where a business transaction ends. We do this by letting customers tell us explicitly where the transaction ends. They can configure this by specifying a class/method or a tier with last thread execution.

asyncconfig.png.jpeg

It’s possible to use the asynchronous transaction configuration to specify more than one demarcator for a particular business transaction. When there are multiple demarcation points, the first one that is satisfied is used as the end-to-end processing time.

End-to-end Latency – After the asynchronous transaction is discovered, or the end of the transaction is configured, the end-to-end latency is calculated and appears in the metric browser view for the node and for the overall application. The end-to-end latency transaction scorecard appears in the business transaction flow map, as shown in the following screenshot:

Asynch Transaction.png

Also, the end-to-end latency metric shows up the business transaction list, snapshots, etc.

Asynchronous Transaction Visualization – AppDynamics clearly marks all asynchronous calls via dotted lines in all the flow maps. Also, there are special visualizations for asynchronous transactions, for example, waterfall view for snapshots as shown below:

Application Dashboard - AppDynamics Google Chrome, Today at 1.13.14 PM.png

To learn more about the latest enhancements for asynchronous transaction performance monitoring and see a live demo, check out our on-demand webinar.

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

Topics:
application performance monitoring ,application monitoring ,web performance monitoring ,performance ,asyhch

Published at DZone with permission of Anand Akela, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}