Synopses & Reviews
Java RMI contains a wealth of experience in designing and implementing Java's Remote Method Invocation. If you're a novice reader, you will quickly be brought up to speed on why RMI is such a powerful yet easy to use tool for distributed programming, while experts can gain valuable experience for constructing their own enterprise and distributed systems.With Java RMI, you'll learn tips and tricks for making your RMI code excel. The book also provides strategies for working with serialization, threading, the RMI registry, sockets and socket factories, activation, dynamic class downloading, HTTP tunneling, distributed garbage collection, JNDI, and CORBA. In short, a treasure trove of valuable RMI knowledge packed into one book.
This text focuses on designing and implementing Java's Remote Method Invocation. Novice readers can learn why RMI is such a powerful yet easy to use tool for distributed programming, while experts can gain valuable experience for constructing their own enterprise and distributed systems.
About the Author
William Grosso is the former Chief Architect / Director of Quality Assurance and current Vice President of Technical Services for Hipbone Incorporated. He is the author of Java RMI (available from O'Reilly and Associates) and a co-author of Java Enterprise Best Practices (also available from O'Reilly and Associates). He is one of the founders of Seruku, is on the program committee of the International Semantic Web Conference, and frequently volunteers at SDForum (where he serves on the Board of Directors and helps to run the Emerging Technology SIG). A former mathematician, he got into programming because it seemed like easy money. He got into distributed computing because he noticed that client-server gurus got the big bucks. And then he started programming in Java because he figured that's where the REAL money was. Having learned the error of his ways, he decided to become management and write books instead. When not working, programming, or writing, he spends most of his time hiking and going to the theatre. You can find out more about him at wgrosso.com.
Table of Contents
Dedication; Preface; About This Book; About the Example Code; Conventions Used in This Book; For Further Information; How to Contact Us; Acknowledgments; Designing and Building: The Basics of RMI Applications; Chapter 1: Streams; 1.1 The Core Classes; 1.2 Viewing a File; 1.3 Layering Streams; 1.4 Readers and Writers; Chapter 2: Sockets; 2.1 Internet Definitions; 2.2 Sockets; 2.3 ServerSockets; 2.4 Customizing Socket Behavior; 2.5 Special-Purpose Sockets; 2.6 Using SSL; Chapter 3: A Socket-Based Printer Server; 3.1 A Network-Based Printer; 3.2 The Basic Objects; 3.3 The Protocol; 3.4 The Application Itself; 3.5 Evolving the Application; Chapter 4: The Same Server, Written Using RMI; 4.1 The Basic Structure of RMI; 4.2 The Architecture Diagram Revisited; 4.3 Implementing the Basic Objects; 4.4 The Rest of the Server; 4.5 The Client Application; 4.6 Summary; Chapter 5: Introducing the Bank Example; 5.1 The Bank Example; 5.2 Sketching a Rough Architecture; 5.3 The Basic Use Case; 5.4 Additional Design Decisions; 5.5 A Distributed Architecturefor the Bank Example; 5.6 Problems That Arise in Distributed Applications; Chapter 6: Deciding on the Remote Server; 6.1 A Little Bit of Bias; 6.2 Important Questions WhenThinking About Servers; 6.3 Should We Implement Bank or Account?; Chapter 7: Designing the Remote Interface; 7.1 Important Questions When Designing Remote Interfaces; 7.2 Building the Data Objects; 7.3 Accounting for Partial Failure; Chapter 8: Implementing the Bank Server; 8.1 The Structure of a Server; 8.2 Implementing the Server; 8.3 Generating Stubs and Skeletons; Chapter 9: The Rest of the Application; 9.1 The Need for Launch Code; 9.2 Our Actual Launch Code; 9.3 Build Test Applications; 9.4 Build the Client Application; 9.5 Deploying the Application; Drilling Down: Scalability; Chapter 10: Serialization; 10.1 The Need for Serialization; 10.2 Using Serialization; 10.3 How to Make a Class Serializable; 10.4 The Serialization Algorithm; 10.5 Versioning Classes; 10.6 Performance Issues; 10.7 The Externalizable Interface; Chapter 11: Threads; 11.1 More Than One Client; 11.2 Basic Terminology; 11.3 Threading Concepts; 11.4 Support for Threads in Java; 11.5 Deadlock; 11.6 Threading and RMI; Chapter 12: Implementing Threading; 12.1 The Basic Task; 12.2 Guidelines for Threading; 12.3 Pools: An Extended Example; 12.4 Some Final Words on Threading; Chapter 13: Testing a Distributed Application; 13.1 Testing the Bank Application; Chapter 14: The RMI Registry; 14.1 Why Use a Naming Service?; 14.2 The RMI Registry; 14.3 The RMI Registry Is an RMI Server; 14.4 Examining the Registry; 14.5 Limitations of the RMI Registry; 14.6 Security Issues; Chapter 15: Naming Services; 15.1 Basic Design, Terminology,and Requirements; 15.2 Requirements for Our Naming Service; 15.3 Federation and Threading; 15.4 The Context Interface; 15.5 The Value Objects; 15.6 ContextImpl; 15.7 Switching Between Naming Services; 15.8 The Java Naming and Directory Interface (JNDI); Chapter 16: The RMI Runtime; 16.1 Reviewing the Mechanics of a Remote Method Call; 16.2 Distributed Garbage Collection; 16.3 RMI's Logging Facilities; 16.4 Other JVM Parameters; Chapter 17: Factories and the Activation Framework; 17.1 Resource Management; 17.2 Factories; 17.3 Implementing a Generic Factory; 17.4 A Better Factory; 17.5 Persistence and the Server Lifecycle; 17.6 Activation; 17.7 A Final Word About Factories; Advanced Topics; Chapter 18: Using Custom Sockets; 18.1 Custom Socket Factories; 18.2 Incorporating a Custom Socket into an Application; Chapter 19: Dynamic Classloading; 19.1 Deploying Can Be Difficult; 19.2 Classloaders; 19.3 How Dynamic Classloading Works; 19.4 The Class Server; 19.5 Using Dynamic Classloadingin an Application; Chapter 20: Security Policies; 20.1 A Different Kind of Security Problem; 20.2 Permissions; 20.3 Security Managers; 20.4 Setting Up a Security Policy; Chapter 21: Multithreaded Clients; 21.1 Different Types of Remote Methods; 21.2 Handling Printer-Type Methods; 21.3 Handling Report-Type Methods; 21.4 Generalizing from These Examples; Chapter 22: HTTP Tunneling; 22.1 Firewalls; 22.2 CGI and Dynamic Content; 22.3 HTTP Tunneling; 22.4 A Servlet Implementationof HTTP Tunneling; 22.5 Modifying the Tunneling Mechanism; 22.6 The Bank via HTTP Tunneling; 22.7 Drawbacks of HTTP Tunneling; 22.8 Disabling HTTP Tunneling; Chapter 23: RMI, CORBA, and RMI/IIOP; 23.1 How CORBA Works; 23.2 The Bank Example in CORBA; 23.3 A Quick Comparison of CORBA and RMI; 23.4 RMI on Top of CORBA; 23.5 Converting the Bank Example to RMI/IIOP; Colophon;