WebRTC has had a real tough three or four years, and so have those working with it. Only a few short years ago, the development world were excited about WebRTC and proclaiming how awesome it was.
You might have played with the technology a couple of years ago, only to find the extra infrastructure requirements were painful to implement and poorly documented. This probably left a bitter taste in your mouth, especially when things went wrong.| By AppDynamics Blog | Article Rating: |
|
| January 22, 2016 03:45 PM EST | Reads: |
144 |
Beyond the Box: Redis Transaction Correlation for Node.js
By Peter Holditch
Looking at your nodes
The AppDynamics Pro product has boasted an agent for instrumenting Node.js application components for several releases now, which is providing many customers with end to end transaction visibility across their applications incorporating Node.js tiers, as well as - uniquely - method level drill-down into the javascript code itself.

In common with the other AppDynamics application agents, the Node.js agent recognises the arrival of http traffic as starting a transaction and also auto-detects many common exit points (places where the code makes requests of downstream systems) out of the box, including outbound http calls, queries on various databases and accesses to the memcached and redis caches.
As caches go, however, redis is a slightly unusual beast in that in addition to storing name.value pairs of data in memory for fast access, it also provides message broker functionality, allowing application processes to interact via publish/subscribe messaging. I recently came across a customer who was using redis to pass requests (and return responses) between services implemented in Node. To illustrate this, I have a sample app showing this communication between 2 simple simple services.
The app either runs as the http entry point for requests ("node example.js -entry") or as a service ("node example.js -service") (for those readers wanting to follow along with the javascript action at home, the sources are available here)
When these two commands are run, the out of the box instrumentation yields the following flowmap:

Unfortunately, this does not look anything like the request/response interaction between 2 application tiers that we know is really going on under the hood. We only see the entry tier of the application, apparently accesing a Redis cache.
The service tier is missing entirely since only tiers executing transactions appear on the flowmap and we do not recognise the arrival of a message on the Redis bus as constituting a transaction entry point and the sending of a message over the Redis bus appears as a cache access since that is the only Redis use-case supported by the out of the box instrumentation.
Fortunately, the Node.js agent provides a java script API we can use to customise the agent's behavior.
Fear not, we can customize it
In order to follow the transaction flow through this Node application, we are going to need to do a couple of things:
- Recognize calls to the redis message bus as exits
- tag-and-follow the pub/sub messages that flow through Redis, to facilitate end to end correlation of the transaction flow
- Recognize the arrival of messages arriving from the Redis bus as starting a transaction
Given that I wrote, and you are reading, this article it will not surprise you to know that the AppDynamics Node agent API provides for all three of these eventualities.
Recognizing the calls to the Redis message bus
To do this, we will need to suppress the out of the box identification of the Redis exit, and then create our own custom exit point.
Suppressing the out of the box handling requires us to implement the beforeExitCall callback. If our callback does not return anything, the default handling of the exit is suppressed. We do this conditionally for Redis exits to avoid impacting other exits which we may want:

Note we also had to add a call to the startTransaction API in order that we could interact with the agent's view of the http transaction, which the out of the box HTTP entry support started for us.
Now we have suppressed the out of the box exit handling for Redis, we need to add the code to establish our custom redis exit:

Where the original code simply includes a call to its publish function, the AppDynamics instrumented version surrounds this code with calls to startExitCall and endExitCall to delimit the call itself.
Tagging and following transactions
AppDynamics tags and follows transactions by adding a correlation string to the payload. Depending on the protocol, this can be added in the message header or the message payload itself.
Since Redis publish / subscribe simply delivers a payload with no bus-level headers we can use, we will transport the correlation string as a field in the JSON payload.
The correlation string, obtained via a call to createCorrelationInfo, is added to the JSON message payload in the ci field.
Note that since this example only contains one client tier and one service tier we can directly correlate the tiers in the call, which means the identifying properties we passed to the startExitCall call will be mapped by ApDynamics to a single destination tier.
If, as is entirely possible in a pub/sub messaging model, the message could arrive at multiple destinations the optional doNotResolve flag should be set on the createCorrelationInfo call, which tells AppDynamics to expect a 1:many interaction between the single client (producer) and multiple consumers and suppress this mapping.
Recognizing Redis pub/sub message arrival
The final piece of the jigsaw is detecting the arrival of messages across Redis and causing this to start a continuing segment of the transaction (the sample does this twice, once for the arrival of the request at the service and again to handle correlation of the reply from the service before the http response is written)
Unsurprisingly, the startTransaction API is used to start the transaction. Since it is a continuing transaction segment, this needs to process the incoming correlation string, which is obtained through the parseCorrelationInfo API, which is simply passed the string from the incoming payload.

Of course, you also see the reappearance of the code to suppress the default Redis exit handling and the dispatch of the service reply message through the Redis bus wrapped as an exit.
Putting it all together
Putting all the above into practise in the application code yields the following flowmap, which looks like we would expect, given our understanding of the workload:

Job done!
I hope I have shown you how flexible the Node agent is in terms of being able to accommodate scenarios that don't work out of the box.
In conclusion... Rest assured; even if your application flowmap doesn't appear out of the box "by magic", never fear... AppDynamics has the flexibility and simplicity to get the job done easily!
The post Beyond the Box: Redis transaction correlation for Node.js appeared first on Application Performance Monitoring Blog | AppDynamics.
Read the original blog entry...
Published January 22, 2016 Reads 144
Copyright © 2016 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By AppDynamics Blog
In high-production environments where release cycles are measured in hours or minutes — not days or weeks — there's little room for mistakes and no room for confusion. Everyone has to understand what's happening, in real time, and have the means to do whatever is necessary to keep applications up and running optimally.
DevOps is a high-stakes world, but done well, it delivers the agility and performance to significantly impact business competitiveness.
WebRTC has had a real tough three or four years, and so have those working with it. Only a few short years ago, the development world were excited about WebRTC and proclaiming how awesome it was.
You might have played with the technology a couple of years ago, only to find the extra infrastructure requirements were painful to implement and poorly documented. This probably left a bitter taste in your mouth, especially when things went wrong.Jan. 22, 2016 10:30 PM EST Reads: 451 |
By Elizabeth White For manufacturers, the Internet of Things (IoT) represents a jumping-off point for innovation, jobs, and revenue creation. But to adequately seize the opportunity, manufacturers must design devices that are interconnected, can continually sense their environment and process huge amounts of data.
As a first step, manufacturers must embrace a new product development ecosystem in order to support these products. Jan. 22, 2016 09:15 PM EST Reads: 445 |
By Liz McMillan Jan. 22, 2016 06:15 PM EST Reads: 167 |
By Elizabeth White When it comes to IoT in the enterprise, namely the commercial building and hospitality markets, a benefit not getting the attention it deserves is energy efficiency, and IoT’s direct impact on a cleaner, greener environment when installed in smart buildings. Until now clean technology was offered piecemeal and led with point solutions that require significant systems integration to orchestrate and deploy. There didn't exist a 'top down' approach that can manage and monitor the way a Smart Buildi...Jan. 22, 2016 05:45 PM EST Reads: 866 |
By Liz McMillan Jan. 22, 2016 04:30 PM EST Reads: 160 |
By Pat Romanski Jan. 22, 2016 03:30 PM EST Reads: 167 |
By Elizabeth White Jan. 22, 2016 01:45 PM EST Reads: 454 |
By Elizabeth White SYS-CON Events announced today that Fusion, a leading provider of cloud services, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY.
Fusion, a leading provider of integrated cloud solutions to small, medium and large businesses, is the industry's single source for the cloud. Fusion's advanced, proprietary cloud service platform enables the integration of leading edge solutions in the cloud, including clou...Jan. 22, 2016 01:45 PM EST Reads: 354 |
By Elizabeth White Jan. 22, 2016 01:30 PM EST Reads: 457 |
By Liz McMillan SYS-CON Events announced today that Interface Masters Technologies, a leading vendor in the network monitoring and high speed networking markets, will exhibit at the 18th International CloudExpo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, New York, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.Jan. 22, 2016 01:00 PM EST Reads: 469 |
By Elizabeth White The Internet of Things is in the early stages of mainstream deployment but it promises to unlock value and rapidly transform how organizations manage, operationalize, and monetize their assets. IoT is a complex structure of hardware, sensors, applications, analytics and devices that need to be able to communicate geographically and across all functions. Once the data is collected from numerous endpoints, the challenge then becomes converting it into actionable insight.Jan. 22, 2016 01:00 PM EST Reads: 557 |
By Elizabeth White Contextual Analytics of various threat data provides a deeper understanding of a given threat and enables identification of unknown threat vectors.
In his session at @ThingsExpo, David Dufour, Head of Security Architecture, IoT, Webroot, Inc., discussed how through the use of Big Data analytics and deep data correlation across different threat types, it is possible to gain a better understanding of where, how and to what level of danger a malicious actor poses to an organization, and to determ...Jan. 22, 2016 12:45 PM EST Reads: 921 |
By Elizabeth White Jan. 22, 2016 12:45 PM EST Reads: 424 |
By Carmen Gonzalez NHK, Japan Broadcasting, will feature the upcoming @ThingsExpo Silicon Valley in a special 'Internet of Things' and smart technology documentary that will be filmed on the expo floor between November 3 to 5, 2015, in Santa Clara. NHK is the sole public TV network in Japan equivalent to the BBC in the UK and the largest in Asia with many award-winning science and technology programs. Japanese TV is producing a documentary about IoT and Smart technology and will be covering @ThingsExpo Silicon Val...Jan. 22, 2016 12:00 PM EST Reads: 561 |
By Elizabeth White As the Internet of Things becomes more capable, moving from an initial ad hoc bundle of chaos to an optimized set of interconnected assets, we will need to ensure it performs and is reliable.
But this means the tools measuring the performance and reliability of the IoT will also need to mature as the need for timely, understandable, quality, business-critical information becomes paramount. Sensors that are malfunctioning, devices that are offline, data that’s little more than noise can all scut...Jan. 22, 2016 11:15 AM EST Reads: 439 |
By Elizabeth White With the exponential growth of network traffic slowing down data transmission, companies are looking for solutions. Recently, a solution has emerged that can help improve your data speed with data centers on the edge. These micro data center solutions can simplify the lives of many data center owners and operators because they are self-contained, secure computing environments, assembled in a factory and shipped in one enclosure which includes all the necessary power, cooling, security, and manag...Jan. 22, 2016 11:00 AM EST Reads: 639 |
By Elizabeth White Jan. 22, 2016 10:30 AM EST Reads: 183 |
By Liz McMillan There are so many tools and techniques for data analytics that even for a data scientist the choices, possible systems, and even the types of data can be daunting.
In his session at @ThingsExpo, Chris Harrold, Global CTO for Big Data Solutions for EMC Corporation, showed how to perform a simple, but meaningful analysis of social sentiment data using freely available tools that take only minutes to download and install. Participants received the download information, scripts, and complete end-t...Jan. 22, 2016 10:00 AM EST Reads: 841 |
By Pat Romanski Jan. 22, 2016 10:00 AM EST Reads: 143 |
By Pat Romanski Jan. 22, 2016 08:45 AM EST Reads: 324 |

For manufacturers, the Internet of Things (IoT) represents a jumping-off point for innovation, jobs, and revenue creation. But to adequately seize the opportunity, manufacturers must design devices that are interconnected, can continually sense their environment and process huge amounts of data.
As a first step, manufacturers must embrace a new product development ecosystem in order to support these products.
When it comes to IoT in the enterprise, namely the commercial building and hospitality markets, a benefit not getting the attention it deserves is energy efficiency, and IoT’s direct impact on a cleaner, greener environment when installed in smart buildings. Until now clean technology was offered piecemeal and led with point solutions that require significant systems integration to orchestrate and deploy. There didn't exist a 'top down' approach that can manage and monitor the way a Smart Buildi...
SYS-CON Events announced today that Fusion, a leading provider of cloud services, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY.
Fusion, a leading provider of integrated cloud solutions to small, medium and large businesses, is the industry's single source for the cloud. Fusion's advanced, proprietary cloud service platform enables the integration of leading edge solutions in the cloud, including clou...
SYS-CON Events announced today that Interface Masters Technologies, a leading vendor in the network monitoring and high speed networking markets, will exhibit at the 18th International CloudExpo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, New York, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
The Internet of Things is in the early stages of mainstream deployment but it promises to unlock value and rapidly transform how organizations manage, operationalize, and monetize their assets. IoT is a complex structure of hardware, sensors, applications, analytics and devices that need to be able to communicate geographically and across all functions. Once the data is collected from numerous endpoints, the challenge then becomes converting it into actionable insight.
Contextual Analytics of various threat data provides a deeper understanding of a given threat and enables identification of unknown threat vectors.
In his session at @ThingsExpo, David Dufour, Head of Security Architecture, IoT, Webroot, Inc., discussed how through the use of Big Data analytics and deep data correlation across different threat types, it is possible to gain a better understanding of where, how and to what level of danger a malicious actor poses to an organization, and to determ...
NHK, Japan Broadcasting, will feature the upcoming @ThingsExpo Silicon Valley in a special 'Internet of Things' and smart technology documentary that will be filmed on the expo floor between November 3 to 5, 2015, in Santa Clara. NHK is the sole public TV network in Japan equivalent to the BBC in the UK and the largest in Asia with many award-winning science and technology programs. Japanese TV is producing a documentary about IoT and Smart technology and will be covering @ThingsExpo Silicon Val...
As the Internet of Things becomes more capable, moving from an initial ad hoc bundle of chaos to an optimized set of interconnected assets, we will need to ensure it performs and is reliable.
But this means the tools measuring the performance and reliability of the IoT will also need to mature as the need for timely, understandable, quality, business-critical information becomes paramount. Sensors that are malfunctioning, devices that are offline, data that’s little more than noise can all scut...
With the exponential growth of network traffic slowing down data transmission, companies are looking for solutions. Recently, a solution has emerged that can help improve your data speed with data centers on the edge. These micro data center solutions can simplify the lives of many data center owners and operators because they are self-contained, secure computing environments, assembled in a factory and shipped in one enclosure which includes all the necessary power, cooling, security, and manag...
There are so many tools and techniques for data analytics that even for a data scientist the choices, possible systems, and even the types of data can be daunting.
In his session at @ThingsExpo, Chris Harrold, Global CTO for Big Data Solutions for EMC Corporation, showed how to perform a simple, but meaningful analysis of social sentiment data using freely available tools that take only minutes to download and install. Participants received the download information, scripts, and complete end-t...
IoT depends to a large part on the availability of custom hardware of sensors that can be efficiently manufactured with exacting tolerances in its specifications. Smart Parts manufacturing will be one of the key technologies required to address the IoT 3D Sensors and 3D Antennae.
Optomec which manfuactures production grade 3D printers can manufacture parts both in plastics and metals.
Shivon Zilis is an investor at Bloomberg Beta, a very interesting early stage venture capital fund. I knew I would like Bloomberg Beta when I saw how they do their website. It is smart and reflects very well on their leadership team: They decided to leverage GitHub for their site. Doing so puts them one step closer to the creators that a VC in their space needs to know and is a great way to step out in a trust-based relationship. It is also a great way to be more transparent- they use GitHub to provide their entire operating manual for all to see.
Printed electronics are being touted as the next best thing in Internet of Things (IoT), the technology that is rightly regarded as a boon of advancing technology. Silicon-based sensors are the first that have been associated with IoT technology. These sensors have numerous applications, such as track data from airplane, wind turbines, engines, and medical devices, among other internet connected devices.
With another New Year upon us, I’ve found that as an industry we’re once again spending a lot of time looking forward, which is a good thing, but also not enough time grounded in the present or even the past, which absolutely can be a bad thing, especially for network administrators. After all, as the old adage goes: “Those who do not learn history are doomed to repeat it.”
Remember when the Internet became ubiquitous in the workplace? We weren’t prepared for that spike in capacity and had to scramble to fix existing issues to accommodate the influx of network usage. The same thing happened ...
As smart cars, pre-loaded with millions of lines of code, are becoming the norm in the automotive industry, the topic of safety has come to the forefront of the conversation in a big way. Most consumers remember several large-scale recalls in the past few years, and it’s left some a bit wary of software glitches that could affect driver safety.
There's no doubt that there's a lot more "connected things" these days and that means a lot more data. Specifically, technology is moving out of the consumer's hands and into Healthcare, Oil & Gas, Transportation, Aviation and more. The spread of smart devices and sensors creates new forms of value and brings challenges for enterprises seeking to exploit this technology. However, while this boom in data has the potential to advance the industrial space in ways never before thought possible, few companies today have the right technologies in place or the right business models that can truly uti...
Fresh off the Vegas-style hypefest that is the Consumer Electronics Show, fitness wearables darling Fitbit is already in hot water. Numerous customers, furious at the inaccuracies of Fitbit’s devices, filed a national class-action lawsuit on January 5.
“Plaintiffs and many consumers like them have experienced—and testing confirms—that the [Fitbit] PurePulse Trackers consistently mis-record heart rates by a very significant margin, particularly during exercise,” the lawsuit alleges. “Far from ‘counting every beat,’ the PurePulse Trackers do not and cannot consistently and accurately record wea...
Seismic monitoring tends to pop up in the news only during disaster situations, or, more recently, in conjunction with North Korea’s possible detonation of a hydrogen bomb. Earlier in 2015, The New Yorker ran a piece, “The Really Big One,” looking at the probability of a large earthquake destroying the Pacific Northwest. The earthquake off the coast of Japan in 2011 triggered one of the largest nuclear plant meltdowns of recent history, the impact of which we are still dealing with today.
Point being, the typical association with seismic monitoring – earthquakes and explosions – is negative. ...
The Internet of Things is slowly building up its core capabilities to start solving problems that can really benefit from it. Let’s talk about the manufacturing vertical and why the Internet of Things may open up doors previously impossible to crack open.
I love having conversations that are specific. Although being open and having a 10,000 ft. overview sometimes helps, it’s the nitty-gritty of things that makes them more interesting. Manufacturing is one of the founding pillars of any full-grown and stable economy. World economic output through manufacturing alone touches a multiple trillion...
Over the past couple of years IoT has become the most hyped word around the world, and rightly so because we all know IoT is here to stay.
So what is IoT?
IoT stands for the Internet of Things. It refers to the devices that are connected through the internet. The basic concept is connecting any device with an on and off switch to the Internet, devices such as cell phones, wearable devices, coffee machines, connected homes even your refrigerator and all those things you can think of.
We have collected a list of factors that will demonstrate how rapidly this sector is growing, and some mind-b...
It’s that time of year that I review everything that I’ve written over the past year and share my favorite blogs. As many of you know, I travel frequently and because I’ve continuously seen every airline movie, I have plenty of time to write. And according to the commentary, every now and then I have a good one. So here are my Top 10 Blogs from 2015!
Imagine if Ben Grimm, aka The Thing, didn’t have such distinctive characteristics like an orange rocky body, blue eyes or his battle cry, ‘It’s Clobberin’ Time!’ and had to provide a photo ID and password to prove he was a founding member of the Fantastic Four. Or if the alien in John Carpenter’s The Thing gave each infected life-form the proper credentials to come and go as they please. Today the things we call ‘Things’ are infiltrating every aspect of society but how do organizations identify, secure and determine access for the 15+ connected chips employees will soon be wearing to the offic...
Our list of Truly Useful Artificial Intelligence Tools You Can Use Today was out of date the minute we published it. We knew that would happen and are absolutely thrilled when we discover new capabilities that belong on this list. One we just learned about is EverLaw, provider of perhaps the world's most advanced litigation platform, designed to be easy to use and programmed to leverage the most powerful technologies available, including cloud computing, mobile solutions and yes, artificial intelligence.
Gone are the days of limited connectivity—at least that’s the plan this year. According to Wireless Design Magazine, The Broadband Alliance has announced plans to hosts a world Wi-Fi-day. This global initiative has teamed up with more than 135 technology companies to help encourage all utilize the IoT and IIoT to its fullest, by taking steps to help business, industry and neighborhoods have access to quality wireless.
Now as you reach for your smart device, smart machine or connected thing, hold on tight wireless is taking you to the deep end. Don’t worry you can handle it. Enjoy this week’s ...
In the previous blog I did a high-level overview of Angular 2 router and wrote a basic routing application that demonstrated displaying different components in a predefined area of the window. We often need not only display a component, but also pass some data to it.
For example, if we navigate from the Home to the Product Detail route we need to pass the product ID to the destination route. Angular offers a directive RouteParams so a route can receive data from the parent component. There is also a RouteData directive that can be used to pass additional data to a route from the @RouteConfig ...























