Book Description

About the Author

Table of Contents

Source Code

Errata

Send Comments

Teaching Materials

Author's Homepage
 

Object-Oriented Software Development Using Java
Xiaoping Jia, Ph.D
Chapter 12: Distributed Computing

Contents
   12.1 Socket-Based Communication
         12.1.1 Server and Client Sockets
         12.1.2 Servers and Clients Using Sockets
         12.1.3 Design Case Study—Stock Quotes I
   12.2 Remote Method Invocation
         12.2.1 The Architecture
         12.2.2 Using RMI
         12.2.3 Design Case Study—Stock Quotes II
   12.3 Java Database Connectivity
   12.4 Common Object Request Broker Architecture



Other Chapters

  • Example 12.1 A Simple Echo Server
    • Source code: EchoServer.java
    • Compile:
      • javac EchoServer.java
    • Run:
      • java EchoServer
        Use telnet or the Echo Client in Example 12.2 to test the server
  • Example 12.2 A Simple Client Talks to the Echo Server
    • Source code: EchoClient.java
    • Compile:
      • javac EchoClient.java
    • Run:
      • java EchoClient
  • Example 12.3 An Echo Server that Handles Multiple Clients Simultaneously
    • Source code: MultiEchoServer.java
    • Compile:
      • javac MultiEchoServer.java
    • Run:
      • java MultiEchoServer
        Use telnet or the Echo Client in Example 12.2 to test the server
  • Example 12.4 Visitor Counter Applet And Server
    • Source code: CounterServer.java
    • Source code: Counter.java
    • Compile:
      • javac CounterServer.java
        javac Counter.java
    • Run the server:
      • java CounterServer
    • Run the Counter applet using the appletviewer :
      • appletviewer Counter.html
    • Run the Counter applet in your browser. (In this case, the Counter server must be running on the same host as the web server.)
  • Example 12.5 Broadcasting Echo Server
    • Source code: BroadcastEchoServer.java
    • Compile:
      • javac BroadcastEchoServer.java
    • Run the server:
      • java BroadcastEchoServer
        Use telnet or the Echo Client in Example 9.2 to test the server.
  • Example 12.6 A Simple RMI Program¨CHello from Venus!
    • Source code: Hello.java
    • Source code: HelloImpl.java
    • Source code: HelloApplet.java
    • Compile and run the server:
      • Compile Server

      javac HelloImpl.java

      • Generate the skeleton and the stub

      rmic HelloImpl

      • Run the RMI server

      rmiregistry

      • Run the Hello Server
    • java HelloImpl

    • Compile and run the client:
      • Compile the client:

      javac HelloApplet.java

      • Run the client using the appletviewer

      appletviewer HelloAppletDemo.html

  • Example 12.7 Building a Table with JDBC
  • Example 12.8 Modifying a Table with JDBC
  • Example 12.9 Adding Database Functionality to the Order Applet

Book Description - About the Author - Table of Contents
Source Code - Errata - Send Comments
Teaching Materials - Author's Homepage