All posts by Ryan Shriver

Ryan Shriver is a Managing Consultant with Dominion Digital, an award-winning process and technology-consulting firm. Based in Richmond, VA he leads their Innovative Products solution that helps people deliver the right products at the right time, quickly with high quality. With services related to experience, value, speed and quality, he helps clients holistically focus on improving their customer's experience.Working with Internet technologies since 1995 and practicing Agile since 2001, Ryan has deep experience in systems architecture and large-scale agile product development. He's presented internationally on topics including Scaling Agile, Measurable Business Value and Agile Engineering. He's founder and program chair of Innovate Virginia and posts is thoughts, articles and conference presentations to the agile engineer.

APM for Agile and DevOps: 7 practical use cases

APM for AgileApplication Performance Management (APM) solutions are historically monolithic systems used by IT operations for monitoring the performance of production applications. But this trend is changing quickly. A combination of agile and DevOps methods combined with cloud computing and a new generation of DevOps focused APM products are adding value throughout the agile development lifecycle – far beyond application support.

Legacy APM tools are generally expensive, complex, require lots of configuration to get working and are fragile when application ecosystems change. They were designed for applications running on physical hardware that rarely change – the antithesis of agile development in the cloud. These new breed of APM products including AppDynamics, New Relic, dynaTrace, Foglight and VMware vFabric APM amongst others still do what their predecessors did, but now they’re increasingly being embraced by developers, testers and DevOps team members. These people are using APM to add value during analysis, design, development and testing phases too.

This article highlights specific ways agile teams are using APM outside IT operations, starting from a project’s kickoff.

#1 – Kickoff

APM Setup Checklist

As a part of starting a new project or product, many agile teams do a Sprint 0. This Sprint is primarily focused on technical tasks and planning so that new feature development can begin in Sprint 1. While the product team is focused on writing the initial user stories, the technical team can focus on hooking up APM to their application while integration is still simple. This, along with other stories for continuous integration, code management can be done.

These steps might be largely manual at first or if they occur rarely. However, if setting up new applications or projects is a common than these can be largely automated. Tools like Puppet can script the installation of the controller and/or agents as a part of environment setup. Agent configuration file(s) can be packaged with application frameworks so new applications are automatically configured to communicate with the controller.

If you’re developing in a PaaS solution such as Heroku or Azure, integrating a new application with APM is even simpler. Just enable in your PaaS management dashboard and you’re set.

#2 – Analysis

Most agile teams capture functional requirements in the user story format: As a <Persona>, I would like to <Do Something>, so that I can <Achieve Some Result>

NFR for Performance

Along with each user story are a set of acceptance criteria that defines specifies when a user story is “done”. Often acceptance criteria may include non-functional requirements related to performance, scalability and resiliency. Teams often struggle with how to test these during development, and area where APM can help.

Defining a non-functional requirement can be as simple as as the example above. The method alone clearly stakes which APM metric from which dashboard, under what amount of load and for what percentage of users. This clarity of requirement not only sets expectations with internal stakeholders including architects and developers, it’s also something that can be easily integrated into a business-facing dashboard built in the APM product during development and available after release.

#3 – Design & Development

During development APM is a supplemental tool to the team, not something necessarily used everyday but a very handy tool for running down issues, such as why a particular test failed or why page load times are slow for single users. They can also identify poor design decisions and raise them to the surface, something that occurred on a recent project I audited.

Two companies were charged with building a new customer service web site for a client. One focused on the CMS and web application. The other on creating web services to expose data in legacy systems to customers. During design the legacy team insisted on creating fine grained web services because it was the least expensive option and easiest to do. The project manager agreed and teams moved forward. The web team’s user story requirements called for a year’s worth of transaction data to be displayed on the web page. The web team  implemented the story, making the right API calls, and the functional tests passed.

Soon thereafter developers and testers started complaining about the slow load times. They hooked up their APM tool and discovered the offending page was making 117 web service calls to get the required data to load the page. Although each call was less than 400 milliseconds, the sheer number made the performance horrible. The web team brought this information to the legacy team’s attention, showed them the APM data. Then they quickly worked out a single API call that took additional parameters but made the integration much simpler and faster. Once each team refactored their code the page load time dropped dramatically.

Solving integration problems like these are a part of a developer’s life. Without the right tooling, some of these problems may take days or weeks to resolve and potentially result in a whole bunch of hand-written diagnostic code.

The new breed of APM tools get this reality and are increasingly focusing their attention on developers and not just operations. In addition to free developer versions of their products, APM vendors are forming partnerships with PaaS vendors (such as New Relic with Heroku and AppDynamics with Azure) to make integrating monitoring into your applications very simple.

#4 – Functional Testing

Agile teams leverage automated testing as a normal part of their sprints. While developers focus on automated unit testing, quality assurance typically focuses on integration and acceptance testing. During each sprint APM is hooked up to the application in the test environment(s). If one of the automated tests fail at a specific time, the corresponding snapshot of the failed transactions at that same time can be captured from APM to enable further analysis. Tools like Splunk can also help here as well, enabling developers and testers to collaboratively solve issues uncovered by testing – especially tough ones such as bugs that are only reproducible under certain conditions.

#5 – Performance Testing

This is one of the most popular uses of APM as it helps architects, developers and testers answer questions such as: what really happens to the application under load and can the application support the customer demand?

Modern APM’s are essentially application profilers that have such a low overhead they can run all the time without negatively impacting an application’s performance. Gone are the days of hooking up an application profiler, running tests and having your results skewed greatly because of their invasive overhead. Today’s APM tools give developers the same drill down capabilities – such as identifying the problem line of code or SQL statement – that profilers traditionally provided but without the overhead and extra setup.

What this means is that during performance tests, a team can in real-time watch the application’s performance under load and diagnose issues on the fly. They can also save off results for post-analysis. APM’s are useful for clearly identifying bottlenecks and limitations on scalability. They bring these issues to the attention of the team who are in the best position to fix them, whether this be tweaking a configuration parameter or refactoring code. They’re also useful for recording previous performance test runs so teams can do comparisons between releases to look for any subtle trends.

It’s no secret that faster applications generate more revenue and better customer experience. Amazon notes that every 100 millisecond drop in response times yields a 1% sales decline (that’s a $200M+ potential revenue impact). Google notes that a 500 millisecond drop in response times results in 20% less search traffic. This means the new APM tools are delivering value not only by reducing resolution times (costs), but also improving performance (revenues) – a great position for any product.

#6 – Production Deployment

APM is particularly helpful during new releases to production, which can be nerve-racking events themselves. Most vendors have a way to indicate a change to production such that post-release metrics (such as response time) can be compared with pre-release metrics. Should something look amiss or there’s a performance problem identified, the decision can be made to quickly rollback and investigate. Data from the APM tool can be used as a part of this analysis to figure out what went wrong before attempting the next release.

This same basic process can be applied to teams practicing continuous deployment. But instead of relying on humans to do the release analysis, this is automated so only exceptions are raised to the attention of humans, otherwise the same post-launch checks are all done via automated tests and validated in part using APM. Should issues arise, workflow scripts can be created to send issues to the organizations incident management system. A table of popular DevOps competent APM tools for use in dynamic and cloud based environments is below.

DevOps Focused APM Tools

Vendor/ProductProduct FocusDeployment MethodData Collection Method Supported App TypesApplication Topology Discovery Cloud Ready “Zero- Config”Deep Code Diagnostics
AppDynamicsMonitor custom developed Java and .NET applications across internal and external (cloud) deploymentsOn Premise/SaaSAgent inside of the Java JVM or the .NET CLRJava/.NET
dynaTrace (Compuware)Monitoring of complex enteprise applicatons that are based on Java or .NET but which may include complex enterprise middleware like IBM MQ and CICSOn PremiseAgent inside of the Java JVM or the .NET CLRJava/.NET, Websphere Message Broker CICS, C/C++

New Relic RPMMonitor custom developed Java, .NET, Ruby, Python, and PHP applications across internal and external (cloud) deploymentsSaaSAgent inside of the Java JVM, NET CLR, or the PHP/Python runtimeRuby/Java/ .NET/PHP/Python

Quest FoglightMonitor custom developed Java and .NET applications and trace transactions across all physical and virtual tiers of the applicationOn-PremiseAgent inside of the Java JVM or the .NET CLRJava/.NET 
VMware vFabric APMMonitor custom developed Java applications in production. Strong integration with the rest of the VMware product line including automated remediation and scaling.On PremiseMirror port on the vSphere vSwitch and an agent inside the Java JVMHTTP/Java/.NET/SQL

#7 – Support

This is the traditional use case for APM and still the most popular: helping operations teams reduce incident resolutions times. This may be in real-time as an incident occurs or during post-incident analysis looking for clues as to what went wrong. Often times this includes looking into slow or failed transactions to identify root causes. I’ve known teams to use APM to discover the 5am database back-up job is causing application performance to degrade.

From SLA management to operational dashboards, these newer APM tools still support their core operations administrator and help-desk engineer. But with increased simplicity and more intuitive user interfaces, these new APM adding value beyond their traditional support role.

Summary

A new breed of DevOps focused APM tools is moving performance management outside the domain of operations. With features to support analysts, architects, developers, testers and DevOps APM is at home in all phases of agile development.

 

Infrastructure as Code: From Bottleneck to Test-Driven

agilecloudAs computing, storage and networking continues migrating from physical equipment to virtual environments, provisioning and managing them increasingly relies on software. One of the most important benefits of virtualization and cloud computing is the idea infrastructure as code, using code, automate the provisioning and managing of entire application environments and ecosystems (infrastructure) reliably on demand. This idea, in conjunction with the agile development practices, is what makes continuous delivery possible for leading companies like Facebook, Flickr, Etsy and others.

In agile teams today, developers writing applications partner with DevOps team members writing, testing, building and packaging infrastructure as code with tools including Puppet Labs, Chef and Cucumber. This is helping traditionally bottlenecked and silo-od infrastructure teams begin working more closely with the application teams and improve overall business agility. DevOps team members write infrastructure code alongside the application under development – all leveraging popular development practices including code managementcontinuous integration, release automation and test-driven development. Continue reading Infrastructure as Code: From Bottleneck to Test-Driven

Java’s Evolution from Enterprise Language to Cloud Platform

JavaJavaOver the last 15 years, Java has become one of the world’s most popular programming languages and runtime platforms for software development. Today, many agile developers are moving beyond the original Java language to newer ones that introduce new capabilities such as functional programming and dynamic typing while still run on the robust Java platform. With the migration of development to the cloud, the Java platform is experiencing remarkable resiliency with new vendors continually entering the Java Platform as a Service (PaaS) market.

The recent news that Heroku, popular in the Ruby community, is now supporting the full Java stack with a focus on enterprise Java development is a trend we see continuing. Vendors are embracing of the Java platform with it’s multi-language, multi-platform support. This article outlines the past and present of the Java platform including the new generation of languages and the leading PaaS vendors supporting them.

 

Java: Language and Platform

The Java language and underlying platform (including the Java Virtual Machine or JVM) emerged in 1995. Created by Sun Microsystems, Java burst onto the scene at just the time the Internet was taking off. After finding mild success with their initial focus on Java Applets (code run within web browsers), Sun turned their attention to enterprises and released the Java Enterprise Edition in 1998. Designed for building enterprise-class web applications, JEE (aka J2EE) has become one of the predominant standards today for building web applications. Many vendors sell products that implement the Java specifications including Oracle, IBM, HP and VMware with Spring.

From the beginning, the Java platform included the ability to run applications written in programming languages other than Java. Although Java has remained the most popular language, newer languages and newer compilers for existing languages are enabling the Java the platform to continue to grow beyond Java the language. While remaining a mainstay for enterprise customers, the growth of mobile and tablet apps in particular (Android is built with Java) has helped fuel the growth and popularity.

But today, nearly 20 years after the initial release of Java, it’s the platform and not the programming language that is increasingly the focus of agile developers and vendors.

 

Popular Languages for the Java Platform

There are several emerging languages that run in the Java platform and bring new capabilities to developers:

Scala – Short for scalable languages, Scala adds functional programming for improved parallel computing on the Java platform. Because it runs on the JVM, it can interoperate with existing Java applications and leverage existing Java libraries. Scala’s focus on parallel computing compliments the on-demand, scalable nature of cloud resources. As such, Scala is ideal for building highly scalable applications that run on dynamic cloud resources. Twitter, LinkedIn and Amazon.com are prominent solutions that use Scala for their high-performing applications.

ClojureClojure is a Lisp dialect for the Java platform. Like Scala, Clojure brings functional programming paradigms to the object-oriented Java community. Applications developed in Clojure can leverage multi-threaded architectures for fast performance and parallel processing – ideal when doing analysis of big data.

Groovy – Groovy is a dynamic language for the Java platform that can be used for applications as well as scripting. Similar to Ruby and Python, the language is fully interoperable with Java but it’s compact style means is generally requires less code to build applications (thus improving developer productivity). When used in conjunction with the web framework Grails the duo is quite similar to the popular Ruby on Rails framework for building apps. Because it runs on the Java platform and the code is similar to Java in style and syntax, many agile developers prefer Groovy and Grails for rapid web application development.

JRubyJRuby is an implementation of the Ruby programming language on the Java platform. Originally developed by Sun, it’s now open source and allows developers to build Ruby applications that interoperate with Java applications and can leverage existing Java libraries. JRuby allows developers to rapidly build web applications in Ruby on Rails and deploy them on infrastructure that supports the Java platform.

Jython – Similar to JRuby, Jython is an implementation of the Python programming language on the Java platform. It allows developers to build applications in Python that interoperate with Java applications and can leverage existing Java libraries. With the popularity of Python growing, especially in the scientific community, Jython offers a nice solution for those wanting to use Python while still run on the familiar Java platform.

 

Java the Cloud Platform

A growing number of vendors are offering Java Platform as a Service (PaaS) solutions that support the Java Standard Edition (JSE) and JEE standards. Increasingly, these vendors support applications written in the languages described above in addition Java.

While individual features vary by vendor, most all provide simple steps for a developer to upload their Java application (as a .war or .ear file) and the solution takes care of much of the rest. This includes auto provisioning infrastructure resources on-demand (such as computing, storage, network and load balancers), deploying the application and monitoring for health. Most also include the ability to auto-scale the application based on traffic – a great feature for ensuring your web application can handle peak loads.

Like all PaaS’s, these solutions generally allow the developer to focus on the business domain and application logic and not worry about the infrastructure necessary to run it. Some, like Amazon’s Elastic Beanstalk, allow users to manage the underlying resources if they wish while others, like Open Shift and Heroku, keep these details hidden.

While a complete review of Java PaaS solutions is beyond the scope of this article, options include (in alphabetical order): AppFog, Cloud Foundry, CloudForgeCloudBeesCumuLogic, Elastic BeanstalkGoogle App EngineHeroku, JelasticRed Hat Open ShiftStakatoStratosLive and Windows Azure.

 

Summary

Java’s future has never appeared brighter. While the popularity of Java the language may be fading, Java the platform has never been stronger. Developers are discovering new capabilities for solving complex problems and vendors new solutions for deploying Java applications in the cloud.

Return on Agility and the Cloud

Stopwatch Image of AgilityAmazon’s CTO Werner Vogel recently posted about the challenge of choosing the right metrics for cloud computing. He begins with the following observation where he introduces the idea of Return on Agility:Stopwatch Image

“In the many meetings with customers in which I have done a deep dive on their architecture and applications to help them create an accurate cost picture, I have observed two common patterns: 1) It is hard for customers to come to an accurate Total Cost of Ownership (TCO) calculation of an on-premise installation and 2) they struggle with how to account for the “Return on Agility”; the fact that they are now able to pursue business opportunities much faster at much lower costs points than before.” Continue reading Return on Agility and the Cloud

Code Management in the Cloud

Code Management in the CloudAs a follow-up to our initial Dev in the Cloud series installment on continuous integration, today we’ll explore Code Management (CM) and the cloud’s impact on this core tenant of agile development. After briefly explaining CM fundamentals and relationship with agile development, we’ll identify the primary benefits and concerns associated with migrating CM to the cloud. We’ll also highlight the marketplace for the growing number of cloud CM products including recommendations for those evaluating cloud CM. Continue reading Code Management in the Cloud

IaaS or PaaS: 10 Keys for your Cloud Strategy

IaaS vs. PaaS Cloud Evaluation ChecklistOrganizations practicing agile development face many decisions when moving to the cloud. None is bigger than choosing whether to use IaaS or PaaS solutions for developing and deploying their applications. While each organization’s requirements are unique, there are 10 key criteria that can greatly influence an organization’s cloud strategy. Continue reading IaaS or PaaS: 10 Keys for your Cloud Strategy

Plugin by Social Author Bio