Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Distributed transaction
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Database transaction between two or more networks}} A '''distributed transaction''' operates within a [[Distributed computing|distributed environment]], typically involving multiple nodes across a network depending on the location of the data. A key aspect of distributed transactions is [[Atomicity (programming)|atomicity]], which ensures that the transaction is completed in its entirety or not executed at all. It's essential to note that distributed transactions are not limited to [[database]]s. <ref>{{Cite book |last=Gray |first=Jim |title=Transaction Processing Concepts and Techniques |publisher=Morgan Kaufmann |isbn=9780080519555}}</ref> [[The Open Group]], a vendor consortium, proposed the [[X/Open XA|X/Open Distributed Transaction Processing Model]] (X/Open XA), which became a de facto standard for the behavior of transaction model components. Databases are common transactional resources and, often, transactions span a couple of such databases. In this case, a distributed transaction can be seen as a [[database transaction]] that must be [[Synchronization|synchronized]] (or provide [[ACID]] properties) among multiple participating [[database]]s which are [[distributed computing|distributed]] among different physical locations. The [[isolation (computer science)|isolation]] property (the I of ACID) poses a special challenge for multi database transactions, since the (global) [[serializability]] property could be violated, even if each database provides it (see also [[global serializability]]). In practice most commercial database systems use [[Two-phase locking#Strong strict two-phase locking|strong strict two-phase locking (SS2PL)]] for [[concurrency control]], which ensures global serializability, if all the participating databases employ it. A common [[algorithm]] for ensuring [[correctness (computer science)|correct]] completion of a distributed transaction is the [[two-phase commit]] (2PC). This algorithm is usually applied for updates able to [[commit (data management)|commit]] in a short period of time, ranging from couple of milliseconds to couple of minutes. There are also long-lived distributed transactions, for example a transaction to book a trip, which consists of booking a flight, a rental car and a hotel. Since booking the flight might take up to a day to get a confirmation, two-phase commit is not applicable here, it will lock the resources for this long. In this case more sophisticated techniques that involve multiple undo levels are used. The way you can undo the hotel booking by calling a desk and cancelling the reservation, a system can be designed to undo certain operations (unless they are irreversibly finished). In practice, long-lived distributed transactions are implemented in systems based on [[Web Services|web services]]. Usually these transactions utilize principles of [[compensating transaction]]s, Optimism and Isolation Without Locking. The X/Open standard does not cover long-lived distributed transactions.{{Citation needed|date=September 2023}} Several technologies, including [[Enterprise Java Beans|Jakarta Enterprise Beans]] and [[Microsoft Transaction Server]] fully support distributed transaction standards. == Synchronization == In [[event-driven architecture]]s, distributed transactions can be [[Synchronization (computer science)|synchronized]] through using [[request–response]] paradigm and it can be implemented in two ways: <ref name=":02">{{Cite book |last=Richards |first=Mark |title=Fundamentals of Software Architecture: An Engineering Approach |publisher=O'Reilly Media |isbn=978-1492043454}}</ref> * Creating two separate [[Message queue|queues]]: one for requests and the other for replies. The event producer must wait until it receives the response. * Creating one dedicated ephemeral [[Message queue|queue]] for each request. == See also == * [[Java Transaction API]] * [[Enduro/X|Enduro/X open-source X/Open XA and XATMI implementation]] ==References== {{Reflist}} * {{cite web | title=Web-Services Transactions | url=http://xml.sys-con.com/read/43755.htm | access-date=May 2, 2005 | archive-url=https://web.archive.org/web/20080511221610/http://xml.sys-con.com/read/43755.htm | archive-date=May 11, 2008 | url-status=dead }} * {{cite web | title=Nuts And Bolts Of Transaction Processing | work=Article about Transaction Management | url=http://comet.lehman.cuny.edu/cocchi/CIS256/StudentReading/TransactionProcessing.doc | access-date=May 3, 2005 | archive-date=July 13, 2018 | archive-url=https://web.archive.org/web/20180713045114/http://comet.lehman.cuny.edu/cocchi/CIS256/StudentReading/TransactionProcessing.doc | url-status=dead }} * {{cite web | title=A Detailed Comparison of Enterprise JavaBeans (EJB) & The Microsoft Transaction Server (MTS) Models | url=http://gsraj.tripod.com/misc/ejbmtscomp.html }} ==Further reading== * Gerhard Weikum, Gottfried Vossen, ''Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery'', Morgan Kaufmann, 2002, {{ISBN|1-55860-508-8}} {{DEFAULTSORT:Distributed Transaction}} [[Category:Data management]] [[Category:Transaction processing]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:ISBN
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)