Pluggable Messaging System in Relational Database
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The two-phase commit protocol in distributed computing systems results in significant overhead, particularly when multiple data services like databases and messaging systems are involved, leading to reduced throughput due to the need for complex coordination and potential inconsistencies.
Innovation Solution
Implementing the AMQP messaging protocol directly on top of an existing relational database management system, using a plugin to store messages and metadata within the database, eliminating the need for a two-phase commit protocol by handling transactions and message processing within a single transactional context.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If two-phase commit protocol is used to ensure consistent states in distributed application, then data integrity is improved, but system throughput deteriorates due to significant overhead
Solution Approach 1:
The patent combines the messaging system and database into a single transactional context, eliminating the need for two-phase commit protocol. Messages are stored and processed within the same database transaction as the business logic, ensuring data integrity without the overhead of inter-service coordination. This merging of previously separate services resolves the contradiction by maintaining reliability while improving throughput.
2Adaptability or versatility
If multiple data services like database and messaging system are used, then functionality is improved, but device complexity deteriorates due to coordination requirements
Solution Approach 1:
The messaging capability is merged directly into the database service, eliminating the need for separate messaging infrastructure and its associated coordination complexity. The plugin architecture allows messaging functionality to be embedded within the existing database transactional framework, reducing overall system complexity while maintaining enhanced functionality.
Solution Approach 2:
The database service is enhanced to provide both data storage and messaging capabilities through the plugin architecture. This multi-functionality eliminates the need for separate specialized services, reducing coordination complexity while maintaining the versatility of having both database and messaging operations available within a single service.
3Reliability
If two-phase commit protocol is used for message sending, then message delivery reliability is improved, but loss of time deteriorates due to waiting for acknowledgments
Solution Approach 1:
Message sending and database operations are merged into a single atomic transaction. The message is published and the database is updated simultaneously within the same transaction context, eliminating the sequential acknowledgment waiting time inherent in two-phase commit while ensuring message delivery reliability through the database's transactional guarantees.
Data Source
AI summary
A plugin is provided to a service that includes a database for storing data corresponding to transactions received by the service and applied to the database. Upon receipt of a transaction to be performed by the service, the plugin receives a message generated by the service and associated with informing another service of the transaction. The message is stored in the database together with the transaction, the message and transaction thereby being in the same transactional context. Upon the transaction being committed, the message is also processed because the transaction and message are in the same single transactional context within the database.


