JavaSpaces Principles, Patterns, and Practiceby Eric Freeman, Susanne Hupfer, Ken Arnold
"Ever since I first saw David Gelernter's Linda programming language almost twenty years ago, I felt that the basic ideas of Linda could be used to make an important advance in the ease of distributed and parallel programming. As part of the fruits of Sun's Jini project, we now have the JavaSpaces technology, a wonderfully simple platform for developing
- Editorial Reviews
- Product Details
- Related Subjects
- Read an Excerpt
- What People Are Saying
- Meet the author
"Ever since I first saw David Gelernter's Linda programming language almost twenty years ago, I felt that the basic ideas of Linda could be used to make an important advance in the ease of distributed and parallel programming. As part of the fruits of Sun's Jini project, we now have the JavaSpaces technology, a wonderfully simple platform for developing distributed applications that takes advantage of the power of the Java programming language. This important book and its many examples will help you learn about distributed and parallel programming. I highly recommend it to students, programmers, and the technically curious." Bill Joy, Chief Scientist and co-founder, Sun Microsystems, Inc.
JavaSpaces technology, a powerful Jini service from Sun Microsystems, facilitates building distributed applications for the Internet and Intranets. The JavaSpaces model involves persistent object exchange "areas" in which remote processes can coordinate their actions and exchange data. It provides a necessary ubiquitous, cross-platform framework for distributed computing, emerging as a key technology in this expanding field.
This book introduces the JavaSpaces architecture, provides a definitive and comprehensive description of the model, and demonstrates how to use it to develop distributed computing applications. The book presents an overview of the JavaSpaces design and walks you through the basics, demonstrating key features through examples. Every aspect of JavaSpaces programming is examined in depth: entries, distributed data structures, synchronization, communication, application patterns, leases, distributed events, and transactions.
You will find information on such vital topics as:
- Distributed data structures
- Synchronization techniques
- Loosely coupled communication
- Message passing
- Channel data structures for communication
- Application patterns such as replicated worker, command pattern, and marketplace
- Leases and automated lease renewal
- Using distributed events with spaces
- Handling partial failure with distributed transactions
- The official JavaSpaces specification from Sun Microsystems
JavaSpaces Principles, Patterns, and Practice also includes two full-scale applications--one collaborative and the other parallel--that demonstrate how to put the JavaSpaces model to work.
Read an Excerpt
Over the next decade the computing landscape will change dramatically as devices become ubiquitous, network-connected, and ready to communicate. As the landscape changes, the way in which we design and build software will change as well: the distributed application (one that involves multiple processes and devices) will become the natural way we build systems, while the standalone desktop application will become nearly extinct.
Designing distributed software is remarkably hard, however. The fundamental characteristics of a networked environment (such as heterogeneity, partial failure, and latency) and the difficulty of "gluing together" multiple, independent processes into a robust, scalable application present the programmer with many challenges that don't arise when designing and building desktop applications.
JavaSpaces? technology is a simple, expressive, and powerful tool that eases the burden of creating distributed applications. Processes are loosely coupled--communicating and synchronizing their activities using a persistent object store called a space, rather than through direct communication. This method of coordinating distributed processes leads to systems that are flexible, scalable, and reliable. While simple, the space-based model is powerful enough to implement advanced distributed applications--from e-commerce systems to groupware to heavy-duty parallel computations. Space-based programming also leverages the Jini? technology's leasing, distributed event, and transaction features, making it suitable for building robust, commercial-quality distributed systems.
This book teaches you how to use JavaSpaces technology to design and build distributed applications. It is intended for computer professionals, students, and Java enthusiasts--anyone who wants experience building networked applications. Through experimentation with the code examples, you'll develop a repertoire of useful techniques and patterns for creating space-based systems. We assume that you already have some programming experience and basic working knowledge of Java programming language fundamentals, but this book doesn't require any specific knowledge of network programming.
Writing a book before the technology is in widespread use presents a unique challenge. We've approached the project from complementary perspectives. Two of the authors, Eric Freeman and Susanne Hupfer, spent much of the past decade designing and building space-based systems as part of the Linda research group at Yale University and used the JavaSpaces technology during the two years of its development. The third, Ken Arnold, was in charge of the JavaSpaces project at Sun Microsystems, working with a team of engineers to design and build the technology this book is all about.
In this book, we present the foundations of programming with JavaSpaces technology, and a set of common patterns and frameworks for approaching space-based programs. As the technology becomes more widely used, the JavaSpace programming community will discover new ways of using the technology. We would like future editions of this book to incorporate these new patterns, and we invite you to send comments, suggestions, and ideas to email@example.com and to make use of the book's web site.
How to Access And Run the Example Code
The code examples in this book have been compiled and run against the following packages from Sun Microsystems:
The Java? 2 SDK, Standard Edition, v1.2
which is available for download, and
The Jini Technology Starter Kit (JSK) release 1.0
The JavaSpaces Technology Kit (JSTK) release 1.0
both of which are available for download.
You can obtain the complete source code of the examples in the book at http://java.sun.com/docs/books/jini/javaspaces . This site is the official web site for the book and contains links to resources and information relating to the JavaSpaces technology, errata and supplementary material generated after this book went to press.
We are indebted to many people for their contributions to the development of the JavaSpaces technology. Bill Joy pushed the Linda-style distributed computing idea hard enough to make Sun take it seriously. Jim Waldo, Ann Wollrath, Roger Riggs, and Bob Scheiffler worked on the design, with input from Peter Jones. Gary Holness and John McClain joined the JavaSpaces implementation team and made a difference both in the detailed semantics and the implementation design. Bob Resendes joined near the end but was important in getting the product finished, and Jimmy Torres and Frank Barnaby built and ran the release processes that got the it out the door. And, of course, nothing could have been done without Helen Leary, but then, nothing ever is.
We are equally grateful to the many people who helped us turn the idea for this book into a reality. We especially want to thank our editor Mike Hendrickson at Addison-Wesley and Series editor Lisa Friendly at Sun Microsystems, who both recognized the value of the project early on. Mike provided enthusiastic support, ideas, push and encouragement along the way. Lisa held the book to the highest standards.
The team at Addison-Wesley was an enormous help at every stage of the project. In particular, Marina Lang and Julie DeBaggis were supportive, made the publishing process run smoothly, and steered us clear of many potholes. Without the dedicated efforts of Sarah Weaver, Diane Freed, Bob Russell, Tracy Russ, Katherine Kwack, Simone Payment, and others working behind the production and marketing scenes, this book would not have been possible.
A number of reviewers greatly improved the book's content through their careful reading and helpful suggestions. Jen McGinn supplied a thorough technical and editorial review, and was instrumental in refining our usage of Sun Microsystems trademarks. Bob Resendes, Gary Holness, and John McClain provided in-depth technical review of the manuscript based on their intimate knowledge of the technology. Andreas Doerr, Laird Dornin, Howard Lee Harkness, Bruce Hopkins, Pascal Ledru, and Nigel Warren contributed useful technical and editorial commentary. Our appreciation also goes to Elisabeth Freeman for her careful reading of many drafts, and to Peter Sparago for his comments.
The wonderful illustrations throughout the book are due to the creative energy and talent of Jim Dustin. Tony Welch, of Sun Microsystems, gave helpful advice on the use of trademarks in the illustrations.
We also wish to thank the Jini team at Sun Microsystems, in particular Mark Hodapp and Theresa Lanowitz, who were generous with their time and assistance.
Finally, we'd especially like to thank David Gelernter, who planted the seed for the JavaSpaces technology nearly two decades ago, and who was supportive of this book throughout its development.
What People are saying about this
Meet the Author
Eric Freeman is co-founder and CTO of Mirror Worlds Technologies,a Java and Jini-based software company. Dr Freeman previously worked at Yale University on space-based systems, and is a Fellow at Yale's Center for Internet Studies.
Susanne Hupfer is Director of Product Development for Mirror Worlds Technologies, Inc. and a Fellow of the Yale University Center for Internet Studies. Previously she taught Java network programming as an Assistant Professor of Computer Science at Trinity College. She has a Ph.D. in computer science from Yale, where she researched space-based coordination languages and groupware.
Ken Arnold, formerly senior engineer at Sun Microsystems Laboratories, is a leading expert in object-oriented design and implementation. He was one of the original architects of the Jini™ technology, and the lead engineer of Sun's JavaSpaces™ technology.
and post it to your social network
Most Helpful Customer Reviews
See all customer reviews >