New-age Transactional Systems - Not Your Grandpa's OLTP
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.

Posted by Vijay Narayanan on Nov 09, 2009
Adapting agile methods within the enterprise is a challenging task. Agility isn’t a software program that can just be installed one day. Instead it has to be adapted to the enterprise context including the cultural, technical, and organizational facets. This article explores challenges associated with setting up development environments, automated testing, continuous integration, and specifying the definition of done within the context of the enterprise.
In today’s hyper-competitive world, later may be too late to adopt Agile development and this Roadmap for Success will help you get started. Download "Agile Development: A Manager's Roadmap for Success" now!
Every technical lead and development manager wants to reduce the time taken to setup the development environment for their team members. Still, developers continue to spend many cycles trying to get things organized in order to get productive in their projects. Lack of documentation on setting up the development environment is a key reason why the setup time is large. The second key reason is the number of manual steps involved in the setup process. So how does one overcome these challenges? For documentation there are few tenets I follow – simplicity, attention to detail, and automation. Simplicity refers to keeping the document simple to create, maintain, view, and distribute. I use a wiki to manage the content related to setting up my team’s development environment. The wiki page has an owner and as part of the iteration will get updated. Attention to detail refers to unambiguous and comprehensive guidance when documenting what is needed to setup. This means documenting every little thing that a developer needs to do in order to start writing code and integrating with the rest of the team’s work. Here’s what I capture in the environment wiki page:
Perhaps the most important aspect of setting up developer environment is automation. Automation has several advantages – it can significantly reduce if not eliminate errors with configuration by providing a consistency to the entire process. Here are some challenges with automation:
Addressing these challenges may not always be feasible but here are some of ideas to address them. For all software that is needed for a developer – regardless of where they are obtained from – add it to the source code control system. Make sure to organize the software packages using a consistent naming and location convention indicating version numbers and library dependencies. This will ensure that every developer can at get to the software packages without running around contacting several people across your firm. For software packages requiring installation from external groups create scripts that will generate tickets or if possible even submit tickets programmatically. Once they get a working copy of files from source code control you will want to create a “setup” script. In my case, this is an apache ant script that sets up user level environment variables, creates a user id/password in our development database, copies licensing keys from network folders to user’s windows profile, and generates sample XML messages for a variety of web services that the team supports.generatesgenerates
Developers don’t automate testing for a variety of technical reasons. I often hear variations of below:
The tool issue can be addressed in a variety of ways. You can show them the benefits of using a standard testing tool such as JUnit or NUnit pointing out the benefits of integrating it with a script and the ability to run tests in a consistent and repeatable fashion. In a large enterprise it is unlikely that all your developers are going to use a single tool. It is more realistic to have at least a standard toolset for development teams within a department. What I do is provide standard test automation scripts – scripts that compile JUnit test cases, execute them, create reports, and emails results – as part of every developer’s environment. When a developer downloads a working copy from our source code control system the test script is in place and they keep adding individual test cases. Our team has a standard test folder structure for placing test cases and test suites for the script to pickup and execute. Additionally, during code reviews I make sure that not only the code but test code is reviewed as well. As part of the review, test cases that aren’t in the suite of automated tests are refactored. This also applies to test code that contains hard-coded data that really needs to be driven off a configuration file or data from a database. For example, a test method specifies the user role to be BRANCH_SUPERVISOR instead of obtaining from a configuration file. Upon review, this property was added as a name-value pair in a properties file and the test method was refactored to access the user role from the file. Now, this property is available for additional tests.
In SOA projects where services integrate with application servers, legacy systems, data sources, or packaged applications, a battery of system tests are essential. These tests can initially be executed with mock objects that stand in for these backend integrations. Eventually though you will want to get tests to run against real integration points. In such case, test data and data that ties across multiple systems becomes extremely critical. Lack of quality test data, specifically data that needs to correlate across systems is a big reason for ineffective automated tests. Depending on the complexity of the data and the number of systems in play you can tackle this in a phased manner. You can start with a local copy of the data where your developers query multiple data sources and populate the local store. This might sound like a very manual exercise but if the data is new and ETL jobs/batch processes to populate the data store aren’t completed this could be a simpler way to start. Over time you can build a suite of classes that encapsulate test data from multiple data stores, ensure validity/quality of data, and also populate test data as part of your continuous integration script. Regardless, if you decouple your test case code from the specifics of obtaining test data it will be easier to change the sourcing strategy and not break the test code. My team initially used properties files to feed test data and over time migrated to a set of data access classes to obtain needed test data. For instance, we used the Data Access Object design pattern to create a set of java classes that encapsulate operations on customer data and account data entities. These classes provide a simple interface with CRUD methods that a JUnit test method can access. If a test method needed to get customer data it would import the DAO factory and the specific DAO class and invoke the getCustomer() method. Upon fetching a particular customer object the test can proceed with the rest of the logic. The test is freed from knowing how the data was queried and packaged into an object and these interfaces become reusable across tests.
In an enterprise setting specifying the criteria for specifying the criteria for done can be very tricky. Code that executes perfectly fine in your development environment may not work in a test environment. This could be because of security tokens/policies, network/connectivity issues, lack of system stability, or due to higher quality testing from a quality assurance (QA) team or end-users. In order to minimize the surprises when migrating code, your criteria should include:
This article touched upon a few of the challenges to adopting agile methods within the enterprise and provided strategies for addressing them. Set up development environments in a consistent fashion using automated scripts and checklists, facilitate automated testing and continuous integration by using standard tooling and test data transparency, and ensure a stricter criteria for Done, Done. These techniques aren’t all encompassing but will help teams be more productive within your enterprise context.
I am Vijay Narayanan, a software development team lead building reusable data services and business process automation components working for a financial services firm. I have worked on several software projects ranging from single user systems to large, distributed, multi-user platforms with several services. I blog about Software Reuse at http://softwarereuse.wordpress.com/
I also had a look at your blog to prove my first impression of this article. You try to support "being agile" through preparing the technical landscape for it. That's a good idea. But, your conclusions are pretty strange to me: I'm agile because I use technology x.
Where's the process in it that has the business value in mind. Your blog tells me that refactoring is important to be agile. For me it is a tool that helps to cope with change, that is central in agile methods. But, I don't need it to be agile.
Rainer, agree that you need more than technical practices to be truly agile - my intent with this article was to provide some guidance on some technical practices only. It wasn't trying to cover the business perspective.
With regard to your comment on refactoring - yes it is a tool to cope with change and agile methods advocate it as a means to reduce technical debt and maintain/improve the quality of the codebase.
or why it's not covered here?
I am amazed...
from the title I was expecting something different. I though this was more going to suggest what technical issues you faced getting Agile practices on to an IT estate. Don't get me wrong - the article is very valuable.
Technical architects have many reasons for telling Agilistos "you ain't comin' in here, boy". Some are covered in the second part of this article (e.g. point around push vs pull).
borland.typepad.com/agile_transformation/
Don't for one minute let that discourage you from posting more though. I have already sent this link around to a few people.
Automating is always a challenge for the team, we do want to automate and reuse as much as we can, but how?
You gave some suggestions, thank you for sharing.
Patrick - your link leads to one category in a blog - do you have more specific entry/entries?
Cheers
Mark Levison
Co-Founder and Consultant - TheAgileConsortium
Ran Jun - can you be more specific about what you're trying to automate?
Cheers
Mark Levison
Co-Founder and Consultant - TheAgileConsortium
Rainer - I think there is a two step here. Since rapid response to change is at the core of being Agile you need refactoring to sustain it over the long haul.
Co-Founder and Consultant - TheAgileConsortium
anotherstreamofconsciousnessarticlewithlittletechnicalorbusinesscontentatallapartfromilovecomputers.
"If a test method needed to get customer data it would import the DAO factory and the specific DAO class and invoke the getCustomer() method" - oh really.
Please - some of your content is very good - that doesn't force a normal quality distribution.
James
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.
Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.
Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
9 comments
Watch Thread Reply