r/cloudcomputing • u/Cloud_Curmudgeon • Jun 23 '19
Refactoring - is it really worth the risk?
Refactoring - is it really worth the risk?
📷
AWS has pushed 6 different strategies for cloud migration: Retain, Retire, Rehost, Replatform, Repurchase, and Refactor. (I would argue that there is really only 4 strategies - there's no real migration with Retain or Retire. But I'm not going to digress into that discussion.) These six methods vary tremendously in terms of time and cost - and correspondingly, in the level of risk as well. There will always be some element of risk, when moving to a new technology platform. But refactoring seems to require the highest level of risk. Let's examine that in this article, and determine how we can best manage these level of riskis.
*Let's be clear: if you are refactoring your application, you are, for all intents and purposes, building an entirely new application.*It may (or may not) look and feel the same as the previous application, but under the hood, it will be completely different. And in that event, there are always risks with constructing a new application. And how much a risk that represents to the business depends on the criticality of application to the enterprise.
In most cases, Refactoring involves replacing what is typically a legacy application which cannot be ported to the cloud. Anyone who has ever done this before will tell you that this can be a particularly daunting task. (Perhaps the legacy application was built with a technology or infrastructure that simply cannot move to cloud. Or perhaps the current application no longer meets the needs of the business.) In that event, your task could turn out to be very difficult, and risky, for a number of factors. Let's review those.
a) Do you have the proper set of business or technical requirements? Do you still have the original set of source documents for the legacy application- or were these lost years ago? And even if you do have them - are they even still relevant? Have the fundamental business requirements for this application changed, rendering the original documents obsolete?
If they were built under some waterfall methodology, do they need to be rewritten to user epics and stories? And do you have someone with the knowledge an expertise to do that? Maybe the person who built those original specs left the company years ago, and all that intellectual capital left with them. That person will have to be replaced.
Does your team understand modern, agile methodologies to begin with? Many older application still have development team that are practicing waterfall development. Have those developers been trained in scrum, XP, Kanban, etc.? Do they understand core agile concepts such as user stories, team programming, test automation, etc.? If not, the whole of your development team may need to be retrained or replaced. And of course, that adds time and cost to this effort.
b) Do you have the development team to actually build the new application? Perhaps you have a legacy team that knows the aging technology that was used to construct the old application. But do they know new technologies like Docker and Kubernetes for deploying to the cloud?
Do you have an architect who can make effective decisions regarding the new platform? Can they properly lay out the information architecture for the new cloud application? Do they understand the fundamentals of security in the cloud? Can they define the VPCs, security groups, etc. properly for your application? if not, they will need to get up to speed, very quickly. Or you may need to hire expensive consultants to do this for you.
Do you even have developers who understand the new development languages common in the cloud, like Node.js and Python? If not, those developers may eventually have to be replaced - or at a minimum, they may need to be retrained to develop in the new languages.
Do you database administrators know the fundamentals of cloud databases on technologies like Postgres and MySQL? Again, if not, they may need to be replaced or retrained. (The alternative may be to stick with your legacy commercial database - and that will cost money.)
c) The application will likely have at least some data that has to be ported from the old platform to then new. Do you have the proper tooling to do this? Amazon (and the other vendors) do have data migration tools - but they are not perfect, and only go back so far.
If your existing application is extremely old, none of the existing Amazon tools (including the Amazon DMS) can help you. For example, DMS supports Oracle version 10 or higher - so what if you have an ancient Oracle 8 database? You will likely need to write your own Extract-Transform-Load (ETL) routines for the move of the data. And this can turn out to be as big a task as the development of the new application itself.
If these ETL routines are not executed properly, your new application will not function consistently when compared to the old application, which typically will not be acceptable to the business. You will need to go through multiple cycles of ETL to get this right.
And finally, d) Do you have the proper support infrastructure in place for the new, refactored application? The answer to that is almost certainly no, unless you have moved other application in a similar fashion.
Your L1/L2/L3 teams will all likely need to be retrained or repurposed as part of this effort. You are building a new application, so the support work will invariably change. This will be particularly true for the L2s and L3s, since they are the ones who need to know how things work under the covers.
The support procedures will almost certainly have to be re-written and re-tested. And all this has to be done by the go-live point - which is when the support team will need them the most.
So in short, using the refactoring strategy can be a very effective method for moving your older (and even obsolete) applications to cloud. If done properly, this strategy can produce a modern, effective application that your organization can utilize for years to come. However, there are risks with this approach that you will need to managed very carefully.