Transcript week1

Network Computing
Course Information & Overview
Qusay H. Mahmoud
[email protected]
1
Copyright © 2001 Qusay H. Mahmoud
Goals






2
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
Copyright © 2001 Qusay H. Mahmoud
Course Content









3
Networking Basics
Sockets
RMI
CORBA
Agents and Mobile Code
CGI, Servlets, JSP
Middleware and XML
Jini, JavaSpaces, WebServices
Security Issues
Copyright © 2001 Qusay H. Mahmoud
Limitations





4
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
Copyright © 2001 Qusay H. Mahmoud
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


5
Copyright © 2001 Qusay H. Mahmoud
Grading



Assignments (20%): two assignments
Midterm (30%): March 1st
Project (50%)
–
–
–
–
–
6
Project idea (5%)
Design (10%)
Implementation, documentation, and functionality
(15%)
Presentation (10%)
Final paper (10%)
Copyright © 2001 Qusay H. Mahmoud
In Class
7

Read notes in advance if possible

Discuss concepts

Ask questions
Copyright © 2001 Qusay H. Mahmoud
Outside Class


Read
Explore
–
–

Homework
–

Programming
Project
–
8
Experience writing distributed Java-based
applications
Appreciate the beauty of Java 
Discuss ideas with group members
Copyright © 2001 Qusay H. Mahmoud
Course Outline
See course homepage
http://www.sce.carleton.ca/~qmahmoud/sce580

9
Copyright © 2001 Qusay H. Mahmoud
Why Network Computing?

The evolution of computing?
–
–
–
–
–
10
Stand-alone computers
Mainframes
PCs
Networked Computing
C/S computing

The Internet (and Web) factor

The Java factor
Copyright © 2001 Qusay H. Mahmoud
Stand-alone computers
11

Start with a single processor used exclusively
by one user

Users have to share the computer by
competing for time slots
Copyright © 2001 Qusay H. Mahmoud
Mainframes



12
A single computer used by many users
Every user has a terminal
Processing is done at the mainframe computer
Copyright © 2001 Qusay H. Mahmoud
PCs




13
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
Copyright © 2001 Qusay H. Mahmoud
Networked Computers



14
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
Copyright © 2001 Qusay H. Mahmoud
Client/Server Computing


Users have to share data
Monolithic programs are divided into two parts:
–


15
Client & Server
Client applications run on local machines
Server applications run on centralized
machines
Copyright © 2001 Qusay H. Mahmoud
Convergence (networks &
computers)





16
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….
Copyright © 2001 Qusay H. Mahmoud
The Internet factor




17
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
Copyright © 2001 Qusay H. Mahmoud
The Web factor





18
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 (ecommerce)
New technologies to address arising
challenges(e.g. search engines, agents)
Copyright © 2001 Qusay H. Mahmoud
The Java factor






19
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
Copyright © 2001 Qusay H. Mahmoud
Applications

System management
–
–

Network management
–
–
–
–
20
Plug ‘n play components
Software distributed and upgrading
Fault diagnosis
Error recover
Network and service discovery
Plug ‘n play networks
Copyright © 2001 Qusay H. Mahmoud
Applications….

Electronic commerce
–
–
–
–

Remote control
–
–
–
21
Buying agents (brokers)
Selling agents
Investment
Secure communication protocols
Remote operation
Robots
Soft bots
Copyright © 2001 Qusay H. Mahmoud
Applications….

Remote expertise
–
–
–

Multimedia distribution
–
–
–
22
Medical
Legal & counseling
Distance learning
Personalized news
Intelligent targeting of ads
Video on demand
Copyright © 2001 Qusay H. Mahmoud
Applications….

Cooperative problem solving
–
–
–

Data mining
–
–
23
Distributed planning
Resource allocation
Scheduling
Filtering based on mobile agents (collectors,
reporters)
Filtering info at the source (e.g. stock market)
Copyright © 2001 Qusay H. Mahmoud
Applications….

Others….
–
–
–
24
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
Copyright © 2001 Qusay H. Mahmoud
Overview of Topics
25

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 realworld job or thesis or project….and use this for
your class project if you like
Copyright © 2001 Qusay H. Mahmoud
Basics of Networks




IP: Internet Protocol
TCP: Transmission Control Protocol
UDP: User Datagram Protocol
TCP vs. UDP
–
–
–
26
TCP is connection-oriented (UDP is not)
TCP is reliable (UDP is not)
TCP has no size limit on messages (UDP: 64KB)
Copyright © 2001 Qusay H. Mahmoud
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:
–
–
–

27
Creation (open socket)
Read/write (receive/send to socket)
Destruct (close socket)
Types: SOCK_STREAM, SOCK_DGRAM,
SOCK_RAW
Copyright © 2001 Qusay H. Mahmoud
RMI (Remote Method Invocation)



28
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
Copyright © 2001 Qusay H. Mahmoud
CORBA



29
Common Object Request Broker Architecture
A specification for creating and using
distributed objects
It is not a programming language
Copyright © 2001 Qusay H. Mahmoud
CORBA vs.






30
Interfaces in IDL
Language-independent
Heterogeneous
language environment
Garbage collector (No)
In, out, inout parameters
Pass by reference






RMI
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)
Copyright © 2001 Qusay H. Mahmoud
Agents

An agent is an entity that:
–
–
–
31
Acts on behalf of others in autonomous fashion
Proactive Reactive
Exhibits some levels of the key attributes of
learning, cooperation, mobility (mobile agents)
Copyright © 2001 Qusay H. Mahmoud
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:
–
–
–

32
REMOTE_HOST, REMOTE_ADDR
CONTENT_TYPE, CONTENT_LENGTH
QUERY_STRING
Stateless
Copyright © 2001 Qusay H. Mahmoud
Servlets



Server-side technology
Designed to overcome some limitations of
existing technologies (e.g. CGI is stateless)
Characteristics:
–
–

33
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
Copyright © 2001 Qusay H. Mahmoud
JSP (Java Server Pages)





34
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 %>
Copyright © 2001 Qusay H. Mahmoud
XML (eXtensible Markup Language)



In essence, it is about meaningful annotation
Syntactically, XML docs look like HTML docs
XML documents can be:
–
–

Extends HTML linking capabilities:
–
–
–
35
Well-formed (conforms to the XML syntax)
Valid (conforms to its DTD)
Xlink: how two documents can be linked
Xpointer: enables addressing of individual parts
Xpath: used by Xpointer to describe location paths
Copyright © 2001 Qusay H. Mahmoud
Jini



36
Pronounced “Gee-nee”
A network infrastructure on top of Java to
create a “federation” of virtual machines
Discovery/Join/Lookup Protocols
Copyright © 2001 Qusay H. Mahmoud
Security


We will have an into to cryptography
JDK1.0 security model:
–

JDK1.1 security model:
–

Sandbox + signed code
JDK1.2 (Java 2) security model:
–
–
37
Sanbox (SecurityManager)
Protection domains (security policies)
Sandbox (compatible with JDK1.0 JDk1.1)
Copyright © 2001 Qusay H. Mahmoud
Questions?

38
See you next week
Copyright © 2001 Qusay H. Mahmoud