AnnouncementIntroducing MongoDB 8.0, the fastest MongoDB ever! Read more >
NEWSLearn why MongoDB was named a leader in the 2024 Gartner® Magic Quadrant™ Read the blog >
AnnouncementIntroducing Search Demo Builder, the newest addition to the Atlas Search Playground Learn more >

SOLUTIONS

Elevate Flight Operations with Real-Time Analytics

Transform flight operations with powerful real-time analytics. Cut costs, minimize delays, and boost efficiency through intelligent data monitoring.
Start FreeView the demo
An illustration depicts real-time analytics in mobile, cloud, and flight operations.
Solutions Overview

MongoDB's Real-Time Flight Management solution enables airlines to proactively manage and mitigate costly flight delays. To put the impact into perspective, in 2019 alone, flight delays cost European airlines an average of €4,320 per hour per flight. By leveraging intelligent data handling and immediate response, the solution provides real-time monitoring, predictive insights, and optimized resource allocation. Built on MongoDB's flexible document model and time series collections, and utilizing an event-driven architecture with FastAPI for simulation, GCP PubSub for messaging, Vertex AI for advanced analytics, and Google Cloud Functions for serverless event-driven processing, the solution offers a comprehensive approach to minimizing operational disruptions.

An illustration depicting the components of an Event-Driven Architecture
Figure 1: Components of an Event-Driven Architecture

The solution delivers:

  • Reduced delay propagation: Real-time monitoring and immediate response capabilities help prevent delays from cascading through flight schedules.
  • Optimized resource allocation: Intelligent data analysis enables efficient reallocation of resources during disruptions.
  • Enhanced customer experience: Better disruption management leads to improved passenger satisfaction and loyalty.
  • Scalable operations: Flexible architecture supports growing data volumes and operational demands.
  • Real-time decision making: Immediate access to flight data enables quick and informed operational decisions.
An illustration showing a demo video

Reference Architectures

MongoDB's Real-Time Flight Management solution implements an event-driven architecture that consists of several key components:

  1. Data generation and processing:

    • FastAPI microservice housing Real-Time Data Simulator and Path Finder
    • PubSub topics handling both static and real-time data streams
    • Cloud Functions for processing application and telemetry data

  2. Analytics and cost management:

    • Vertex AI Cost Calculator for financial impact analysis
    • Analytical data creator Cloud Function for data transformation
    • Aggregation pipeline for complex data processing

  3. Database structure:

  4. Integration components:

    • Change Streams for real-time data changes
    • Google Maps API for visualizing geographical data
    • Next.js for front-end interface and visualization

This architecture enables three distinct data flows:

  • Operational data flow (blue lines): Handles real-time flight operations
  • Analytical data flow (green lines): Manages business intelligence
  • Internal connections (black lines): Maintains system integration
An illustration shows the Event-Driven Architecture
Figure 2: Event-Driven Architecture

The solution specifically addresses delay management by providing real-time monitoring, predictive insights, and resource optimization capabilities through this integrated event-driven architecture.

Building the solution

Prerequisites

  • Node.js (v14 or later)
  • MongoDB (local or cloud)
  • Next.js (v12 or later)
  • Google Cloud SDK

1. Set up MongoDB

  • Store flight data in flexible schema
  • Support for real-time updates
  • Handle time series data for analytics
  • Maintain operational flight information, ensuring you obtain the MongoDB connection string for subsequent configuration and integration steps
  • Example model

2. Configure GCP services

  • Deploy application as a containerized service using Google Cloud’s Cloud Run
  • Configure Google Cloud’s Cloud Build for automated deployments
  • Set up Google Cloud’s Cloud Storage for assets
  • Use Google Cloud Pub/Sub for real-time data distribution
  • Implement Google Cloud’s Cloud Functions for data processing. The following code snippet runs in a cloud function to update the new path obtained from the path finder algorithm once a disruption has been identified, ensuring optimal rerouting to minimize fuel consumption and costs.

Python

  • Deploy Google Cloud’s Vertex AI for analytics, ensuring to obtain a Google Maps API Key for enhanced geospatial analysis and visualization

3. Install your demo application to run locally

  • Clone the repository and install dependencies
  • Configure environment variables
  • Set up MongoDB connection
  • Run development server

4. (Optional) Deploy the solution

  • Containerize application using Docker
  • Deploy to Google Cloud’s Cloud Run for automatic scaling
  • Configure continuous deployment with Cloud Build
  • Set up environment variables and secrets

In the end your app should look like this:

A figure of a flight management dashboard with filters
Figure 3: Flight management dashboard with filters
A figure shows flight route and cost monitoring
Figure 4: Flight route and cost monitoring

This solution provides a scalable, event-driven architecture that enables airlines to manage flight operations efficiently while minimizing the impact of delays and disruptions.

For a detailed, step-by-step guide on implementing this solution, including code samples and specific configuration instructions, visit our GitHub repository.

Key Learnings
  • MongoDB's flexible schema and time series collections provide a powerful foundation for flight operations—enabling airlines to handle both pre-flight planning data and real-time telemetry efficiently while adapting to evolving needs through flexible document models.

  • Event-driven architecture powered by MongoDB's integration with Google Cloud services (Pub/Sub, Cloud Functions) enables immediate response to flight disruptions by processing real-time data streams, helping airlines minimize delays that can cost an average of €4,320 per hour.

  • MongoDB's aggregation pipelines transform operational flight data into actionable insights, allowing airlines to optimize routes and resources while Google Cloud Vertex AI provides predictive analytics for cost and delay management.

  • The solution demonstrates MongoDB's versatility in handling diverse data types and workloads—from real-time telemetry collection to analytical processing—while maintaining performance at scale through its distributed architecture and change streams capabilities.

Technologies and Products Used
MongoDB developer data platform:
Partner technologies:
Authors
  • Dr. Humza Akhtar, MongoDB
  • Rami Pinto, MongoDB
  • Sebastian Rojas Arbulu, MongoDB
Related resources
general_content_developer

GitHub Repository: Leafy-Airline

Create this demo for yourself by following the instructions in this solution’s repository.

industry_airline_app

Real-Time Data Analytics for Airlines

Explore how MongoDB powers real-time flight management, turning delay challenges into operational excellence.

general_content_play

Demo: Optimizing Flight Management Systems with Real-Time Data Strategies

Explore how MongoDB and Google Cloud transform flight management with real-time data innovation.

Get started with Atlas

Get started in seconds. Our free clusters come with 512 MB of storage so you can experiment with sample data and get familiar with our platform.
Try FreeContact sales
Illustration of hands typing on a laptop in the foreground and a superimposed desktop window and coffee cup in the background.