Skip to content

Weather analytics API optimization case study demonstrating database indexing, intelligent caching, and pagination strategies. Includes automated benchmarking tools and comprehensive documentation.

Notifications You must be signed in to change notification settings

MathisDulieu/WeatherTrack

Repository files navigation

WeatherTrack Pro - Performance Optimization Project

Overview

This project contains the WeatherTrack Pro application in two versions:

  • old-code: Original version with performance issues
  • new-code: Optimized version with fixes and improvements

Project Context

WeatherTrack Pro is a weather analysis application that provides comprehensive historical data for various geographic locations. Following the expansion of the data repository, significant performance issues appeared, including:

  • Slowdown in data retrieval
  • Inefficient analysis tools
  • Negative impact on user experience

Objectives

  • Identify and resolve performance issues
  • Optimize data retrieval and processing
  • Improve overall user experience

Documentation

Quick Start

Prerequisites

  • Docker and Docker Compose
  • Node.js 20.10.0
  • npm
  • PowerShell (Windows)

Launch both versions

.\launch.ps1

Launch only the old version

.\launch.ps1 old

Launch only the new version

.\launch.ps1 new

Other available commands

.\launch.ps1 stop      # Stop all services
.\launch.ps1 restart   # Restart all services
.\launch.ps1 logs      # Display logs
.\launch.ps1 clean     # Stop and remove volumes
.\launch.ps1 help      # Display help

Run benchmarks

.\benchmark.ps1

This script compares the performance of both versions with different amounts of data in the database.

Benchmark features:

  • Interactive choice of data sizes to test
  • Progress bar for data generation
  • Confirmation between each test
  • Test of all endpoints (GET data, avg, max, min)
  • Generation of a professional HTML report
  • Automatic opening of the report in the browser

Ports

Testing with HTTP files

HTTP test files are available in the /http folder to quickly test the API endpoints.

Stop services

.\launch.ps1 stop

To also remove data volumes:

.\launch.ps1 clean

About

Weather analytics API optimization case study demonstrating database indexing, intelligent caching, and pagination strategies. Includes automated benchmarking tools and comprehensive documentation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published