Distributed Aggregation Pipeline for NoSQL Cross-Collection Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional non-relational database systems face challenges in executing aggregation expressions due to unpredictable results, increased complexity, and inefficient handling of distributed data sources, particularly when dealing with document objects containing arrays and other documents.

Innovation Solution

An aggregation framework is provided that optimizes the execution of aggregation operations by distributing pipeline steps to individual shard servers, using operators like unwind, match, and group to flatten data structures, and reordering operations for efficient execution across distributed collections.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional map-reduce methods are used for aggregation operations on distributed non-relational databases, then the system can handle distributed data sources, but the computational burden is high and performance is slow

Engineering Contradiction:
Improveaggregation operation performanceVSAvoidcomputational burden
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent segments the aggregation operation into distinct pipeline stages (unwind, match, group, accumulate) that can be executed separately and in parallel across distributed shard servers. This segmentation allows each stage to be optimized independently and reduces the computational burden on any single server by distributing the work across the cluster.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by executing the unwind and match stages before the group stage. The unwind stage flattens nested document structures in advance, and the match stage pre-filters documents based on query criteria before grouping begins. This preliminary processing reduces the amount of data that needs to be processed in subsequent stages, improving overall performance.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If aggregation operations are executed on distributed non-relational databases with document objects containing arrays and nested documents, then the system can process complex data structures, but the results become unpredictable and complexity increases

Engineering Contradiction:
Improvehandling of complex data structuresVSAvoidquery execution complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent inverts the traditional approach by flattening nested document structures (unwinding arrays and embedded documents) before performing aggregation operations. Instead of trying to aggregate data while maintaining complex nested structures, the system transforms the data into a flattened format where aggregation can be performed predictably and efficiently using standard operations.

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The patent introduces an intermediary unwind stage between data retrieval and aggregation. This intermediary stage acts as a mediator that transforms complex nested document structures into a standardized flattened format, making the subsequent aggregation operations predictable and simplifying the overall query execution process.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If data is flattened using unwind operators before aggregation, then aggregation expressions produce consistent results, but additional processing steps are required

Engineering Contradiction:
Improveaggregation result consistencyVSAvoidprocessing time for flattening
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent maintains continuity of useful action by executing the unwind, match, group, and accumulate stages in a continuous pipeline without interrupting the data flow. Each stage processes the output of the previous stage immediately, eliminating idle time and ensuring that the flattening operation is seamlessly integrated into the overall aggregation process rather than being a separate batch operation.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS20260064713A1Aggregation framework system architecture and method
Publication Date: 2026.03.05 MONGODB INC
  • US20260064713A1 patent drawing
  • US20260064713A1 patent drawing
  • US20260064713A1 patent drawing

AI summary

A system and computer implemented method for execution of aggregation expressions on a distributed non-relational database system is provided. According to one aspect, an aggregation operation may be provided that permits more complex operations using separate collections. For instance, it may be desirable to create a report from one collection using information grouped according to information stored in another collection. Such a capability may be provided within other conventional database systems, however, in a non-relational database system such as NoSQL, the system is not capable of performing server-side joins, such a capability may not be performed without denormalizing the attributes into each object that references it, or by performing application-level joins which is not efficient and leads to unnecessarily complex code within the application that interfaces with the NoSQL database system.