Recent Changes - Search:

Distributed Computing

This website demonstrates using wikis as teaching and learning tool.

The course instructor is also happy to share the teaching materials here with those who find it readable.

Course Revision One

A Distributed Computing Lecture by Steven Choy

Lecture Overview: We use this lecture for tutoring purpose. We review and discuss the main topics you learned from Lectures 1 to 10.


Introduction to Distributed Systems

Go to the Lecture Note

  • Define distributed systems.
  • How to differentiate between a network of computers and distributed system?
  • Can you give examples of distributed systems?
  • Can you explain the major goals of building distributed systems?
  • Explain possible benefits of a distributed system.
  • Explain advantages of distributed systems over centralized systems.
  • Explain possible disadvantages of a distributed system when compared to a single powerful computer.
  • Describe various characteristics of Distributed Systems.
    • Can you describe the different transparencies of distributed systems?
  • Explain the differences between access transparency and location transparency.

Networking Basics

Go to the Lecture Note

  • Describe the two main function of Internet Protocol in TCP/IP.
  • Identify which layer of the IP networking stack the following protocols belong to: IP, TCP, UDP, FTP, HTTP, Ethernet frames.
  • Give maximum number of hosts in a network with a Class A IP address.
  • Give maximum number of hosts in a network with a Class B IP address.
  • What is the netmask number for a non-subnetted Class C network?
Given :
Class A: "0" + 7-bit netid + 24-bit hostid
Class B: "10" + 14-bit netid + 16-bit hostid
Class C: "110" + 21-bit netid + 8-bit hostid
  • Explain three situations where using UDP is better than TCP in building networked applications.
  • Describe the two main problems of IPv4.
  • Describe the three important changes from IPv4 to IPv6.

Class Exercises

(a) Given the IP address and the net/subnet mask of a host are 207.89.147.54 and 255.255.255.240 respectively, identify which of the following IP addresses are on the same network: 207.89.147.61, 207.89.147.65, 207.89.147.57, 207.89.147.45.

(b) In the following four addresses, two of them are on the same network. Find out the two IP addresses that are part of the same network.

      10.102.4.56/255.252.0.0		10.104.100.12/255.252.0.0
      10.106.4.57/255.252.0.0		10.108.100.13/255.252.0.0

(c) Given the following IP addresses and subnet masks, complete the missing data.

      IP Address: 205.173.45.9/255.255.255.0

      Address Class:
      Bits Borrowed for Subnet:
      Number of Usable Subnets:
      Network Address:
      Broadcast Address:
      Bits for Host:
      Number of Usable Hosts per Subnet:
      Usable Address Range:

      IP Address: 204.167.98.45/255.255.255.240

      Address Class:
      Bits Borrowed for Subnet:
      Number of Usable Subnets:
      Network Address:
      Broadcast Address:
      Bits for Host:
      Number of Usable Hosts per Subnet:
      Usable Address Range:

Java Client-Server Networking

Go to the Lecture Note

  • Class Socket and ServerSocket
  • General operation of a Socket Client
  • General operation of a Socket Server
  • Write Java code for implementing a simple socket and server
  • 8 basic classes for Java network programming: InetAddress, Socket, ServerSocket, DatagramSocket, MulticastSocket, DatagramPacket, InputStream, OutputStream.
    • Which classes are necessary in building TCP client, TCP server, UDP client, UDP server?

Java Datagram and Multicast Networking

Go to the Lecture Note

  • Discuss the differences between using datagram (UDP) sockets and stream (TCP) sockets in programming client-server applications.
  • Three situations of using UDP rather than TCP.
  • Write Java code for implementing a simple datagram client and server.
  • Write Java code for implementing a simple multicast client and server.
  • 8 basic classes for Java network programming: InetAddress, Socket, ServerSocket, DatagramSocket, MulticastSocket, DatagramPacket, InputStream, OutputStream.
    • Which classes are necessary in building TCP client, TCP server, UDP client, UDP server?

Class Exercises

  • What happens if you create a DatagramSocket without specifying a port number?
The operating system assigns an unused port to the DatagramSocket.
  • Is it possible to use a single DatagramSocket for both sending and receiving purposes?
Yes, you may just invoke the send and receive methods multiple times.
  • Is it possible to create a MulticastSocket that listens and transmits on a UDP port that has been used by other MulticastSocket sitting on the same machine? Why/why not?
Yes, because multiple clients on the same machine can join in a multicast conversation.
  • Can we modify the program so that it is able to accept UDP packets only from the pre-specified range of IP addresses? If so, how?
No. You have to accept a whole UDP packet before you know who the sender is; you can choose to skip a particular packet by not displaying its contents, but you still have to receive the whole packet first.
  • If somebody in the network knows the multicast group and the UDP port number being used by the multicast chat system, is it possible for him or her to create annoying effects, or even crash our system?
Yes, it is possible. There is no real security measure to protect multicast traffic, and a malicious user can run multiple programs to send a huge amount of data to the multicast group so as to break the system.

Java RMI

Go to the Lecture Note

  • Discuss one advantage and one disadvantage of the RMI style of networking when compared to that supported by streams and sockets.
  • State the role of a stub and a skeleton in the traditional RMI architecture
  • Describe the main components of Java RMI.
  • Draw diagram to illustrate the various interactions of a RMI system.

Class Exercises

  • What are stubs and skeletons in the Java RMI architecture?
A stub is responsible for automatically translating remote method calls into network communication setup and parameter passing. A skeleton is responsible for accepting network connections and translating them into actual method calls on the actual object. Each class of remote objects has its corresponding stub and skeleton.
  • How are the stubs and skeletons of a remote object generated?
In Java version 5 or later, stubs and skeletons are implicitly generated at runtime in most RMI applications without programmer and user intervention. In some rare cases, stubs and skeletons can be generated by the programmer using the rmic tool in the JDK.
  • Think about a network application where stream and socket based networking is the obvious answer but RMI is certainly inapplicable.
Network applications that interact with existing stream and socket-based systems such as HTTP, SMTP, FTP, etc.
  • Think about a network application where RMI is obviously preferable to networking using streams and sockets.
Distributed applications where the ability to create arbitrary interconnections will be useful; applications like parallel numerical algorithms in which the communication time is small compared to the overall run time (and so the overhead of RMI is negligible).
  • State one advantage and one disadvantage of the RMI style of networking when compared to that supported by streams and sockets.
Advantages of RMI: (1) the programmer can define a much cleaner, higher level application protocol; (2) all communication details are taken care of transparently. Disadvantages of RMI: (1) there are overheads in RMI call setup; (2) RMI provides less control on the data being transmitted across the network.

Distributed Object Computing - CORBA

Go to the Lecture Note

  • Briefly describe CORBA.
  • Briefly describe the three main components of a CORBA system.
  • Draw diagram to illustrate the basic components of a CORBA system (Client OBR, Server ORB, Inter-ORB Protocol, Server Skeleton, Clinet Stub, Clinet Application, Server Application, Interface Objects)
  • Draw diagram to illustrate the CORBA architecture.
  • Common CORBA Services
Besides the CORBA architecture, the IDL and the GIOP, OMG specifies a number of higher level services that might be required by or useful to distributed applications. Briefly describe any four basic CORBA services.

Web Services and SOA

Go to the Lecture Note

  • Briefly describe the concept of Web Services.
  • SOAP web services are the main style of web services. Give and describe the four well-known protocols/standards that make up the whole stack of SOAP Web Services.
  • What is SOAP?
  • What is UDDI?
  • What is WSDL?
  • Briefly describe three existing methods for the interaction between consumer and provider
    • SOAP, REST, and XML-RPC
    • Request formats and response formats
  • We can define a Service Oriented Architecture (SOA) as an architectural style whose goal is to achieve loose coupling among interacting software agents. Briefly describe two important architectural constraints for SOA to achieve loose coupling.
  • Explain the relationship between Service Oriented Architecture and Web Services.
  • The main concepts of SOA (Service Oriented Architecture)
  • The term "Web services" does not equal SOA. Why?

Java Enterprise Computing

Go to the Lecture Note

  • Give Java EE primary technologies.
  • Describe the three main kinds of EJB.
  • Describe the various tasks of the EJB container.
  • How the EJB container interacts with EJBs.
  • It is said that "entity beans are persistent". What is the meaning of this saying? Name the two ways of implementing the persistence of entity beans.
  • Explain the follow terms in EJB technology: Remote home interface, Remote interface, Local home interface, Local interface.
  • The three different technologies for large-scale component-based development for enabling enterprise computing: Java EE, .NET, and CORBA.
    • Can you discuss their major differences?

Java and XML

Go to the Lecture Note

  • Explain the differences between a well-formed XML document and a valid XML document.
  • What is the difference between XML Schema and DTD? What are the limitations of a DTD?
  • What is a DTD, an internal DTD and an external DTD?
  • What is an XML Schema?
    • XML Schema is an XML-based alternative to DTD.
    • An XML schema describes the structure of an XML document.
    • The XML Schema language is also referred to as XML Schema Definition (XSD).
  • SAX (Simple API for XML):
    • the working principles
    • its advantages
    • its disadvantages
  • DOM (Document Object Model):
    • the working principles
    • its advantages
    • its disadvantages
  • SAX (Simple API for XML) and DOM (Document Object Model) are two major standard APIs for processing XML document with Java. Compare SAX with DOM by describing the features, pros and cons of them.

Thanks for Reading

If you would rather like to have this lecture note in printed format, please click the print action link in the top right corner.

If you find any problem in this lecture note, please feel free to reach Steven by steven@findaway.hk

Edit - History - Print - Recent Changes - Search
Page last modified on April 08, 2009, at 10:28 AM