Systems and methods for supporting transactional message handling
First Claim
1. A method in a host organization having at least a processor and a memory therein, the method comprising:
- enqueuing a message into a message queue framework of the host organization, the message specifying a transaction to be processed via the host organization, the transaction comprising at least a row to be inserted into a database of the host organization;
inserting the row into the database of the host organization via the message queue framework, wherein a status for the row inserted into the database remains pending absent initiation of a commit operation for the row;
initiating, via the message queue framework, the commit operation for the row inserted into the database upon insertion of the row into the database regardless of whether any further processing occurs;
requesting a lock on the row inserted into the database;
concluding the transaction failed or processed successfully based on whether the lock requested on the row is obtained or denied and based further on whether the status for the row is pending or ready by determining whether the enqueued message has been orphaned and will not be consumed based on whether the lock on the row is available, whether the status for the row is pending, and whether the enqueued message has exceeded a time threshold; and
initiating a clean up operation for the enqueued message based on the determining whether the enqueued message has been orphaned and will not be consumed, wherein the clean up operation comprises discarding the message by removing the row from the database and committing the deletion of the row to the database.
2 Assignments
0 Petitions
Accused Products
Abstract
In accordance with embodiments disclosed herein, there are provided methods, systems, and apparatuses including, for supporting transactional message handling in an on-demand service environment including, for example: enqueuing a message specifying a transaction to be processed via a host organization; inserting a row into a database of the host organization associating the message with a status of pending, wherein the row is autocommitted to the database upon insertion; updating the status for the row to ready if a commit operation for the transaction is initiated; requesting a lock on the row; and performing final processing for the transaction based on the status for the message and based further on whether the lock is obtained for the row. Final processing may include, for example, a transaction roll back, a transaction commit, a transaction requeue, a termination of transaction processing, or an orphaned transaction clean up.
121 Citations
26 Claims
-
1. A method in a host organization having at least a processor and a memory therein, the method comprising:
-
enqueuing a message into a message queue framework of the host organization, the message specifying a transaction to be processed via the host organization, the transaction comprising at least a row to be inserted into a database of the host organization; inserting the row into the database of the host organization via the message queue framework, wherein a status for the row inserted into the database remains pending absent initiation of a commit operation for the row; initiating, via the message queue framework, the commit operation for the row inserted into the database upon insertion of the row into the database regardless of whether any further processing occurs; requesting a lock on the row inserted into the database; concluding the transaction failed or processed successfully based on whether the lock requested on the row is obtained or denied and based further on whether the status for the row is pending or ready by determining whether the enqueued message has been orphaned and will not be consumed based on whether the lock on the row is available, whether the status for the row is pending, and whether the enqueued message has exceeded a time threshold; and initiating a clean up operation for the enqueued message based on the determining whether the enqueued message has been orphaned and will not be consumed, wherein the clean up operation comprises discarding the message by removing the row from the database and committing the deletion of the row to the database. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A non-transitory computer readable storage medium having instructions stored thereon that, when executed by a system in a host organization having a processor and memory therein, the instructions cause the system to perform operations comprising:
-
enqueuing a message into a message queue framework of the host organization, the message specifying a transaction to be processed via the host organization, the transaction comprising at least a row to be inserted into a database of the host organization; inserting the row into the database of the host organization via the message queue framework, wherein a status for the row inserted into the database remains pending absent initiation of a commit operation for the row; initiating, via the message queue framework, the commit operation for the row inserted into the database upon insertion of the row into the database regardless of whether any further processing occurs; requesting a lock on the row inserted into the database; concluding the transaction failed or processed successfully based on whether the lock requested on the row is obtained or denied and based further on whether the status for the row is pending or ready by determining whether the enqueued message has been orphaned and will not be consumed based on whether the lock on the row is available, whether the status for the row is pending, and whether the enqueued message has exceeded a time threshold; and initiating a clean up operation for the enqueued message based on the determining whether the enqueued message has been orphaned and will not be consumed, wherein the clean up operation comprises discarding the message by removing the row from the database and committing the deletion of the row to the database. - View Dependent Claims (24)
-
-
25. A system comprising:
-
a client device operating at a customer organization, the client device having a processor and a memory therein; a host organization having a plurality of application servers therein, each having at least a processor to execute instructions; a network communicably interfacing the client device with the host organization; a request interface at the host organization to receive a request from the client device; a message broker at the host organization to enqueue a message into a message queue framework of the host organization, the message specifying a transaction to be processed via the host organization, the transaction comprising at least a row to be inserted into a database of the host organization; a message queue framework at the host organization to insert the row into the database of the host organization via the message queue framework, wherein a status for the row inserted into the database remains pending absent initiation of a commit operation for the row; the message queue framework at the host organization further to initiate the commit operation for the row inserted into the database upon insertion of the row into the database regardless of whether any further processing is to occur; a worker thread within one of the plurality of application servers of the host organization to request a lock on the row inserted into the database, and the worker thread to further determine the transaction failed or processed successfully based on whether the lock requested on the row is obtained or denied and based further on whether the status for the row is pending or ready by determining whether the enqueued message has been orphaned and will not be consumed based on whether the lock on the row is available, whether the status for the row is pending, and whether the enqueued message has exceeded a time threshold; and the worker thread to further initiate a clean up operation for the enqueued message based on the determining whether the enqueued message has been orphaned and will not be consumed, wherein the clean up operation comprises discarding the message by removing the row from the database and committing the deletion of the row to the database. - View Dependent Claims (26)
-
Specification