In-Memory Email Queues for High-Throughput SMTP Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional e-mail systems experience throughput limitations due to the need to access files on the hard drive of the SMTP server, leading to delays and burdens on the server.

Innovation Solution

The system employs memory queues and message queue maps in non-persistent memory to store and manage email messages, allowing for efficient processing and delivery without writing messages to persistent storage, and includes a crash prevention agent to save state information efficiently, facilitating recovery in case of crashes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If messages are stored on the hard drive of the SMTP server, then messages can be persisted and recovered after crashes, but throughput is limited and delays occur due to file access operations

Engineering Contradiction:
Improvemessage persistenceVSAvoidthroughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the message storage function into two parts: non-persistent memory queues for active message handling (to maintain high throughput) and persistent storage for crash recovery (to maintain reliability). The memory queue stores messages during normal operation without disk I/O, while a separate persistence mechanism handles crash recovery, thus resolving the contradiction between speed and reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (the memory queue system with optional persistence layer) that mediates between the high-speed message processing requirement and the reliability requirement. Messages are primarily handled in memory for speed, with persistence as a supplementary feature that only activates when needed for recovery, thus achieving both high throughput and reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If multiple pickers operate simultaneously to process messages from the hard drive, then message processing capacity increases, but the burden on the server and hard drive access increases

Engineering Contradiction:
Improvemessage processing capacityVSAvoidserver burden
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent replaces the mechanical hard drive access system with an in-memory queue system. Instead of multiple pickers reading from the hard drive simultaneously (which creates I/O contention), messages are stored in memory queues that can be accessed by multiple processes without physical media contention. This substitution eliminates the bottleneck while maintaining parallel processing capability.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

3Reliability

If messages are frequently written to persistent storage for safety, then crash recovery is improved, but throughput and processing speed are reduced

Engineering Contradiction:
Improvecrash recoveryVSAvoidprocessing delay
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements periodic persistence where messages are written to persistent storage at intervals or under specific conditions rather than continuously. During normal operation, messages remain in memory queues for fast access. Periodic flushing to disk provides crash recovery capability without the continuous I/O overhead, thus balancing reliability with processing speed.

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS7720911B2Email using queues in non-persistent memory
Publication Date: 2010.05.18 MARIGOLD USA INC
  • US7720911B2 patent drawing
  • US7720911B2 patent drawing
  • US7720911B2 patent drawing

AI summary

An e-mail processing system that preferably operates solely within nonpersistent storage such as random access memory. Queues of e-mails are formed within the random access memory, where each queue includes a pointer to personalized information about the e-mail, directed to a specific domain. In order to send the e-mail, a channel is opened to the domain, and while open, e-mails within the queue are sent. A special recovery agent periodically takes snapshots of the state of processing within the system. Since the processing is occurring within nonpersistent storage, a failure within the system can be recovered by using the snapshots to recover where each email is processing. In one aspect, the feed rate to the other e-mail servers is adjusted based on the rate of those e-mail servers. Also, the system asynchronously looks up information such as DNS information while it is processing information for other e-mails.