O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java Distributed Computing

Book Description

Distributed computing and Java go together naturally. As the first language designed from the bottom up with networking in mind, Java makes it very easy for computers to cooperate. Even the simplest applet running in a browser is a distributed application, if you think about it. The client running the browser downloads and executes code that is delivered by some other system. But even this simple applet wouldn't be possible without Java's guarantees of portability and security: the applet can run on any platform, and can't sabotage its host.Of course, when we think of distributed computing, we usually think of applications more complex than a client and server communicating with the same protocol. We usually think in terms of programs that make remote procedure calls, access remote databases, and collaborate with others to produce a single result. Java Distributed Computing discusses how to design and write such applications. It covers Java's RMI (Remote Method Invocation) facility and CORBA, but it doesn't stop there; it tells you how to design your own protocols to build message passing systems and discusses how to use Java's security facilities, how to write multithreaded servers, and more. It pays special attention to distributed data systems, collaboration, and applications that have high bandwidth requirements.In the future, distributed computing can only become more important.Java Distributed Computing provides a broad introduction to the problems you'll face and the solutions you'll find as you write distributed computing applications.Topics covered in Java Distributed Computing:

  • Introduction to Distributed Computing
  • Networking Basics
  • Distributed Objects (Overview of CORBA and RMI)
  • Threads
  • Security
  • Message Passing Systems
  • Distributed Data Systems (Databases)
  • Bandwidth Limited Applications
  • Collaborative Systems

Table of Contents

  1. A Note Regarding Supplemental Files
  2. Preface
    1. What Does This Book Cover?
      1. Organization
    2. Who Should Read This Book?
    3. About the Source Code
    4. Conventions Used in This Book
    5. Acknowledgments
  3. 1. Introduction
    1. Anatomy of a Distributed Application
    2. Requirements for Developing Distributed Applications
      1. Partitioning and Distributing Data and Functions
      2. Flexible, Extendible Communication Protocols
      3. Multithreading Requirements
      4. Security Issues
    3. What Does Java Provide?
      1. Object-Oriented Environment
      2. Abstract Interfaces
      3. Platform Independence
      4. Fault Tolerance Through Exception Handling
      5. Network Support
      6. Security
        1. Runtime environment
        2. Secure remote transactions
      7. Multithreading Support
  4. 2. Networking in Java
    1. Sockets and Streams
      1. IP Addressing
      2. Your Basic Socket
      3. Multicast Sockets
      4. Streams, Readers, and Writers for Input and Output
    2. URLs, URLConnections, and ContentHandlers
      1. When and Where Are URLs Practical?
    3. The ClassLoader
      1. Loading Classes from the Network
  5. 3. Distributing Objects
    1. Why Distribute Objects?
    2. What’s So Tough About Distributing Objects?
      1. Creating Remote Objects
      2. Remote Method Calls
      3. Other Issues
    3. Features of Distributed Object Systems
      1. Object Interface Specification
      2. Object Manager
      3. Registration/Naming Service
      4. Object Communication Protocol
      5. Development Tools
      6. Security
    4. Distributed Object Schemes for Java
    5. CORBA
      1. The Object Request Broker (ORB)
      2. The Interface Definition Language (IDL)
      3. Server Implementations
      4. Client Stubs
      5. A CORBA Solver
        1. The IDL interface
        2. The client stubs
        3. The server skeleton and implementation
        4. The Solver client
        5. Pulling it all together
    6. Java RMI
      1. Remote Object Interfaces
      2. Server Implementations
      3. The RMI Registry
      4. Client Stubs and Server Skeletons
      5. Registering and Using a Remote Object
      6. Serializing Objects
      7. An RMI Solver
    7. RMI vs. CORBA
      1. The Language Barrier: Advantage or Disadvantage?
      2. Other Differences
      3. The Bottom Line
  6. 4. Threads
    1. Thread and Runnable
    2. Making a Thread
      1. Implementing Runnable
      2. Extending Thread
    3. Managing Threads at Runtime
      1. Synchronizing Threads
      2. Thread Groups
      3. Priorities
    4. Networked Threads
      1. Asynchronous Agents
      2. Distributed ThreadGroups
      3. Improving Efficiency with Thread Priorities
      4. Synchronizing Distributed Threads
  7. 5. Security
    1. Security Issues and Concerns
    2. The java.security Package
      1. Architectural Overview
        1. The User API
        2. The Provider API
      2. The Core Security API
    3. Identities and Access Control
      1. Access Control Lists
    4. Keys: Public, Private, and Secret
      1. Secret Keys
      2. Public Key Methods
      3. Keys in the Java Security API
    5. Digital Signatures
      1. A Motivating Example: A Credit Agent
      2. Public Key Signatures for Authentication
      3. An Authenticating Credit Agent
      4. Certification: The Last Identity Link
      5. Distributing Certified Public Keys
    6. Data Encryption
      1. Ciphers for Secure Data Transfers
      2. Back to Our Credit Agent
    7. Choosing a Cryptographic Algorithm
      1. Features of Cryptographic Algorithms
        1. Level of protection
        2. Sophistication and complexity
        3. One-, two-, and many-way cryptography
        4. Design issues
        5. Financial and legal issues
      2. Available Algorithms
        1. Encryption techniques
        2. Certificates and authentication techniques
      3. General Security Protocols
        1. Secure Socket Layer (SSL)
        2. Pretty Good Privacy (PGP)
  8. 6. Message-Passing Systems
    1. Messages Defined
    2. Why Do We Need Messages?
    3. Message Processing
      1. Asychronous vs. Synchronous Message Handling
      2. A Basic Message Processor
    4. Fixed Protocols
      1. Heterogeneous Argument Lists
      2. Objects as Message Arguments
    5. Adaptable Protocols
      1. Variable Number of Arguments
      2. Variable Message Argument Types
      3. Adaptable Message Types
      4. An Adaptable Message Handler
    6. Message Passing with Java Events
      1. Event Model Overview
      2. Distributed Events
      3. Pros and Cons
    7. Using Remote Objects
  9. 7. Databases
    1. An Overview of JDBC
      1. Data Retrieval Example
      2. The API at a Glance
        1. DriverManager
        2. Connection
        3. Statement
        4. ResultSet
    2. Remote Database Applications
      1. JDBC Driver Configurations
      2. Defining the Data Objects
      3. A Scheduling Example
      4. JDBC-Enabled Data Objects
      5. Data Caching Issues
      6. Remote Data Servers
        1. Message passing with the data server
        2. Distributed objects from the data server
    3. Multi-Database Applications
  10. 8. Bandwidth-Limited Systems
    1. Flavors of Limited Bandwidth
    2. Coping with Limited Bandwidth
      1. Monitoring Bandwidth
      2. Managing Bandwidth
      3. Levels of Monitoring and Management
    3. Scope of This Chapter
    4. Monitoring Bandwidth
      1. Raw Data Monitoring
      2. Real Data Monitoring
    5. Bandwidth Management
      1. Streaming Multimedia
      2. Web Browsing
  11. 9. Collaborative Systems
    1. What Is a Collaborative System?
    2. Issues with Collaboration
      1. Communication Needs
      2. Maintaining Agent Identities
      3. Shared State Information
      4. Performance
    3. A Basic Collaborative Infrastructure
      1. Building the Infrastructure with Message Passing
      2. Collaborating with RMI
      3. Summary
  12. 10. Building Collaborative Applications
    1. A Simple Chat System
    2. A Shared Whiteboard
      1. Problems with the First Version
      2. Some Further Improvements
        1. List of current users
        2. Maintain whiteboard state at the server
        3. Performance improvements
  13. A. Using the Examples in Applets
    1. Whiteboard Applet
    2. Class Downloads
  14. B. CORBA Services
    1. Naming Service
      1. Comparison to the RMI Registry
    2. Event Service
      1. Quality of Service for Channels
      2. Interface Specifics
      3. Comparison to the Java Event Model
    3. Security Service
      1. Service Types
      2. Security Model
      3. Comparison to the Java Security API
    4. Other Key CORBA Services
  15. C. JavaSpaces
    1. Overview of JavaSpaces
    2. Entry and EntryRep
    3. Transactions
    4. The JavaSpace Interface
      1. write()
      2. read()
      3. take()
      4. notify()
      5. renew()
      6. cancel()
  16. D. RMI Quick Reference
    1. The java.rmi Package
    2. The java.rmi.registry Package
    3. The java.rmi.server Package
  17. Index
  18. About the Author
  19. Colophon
  20. Copyright