It’s the age of the Internet of Things, artificial intelligence, and cloud computing. They’re not just changing the IT industry. They are transforming just about every aspect of business operations for companies across all industries. Nonetheless, many of the companies leveraging these technologies in their products and services are being held back by their own applications. Much of the problem stems from a lack of app modernization.
That was the case for one of ClearScale’s clients. The company uses an algorithm-driven platform to provide matching services in a particular industry. However, the system was plagued by inefficiencies and prone to downtime — both of which made system management and maintenance labor-intensive, costly, and detrimental to the user experience.
The client’s application stack was over a decade old. That’s practically ancient in the IT world and common among organizations that have been growing so rapidly they haven’t been able to stay on top of technology changes. The client’s app was developed using .NET Web Forms technology, which was never designed to support today’s increasingly more flexible, loosely coupled approach to web development.
Much of the code was unstable, and a proprietary Object-Relational Mapping (ORM) system hadn’t been supported since 2008. Further complicating things, several different teams worked on the system, each with its own code styles and favorite tools and approaches. Not surprisingly, system performance was low.
The ClearScale Solution — Application Refactoring
In a previous project, ClearScale had helped the client successfully migrate from on-premise hosting to the AWS Cloud. To effectively leverage the advantages of a cloud-based environment, however, the company needed to change its approach to app development. Something also needed to be done to ensure its legacy apps could benefit from the new environment.
The first step following migration was app refactoring — restructuring the code in the legacy apps to optimize their performance in the AWS Cloud. Specifically, ClearScale worked with the client to:
- Migrate code to the latest .NET Framework
- Migrate MSSQL engine to the latest MySQL version on AWS’s Serverless Aurora offering.
- Introduce modern libraries for development support, such as Ninject, Json.NET, Liquibase, and FluentValidator
- Create a business logic code layer and encapsulate reusable code in separate services.
- Introduce a new data access layer with Entity Framework, an ORM that eliminates the need for most of the data-access code that developers usually need to write.
- Implement system load testing and fix the most critical paths, which increased requests per second (RPS) up to 125/second from 25/second.
- Provide horizontal scaling for web-server instances
The ClearScale Solution — Legacy Code Refactoring
The most recent project entailed a full rewrite of the backend app using ASP.NET Core, an open-source server-side web application framework designed for web development to produce dynamic web pages.
The goals of the rebuild were to:
- Ensure the system is secure and automated
- Eliminate reliance on the knowledge of any single individual
- Handle larger volumes as client numbers increase
- Reduce the risk of development errors
- Provide a higher level of user satisfaction
- Speed up development with the use of modern libraries.
The rewriting process included converting static information to be dynamic where possible and moving to an open-source platform to eliminate the costs for licensing and enable the apps to scale infinitely. Using AWS best practices, full app deployment was also automated.
In addition, ClearScale improved the overall user experience through workflows that minimize the number of steps to complete a task, and by optimizing the site user interface for mobile, tablet, desktop, and all popular browsers. Reusable frontend components for UI were also built to ensure consistency across the experience.
Drawing on AWS best practices and its own expertise, ClearScale leveraged Amazon Elastic Container Service (ECS) to orchestrate the app containers, which would be deployed in AWS Fargate. Fargate offers seamless scalability and allows for running containers without having to manage servers or clusters.
Amazon Aurora Serverless, an on-demand, auto-scaling configuration, was used to automatically start up the database, shut it down, and scale capacity based on app needs. No database instance management is required.
Amazon Simple Storage Service (Amazon S3), an object storage service, provides cost-effective yet fast, highly available, and secure hosting for the front-end static web resources.
It works in conjunction with AWS CloudFront, a service for creating and provisioning a collection of related AWS resources. CloudFront serves as a content delivery network (CDN) and as a reverse proxy for Kestrel, a cross-platform web server for ASP.NET Core.
Amazon Cognito, a fully managed service, allows for access control of the server-side resources of the web app using a single sign-on (SSO). It also organizes secure communications between the components and services of the web app. It’s used with Microsoft’s ASP.NET Identity.
ElasticSearch, a distributed, open-source search and analytics engine, was included in the architecture. The configuration leverages three master nodes and two data nodes and spans two AWS Availability Zones. It’s used to perform an enhanced search (including search requests in natural language).
AWS Lambda, another serverless solution, was implemented to handle the small code routines that serve various technical purposes such as initiating SES notifications. It requires no provisioning or management of a runtime environment for the code and is cost-effective due to its precise metering of the code execution time.
The CI/CD workflow uses AWS managed services and Jenkins, an open-source solution configured for continuous integration. Jenkins builds artifacts and pushes them to the corresponding S3 object storage bucket.
AWS CodePipeline orchestrates software release stages and integrates with other AWS services to automate and visualize the steps required to continuously release software changes. AWS CodeBuild is triggered by CodePipeline, builds a corresponding Docker image, and pushes it to the Amazon Elastic Container Registry (ECR), a fully-managed Docker container registry.
CodePipeline then triggers AWS CloudFormation to update the corresponding ECS cluster and invalidates QA CloudFront distribution. AWS CodeDeploy updates the static contents in the web S3 bucket.
With a modernized infrastructure and app approach in place, the client now has a faster, easier, and transparent process for app building and deployment. The infrastructure is more efficient and cost-effective. Much of the previous maintenance burden has been eliminated, freeing up staff for other endeavors.
Not all companies with legacy apps face a total app rebuild like this client did. For some, refactoring or other options will suffice. The key is for companies to understand their business needs and goals — both for today and tomorrow.
Contact ClearScale, an AWS Premier Consulting Partner, to learn how we can help your organization transition to modern app development and deployment to better meet your company’s needs.