In recent blogs, I've been discussing a major change in the IT server applications environment, specifically the transition away from last decades JEE Application Servers and "mega-blob" applications architectures. Increasingly, we see applications being assembled, leveraging collections of services...both local and remote, sometimes even very remotely in "the cloud" (more on that in future blogs).
This time I'll be talking about planning the migration process. Perhaps the most important step when considering migration of applications from one environment to another is planning. While our temptation is typically to jump in and start coding, it is critically important to understand the objectives and benefits, assess the risks and costs, and then make the business decision. Yup, it's a "business decision", mainly because migrating a running application from one infrastructure to another affects so many areas of the IT organization, plus it can impose risks for the users. There are many successful migration projects and one common characteristic I always find is that the up front planning process was completed and socialized before launching the actual project.
Most IT organizations considering migrating applications from JEE to light weight environments such as Tomcat will be focusing on a relatively small subset of their existing applications, at least initially. This is a very good idea because it provides the opportunity to take smaller steps and to assess the results incrementally. Do not underestimate the cost of the learning curve associated with any infrastructure changes.
In many cases, a low impact application, or one with reduced technical risk, is a better choice for early migration than to tackle a high visibility mission critical application. This allows us to understand the technologies, build an effective process, and create comfort on the part of management, development teams, and users alike. Unfortunately, in some cases the business needs are such that the IT organization does need to migrate a large JEE application. In that case it is critical to carefully plan the migration, take it step by step, and above all be realistic about the time and effort the migration may take. While it does happen that large scale complex applications migrate smoothly, they are rarely “plug and play”, even between JEE servers from various vendors, and virtually never when migrating to a different infrastructure, such as Tomcat.
Focus on the long term as well as the short term. Understand scope, complexity, and technical challenge. Migrating a codebase involves more than simple direct effort cost. Consider both legacy issues and expected new, “greenfield” development as part of the analysis.
It's really important for the cross function decision team to form a cohesive technology and architecture vision for the organization that addresses these factors:
Fortunately, vendor and customer studies have shown that most applications actually only utilize a small portion of the suite of services provided by JEE Application Servers. This means that while the JEE application server infrastructure has all the capability to do practically everything for anybody (market forces drive this, with a very few extremely demanding customers driving the feature sets), they have become so huge and complicated that JEE Application Servers may not be a particularly good choice for any one application.
With Tomcat, you have to opportunity to select the add-on services you need and leave out all those you don’t need, significantly reducing complexity, cost, and computing overheads. Tomcat provides an excellent environment for today’s improved application environments, such as Spring.
Group candidate applications by the amount of refactoring effort. Assuming no specific external requirements or pressures, it is best to begin migration with those applications that require the least effort. Every company or individual will have their own criteria, but as an example, consider this grouping:
Minimal effort migration projects are relatively unusual (although they do happen, particularly in services architectures) for applications hosted on JEE servers, but it is also fairly common to discover a module/component that can be abstracted relatively easily and provide disproportionate benefit. Assess the level of effort in these areas:
Several factors contribute to application migration complexity, when migrating applications from a full-stack Java EE environment to a Tomcat environment. The following table may be helpful in assessing the relative complexity. Your mileage may vary!
| Documentation | Migration Complexity |
| Good documentation with clear understanding of existing code, database, and requirements. | Low complexity |
| Poor documentation and/or lack of clear understanding of existing code, database, or requirements. | Medium-to-high complexity |
| Architecture | Migration Complexity |
| Well-architected, layered application. | Low complexity |
| Organically grown, non-layered code and architecture, combined with need to refactor. | Low-to-medium complexity |
| Technologies | Migration Complexity |
| Familiarity with Tomcat and/or lightweight application deployment technologies such as Spring Framework. | Low complexity |
| Strong organizational support of legacy EJB and full stack Java EE technologies; Tomcat and/or lightweight technologies such as Spring Framework. | Medium complexity |
| Integration | Migration Complexity |
| No integration with proprietary application server frameworks or APIs. | Low complexity |
| Integration with proprietary application server frameworks or APIs. | Low to high complexity depending on extent of usage |
| EJBs | Migration Complexity |
| No reliance on session EJBs, or reliance only on a straightforward use of session EJBs, for example, in a small quantity or delegating to plain old Java objects (POJOs). | Low complexity |
| Heavy use of session EJBs. | Medium complexity |
| Reliance on stateful middle tier clustering (stateful session EJBs). | Medium complexity |
| Need for distributed transactions. | Medium-to-high complexity |
| Straightforward DAO-based database access (using either JDBC or ORM). | Low complexity |
| Reliance on entity beans. | Medium-to-high complexity depending on amount of code |
| Servlet-spec security usage. | Low complexity |
| Declarative EJB (container-managed) security usage. | Medium complexity, or low-to-medium complexity if refactoring to Spring Security |
Once application targets are selected and the above analysis is completed, or at least well underway, it is time to rank the targeted applications by cost and benefit. As noted, some of these will be readily measurable, but many are not. In practice it is difficult to assign numeric values, but it is useful to organize the assessment into a comparison chart with best estimates for each task. Experience shows that it's not poor estimates that fracture project plans, but rather the things that never got estimated in the first place.
In my next blog, we will dig deeper into the technologies involved in the JEE Application Server to Tomcat migration process, including a fairly detailed (I hope) review of differences between JEE Application Servers and Tomcat regarding the JEE standards.
Popular Links
Comments
Post new comment