Notes
Outline
Network Computing
Course Information & Overview
Qusay H. Mahmoud
qmahmoud@sce.carleton.ca
Goals
This is not a theory course
It is a SKILLS course
Understand the basics of networking
Learn about the different technologies that can be used to develop distributed applications
Work effectively in groups to develop a significant distributed application
If it is your first course in networking, you will develop an idea of where to go next
Course Content
Networking Basics
Sockets
RMI
CORBA
Agents and Mobile Code
CGI, Servlets, JSP
Middleware and XML
Jini, JavaSpaces, WebServices
Security Issues
Limitations
Broad set of related technical topics
We will not be able to cover all topics in details
For some topics, the course is more like an eye opener
Do not expect to become an expert in every single topic that we will cover
It is almost impossible to master all the technologies we will cover in the course
Course Info
URL: http://www.sce.carleton.ca/~qmahmoud/sce580
Lectures: Tue & Thu 5:30 – 7:00  ME 3174
Book: Distributed Programming with Java
http://www.manning.com/Mahmoud
Grading
Assignments (20%): two assignments
Midterm (30%): March 1st
Project (50%)
Project idea (5%)
Design (10%)
Implementation, documentation, and functionality (15%)
Presentation (10%)
Final paper (10%)
In Class
Read notes in advance if possible
Discuss concepts
Ask questions
Outside Class
Read
Explore
Experience writing distributed Java-based applications
Appreciate the beauty of Java J
Homework
Programming
Project
Discuss ideas with group members
Course Outline
See course homepage
http://www.sce.carleton.ca/~qmahmoud/sce580
Why Network Computing?
The evolution of computing?
Stand-alone computers
Mainframes
PCs
Networked Computing
C/S computing
The Internet (and Web) factor
The Java factor
Stand-alone computers
Start with a single processor used exclusively by one user
Users have to share the computer by competing for time slots
Mainframes
A single computer used by many users
Every user has a terminal
Processing is done at the mainframe computer
PCs
Relatively cheap computers used by one user
Stand-alone model describes today’s home users
Programs delivered on disks (floppy, CDs, etc)
The Internet is now delivering content, both data and programs
Networked Computers
More users rely on computers to do their jobs
Terminals substituted with PCs & workstations
Data communication is important as programs are brought to a local processor for execution
Client/Server Computing
Users have to share data
Monolithic programs are divided into two parts:
Client & Server
Client applications run on local machines
Server applications run on centralized machines
Convergence (networks & computers)
Applications that run on corporate computers require the presence of servers
Users share storage and processing resources
The network is part of the computing platform
Initially closed, homogeneous environments (e.g. Unix, NFS, Windows, etc)
CORBA for heterogeneous environments….
The Internet factor
Attempts to connect all private and public networks
DARPA’s IP is the de-facto standard for exchanging data between different networks
TCP is the de-factor standard transport protocol over IP (combo as TCP/IP)
The easiness of exchanging via e-mail, file transfer, etc. catches the eyes of the big industry players
The Web factor
What is the most useful piece of software of the 90’s? The browser!
The browser is becoming an operating system for many users
Traditional network applications (e.g. email) have been incorporated in the browser
New business opportunities emerged (e-commerce)
New technologies to address arising challenges(e.g. search engines, agents)
The Java factor
Portability
Platform independent
Java bytecodes can be executed on any computer with a JVM
Web browsers implement the JVM
Possible to enhance Web pages (applets)
Remote objects can be upgraded online by pushing new bytecodes to the hosting JVM
Applications
System management
Plug ‘n play components
Software distributed and upgrading
Network management
Fault diagnosis
Error recover
Network and service discovery
Plug ‘n play networks
Applications….
Electronic commerce
Buying agents (brokers)
Selling agents
Investment
Secure communication protocols
Remote control
Remote operation
Robots
Soft bots
Applications….
Remote expertise
Medical
Legal & counseling
Distance learning
Multimedia distribution
Personalized news
Intelligent targeting of ads
Video on demand
Applications….
Cooperative problem solving
Distributed planning
Resource allocation
Scheduling
Data mining
Filtering based on mobile agents (collectors, reporters)
Filtering info at the source (e.g. stock market)
Applications….
Others….
Explore the user of XML for middleware
Anything interesting that involves distribution (Sockets, RMI, CORBA, Mobility, Jini, EJB, etc)
Think of something compelling and innovative
Overview of Topics
Give you an idea and a flavor of the topics
Try to pick a technology that interests you the most OR a topic that is related to your real-world job or thesis or project….and use this for your class project if you like
Basics of Networks
IP: Internet Protocol
TCP: Transmission Control Protocol
UDP: User Datagram Protocol
TCP vs. UDP
TCP is connection-oriented (UDP is not)
TCP is reliable (UDP is not)
TCP has no size limit on messages (UDP: 64KB)
Sockets
Analogous to telephones – provide the user with an interface to the network
Think of a socket as an end point of a Unix pipe
Used in the same way as a file descriptor:
Creation (open socket)
Read/write (receive/send to socket)
Destruct (close socket)
Types: SOCK_STREAM, SOCK_DGRAM, SOCK_RAW
RMI (Remote Method Invocation)
RMI is a core package of Java 1.1+
The power of Java interfaces (no protocols)
Methods can be invoked from JVMs, possibly running on remote hosts
CORBA
Common Object Request Broker Architecture
A specification for creating and using distributed objects
It is not a programming language
CORBA  vs.        RMI
Interfaces in IDL
Language-independent
Heterogeneous language environment
Garbage collector (No)
In, out, inout parameters
Pass by reference
Interfaces in Java
Java-based
Homogenous language environment
Garbage collector (Yes)
No such parameters
Pass by copy (local objects), by reference to stub (remote objects)
Agents
An agent is an entity that:
Acts on behalf of others in autonomous fashion
Proactive Reactive
Exhibits some levels of the key attributes of learning, cooperation, mobility (mobile agents)
CGI (Common Gateway Interface)
Server-side technology
Mainly used to interpret fill-out forms
CGI scripts can be written in any language
Acts as a gateway between output/input
Environment variables:
REMOTE_HOST, REMOTE_ADDR
CONTENT_TYPE, CONTENT_LENGTH
QUERY_STRING
Stateless
Servlets
Server-side technology
Designed to overcome some limitations of existing technologies (e.g. CGI is stateless)
Characteristics:
A light-weight task that can be executed as a thread
 A servlet can remain in memory (a CGI script terminates when it finished)
Advantages:
A servlet can service multiple client requests
Can handle multiple clients without reloading/reinitialization
JSP (Java Server Pages)
Server-side technology
Enables you to embed Java code within an HTML document
JSP documents have the extension .jsp
When an HTTP request is received, the compilation engine converts the JSP document into a Java Servlet then the servlet will be loaded
Java code is embeded between <% and %>
XML (eXtensible Markup Language)
In essence, it is about meaningful annotation
Syntactically, XML docs look like HTML docs
XML documents can be:
Well-formed (conforms to the XML syntax)
Valid (conforms to its DTD)
Extends HTML linking capabilities:
Xlink: how two documents can be linked
Xpointer: enables addressing of individual parts
Xpath: used by Xpointer to describe location paths
Jini
Pronounced “Gee-nee”
A network infrastructure on top of Java to create a “federation” of virtual machines
 Discovery/Join/Lookup Protocols
Security
We will have an into to cryptography
JDK1.0 security model:
Sanbox (SecurityManager)
JDK1.1 security model:
Sandbox + signed code
JDK1.2 (Java 2) security model:
Protection domains (security policies)
Sandbox (compatible with JDK1.0 JDk1.1)
Questions?
See you next week