Software reengineering of portal for selling boats

Introduction

A leading portal for selling boats online in Europe was doing great business. With growth in business the amount of data in the system grew causing the site to become extremely slow. Also, as they grew they brought in new models for customers for doing business and advertising. Unfortunately, the web portal as well as backend administration application were not easily maintainable.

Objectives

The high level objectives of this endeavor were…

  • Improve performance of the system to provide quick response of certain pages and searches
  • Make searches faster and provide more summarized details
  • Redesign the UI of the web site
  • Allow configurable rules for ads
  • Document functional and technical aspects of the system

Challenges

Though the objectives were pretty straight forward, the project had many challenges.

  • No availability of technical or functional document to understand the system’s flow
  • Repetitive code with business logic spread across code files hap hazardously
  • Separate copies of database maintained for website and backend portal with inconsistent schema
  • Extremely complicated caching mechanism (that did not work well) for faster searches
  • Search mechanism too rigid to handle new combinations
  • Improperly modeled database

Execution

Refactoring the system started with gathering and documenting complete functional details of the system. Based on this study of database structure and code review were done with high level technical documentation needed for refactoring.

Once necessary insight was available into the system, a common business logic layer was created and put behind a web service so that it can be used by the web site as well as backend applications and background processes. This was done to remove redundancy of business logic.

Caching of search data was completely removed keeping only the necessary master data cached. Implementation of Apache SoLR was done for making searches faster as well as quickly getting search summaries. Since all business logic was consolidated at a single place the switch from SQL queries to SoLR service calls became quite easy.

Part of the database schema was redesigned and data migrated with minimal downtime of the system to remove data inconsistencies and redundancy.

All product images were put in a CDN for extremely quick load times of images.

At the end of the project the system was very fast with search responses coming in under one second and home page rendering in just 200 milliseconds.

Technology stack

The system was built on these technologies:

  • .Net framework 4.0 with C#
  • ASP.NET Web services
  • SQL Server 2008 R2
  • Apache SoLR
  • Bootstrap
  • jQuery