Survival of the Fittest Jini Services, Part II
Use Transactions to Coordinate the Reliable Interaction
of Jini Services
by Frank Sommers
First Published in JavaWorld, July 2001
<< Page 8 of 8
Words of Caution
Let me conclude this article with two notes of caution. First, while transactions are a useful tool to make a computation reliable, there is no magic to their effectiveness. Each service must ensure that it abides by its part of the guarantees the transaction is supposed to provide. How a service might do that is the subject of my next installment in this series.
Second, distributed transactions are expensive in terms of their computational resources. They involve a manager and many messages to facilitate the two-phase commit protocol. In addition, implementing a transaction participant that conforms to the default semantics is a significant undertaking, as you will see next month. However, when you do need guaranteed reliability for a distributed computation, there is no alternative to transactions.
About the Author
Frank Sommers is founder and CEO of
Autospaces, a company focused on bringing Jini technology to the automotive software market. He also serves as VP of technology at Los Angeles-based Nowcom Corp., an outsourcing firm. He has been programming in Java since 1995, after attending the first public demonstration of the language on the Sun Microsystems campus in November of that year. His interests include parallel and distributed computing, the discovery and representation of knowledge in databases, and the philosophical foundations of computing. When not thinking about computers, he composes and plays piano, studies the symphonies of Gustav Mahler, or explores the writings of Aristotle and Ayn Rand. Frank would like to thank Bob Scheifler, a Sun Microsystems distinguished engineer and member of Sun's Jini team, for his comments and clarifications on Jini transactions.
Resources
- Read Frank Sommer's complete "Survival of the Fittest Jini Services" series:
- The Jini Transaction Specification:
http://www.sun.com/jini
/specs/jini1.1html/txn-spec.html">
http://www.sun.com/jini
/specs/jini1.1html/txn-spec.html
- Transaction Processing: Concepts and Techniques, by Jim Gray and Andreas Reuter (Morgan Kaufmann, 1993; ISBN: 1558601902) is the most comprehensive book on transactions. With its thousand-plus pages chock-full of brilliant insights, it is not for the faint of heart, but is a very rewarding read. Gray and Reuter themselves invented many of the concepts presented in the book:
http://www.mkp.com/books_catalog/catalog.asp?ISBN=1-55860-190-2
- Philip Bernstein's Transaction Processing for the Systems Professional (Morgan Kaufmann, 1996; ISBN: 1558604154) is an excellent introduction to transaction processing. It also gives a grand tour of all the significant transaction processing systems in use today:
http://www.mkp.com/books_catalog/catalog.asp?ISBN=1-55860-415-4
- You can also download the full text of Philip Bernstein, Vassos Hadzilacos, and Nathan Goodman's Concurrency Control and Recovery in Database Systems from:
http://research.microsoft.com/pubs/ccontrol/
- Gerhard Weikum and Gottfried Vossen's Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery (Morgan Kaufmann, 2001; ISBN: 1558605088) focuses on recent advances in transaction models and their formal analysis. It also discusses crash recovery techniques for object systems, which is very relevant to high-availability Jini services:
http://www.mkp.com/books_catalog/catalog.asp?ISBN=1-55860-508-8
- Advances in the field of distributed and multidatabase management systems may prove helpful in gaining a better understanding of the interaction between multiple Jini services. Tamer Ozsu and Patrick Valduriez's Principles of Distributed Database Systems (Prentice Hall, 1999; ISBN: 0136597076) is excellent, and has a chapter devoted to distributed transaction processing:
http://vig.prenhall.com/catalog/academic/product/1,4096,0136597076.html,00.html
- To better understand the issues of controlling concurrency in distributed systems, Nancy Lynch's Distributed Algorithms (Morgan Kaufmann, 1996; ISBN: 1558603484) is an excellent reference. It has a section on consensus algorithms (where many parts of a distributed system have to reach some sort of an agreement, and do this quickly, without eating up a lot of bandwidth), an entire chapter on atomic objects, and a discussion on partial failure (and what to do about it):
http://theory.lcs.mit.edu/tds/distalgs.html
My example of the generals' problem was inspired by Leslie Lamport's "Byzantine Generals" problem, which is described in his fascinating paper from 1982. Lamport's more difficult problem is, How can the generals reach an agreement if there is a traitor among them? The following Websites have information about the paper:
- If you thought that Jini transactions were a complex beast, imagine when pieces of these transactions start to physically move about! Mobility brings a new set of challenges to distributed transactions. Evaggelia Pitoura and George Samaras's Data Management for Mobile Computing (Kluwer Academic, 1997; ISBN: 0792380533) is a good introduction:
http://www.wkap.nl/book.htm/0-7923-8053-3
- Pitoura's Website has a wealth of information about the impact of mobility on distributed systems:
http://zeus.cs.uoi.gr/~pitoura/pub.html
- If you are pressed for time, I wrote up a short outline for a tutorial on mobile transactions:
http://www.autospaces.com/people/fsommers/mobile_transactions.pdf
- Panos Chrysanthis's homepage:
http://www.cs.pitt.edu/~panos/publications/all.html
- Margaret Dunham's homepage (articles from the late 1990s; especially relevant is "A Mobile Transaction Model that Captures Both the Data and Movement Behavior"):
http://www.seas.smu.edu/~mhd/pubs.html
- Tomasz Imielinski's mobile computing project page:
http://www.cs.rutgers.edu/dataman/
- A complete listing of Jiniology articles:
http://www.javaworld.com/javaworld/topicalindex/jw-ti-jiniology.html
- Bill Venners's Jini FAQ:
http://www.artima.com
- The Jini community Website has pointers to all things related to Jini:
http://www.jini.org
- The Sun Jini page contains success stories, whitepapers, and so forth on deploying Jini services in business environments:
http://www.sun.com/jini
- Subscribe to the JavaWorld This Week weekly email newsletter to find out what's new on JavaWorld:
http://www.idg.net/jw-subscribe
You'll find a wealth of IT-related articles from our sister publications at IDG.net
"Survival of the Fittest Jini Services, Part II" by Frank Sommers was originally published by JavaWorld (www.javaworld.com), copyright IDG,
July 2001. Reprinted with permission.
http://www.javaworld.com/javaworld/jw-07-2001/jw-0720-jiniology.html
<< Page 8 of 8