Lect01 - What Can A Network Program Do
Lect01 - What Can A Network Program Do
Lect01 - What Can A Network Program Do
Ransara Wijethunga
Tech. Lead
Millennium IT
2016 – 07 - 23
2
What you will miss !
3
Course Content
L 01 What Can a Network Program Do July 23
L 02 Networking Concepts (Recap) July 30
L 03 Sockets Concepts , Address Lookup Aug 06
L 04 TCP Socket Programming Aug 13
L 05 UDP Socket Programming Aug 20
L 06 Multicasting Aug 27
L 07 HTML in Java Network Programming Sep 03
L 08 Threads Sep 17
L 09 Thread Pools Sep 24
L 10 Network Programming in C Oct 01
L 11 Network Traffic Analysis with Wireshark Oct 08
L 12 Secure Sockets (in Java) Oct 15
L 13 Network Programming with Java Non Blocking IO Oct 22
L 14 Remote Method Invocation Oct 29
4
References / Recommended Textbooks
5
Assignments
Final Marks
◦ 30 % Assignments ( 3 Assignments + 1 or 2 )
◦ 70 % Semester End Exam
◦ No mid semester test
◦ In-class tests ( your choice ? )
No hard copies
6
Attendance
University / Faculty rules and regulations
apply.
Ransara Wijethunga
Tech. Lead
Millennium IT
2016 – 07 - 23
Motivation….
9
Why this subject ?
Majority of programs are network aware.
Examples:
◦ Text editors save and open files directly from FTP
servers
◦ IDEs like Eclipse and IntelliJ IDEA communicate
with CVS repositories
◦ Word processors like Microsoft Word open files
from URLs
◦ Antivirus programs like Norton Anti Virus check
for new virus definitions by connecting to the
vendor’s web site every time the computer is
started. 10
Programs are network aware…
Examples (cont.)
11
Why Java for Network Programming ?
Java is the first programming language designed
from the ground up with networking in mind.
Java was originally designed for proprietary
cable television networks rather than the
Internet, but it’s always had the network
foremost in mind
2. Security
13
What Can a Network Program Do?
Web
Search
Peer-to-
Servers /
Peer
Services
Interaction
Send Data
Retrieve E-
Data Commerce
Ubiquitous Interactive
Computing TV
14
What Can a Network Program Do?
Retrieve Data
Send Data
◦ File storage / Massively parallel computing
Peer-to-Peer Interaction
◦ Games / Chat / File sharing
Servers / Services
Web Search
E-Commerce
Ubiquitous Computing
Interactive Television
15
Retrieve Data
18
Send Data –
Massively parallel computing
19
Send Data –
Massively parallel computing
Imagine !
◦ You got massive amount of data from the “Hubble
Space Telescope”
20
Send Data – Massively Par. Comp.
Massively parallel Computing refers to the use of a large number of
processors (or separate computers) to perform a set of coordinated
computations in parallel.
22
Peer-to-Peer Interaction
Applications (java or any other network
application) can talk to each other across
the Internet using Network Sockets,
opening up many new possibilities for
group applications.
25
Web Search – Spiders & Agents
Java programs can wander through the Web, looking for
crucial information. Search programs that run on a single
client system are called spiders. A spider downloads a page
at a particular URL, extracts the URLs from the links on that
page, downloads the pages referred to by the URLs, and
repeats the process for each page it downloads.
26
Ubiquitous Computing
Networked devices don’t have to be
tied to particular physical locations,
subnets, or IP addresses. Jini is a
framework that sits on top of Java,
easily and instantly connecting all sorts
of devices to a network. For example,
when a group of coworkers gather for a
meeting, they generally bring a random
assortment of personal digital assistants,
laptops, cell phones, pagers, and other
electronic devices with them.
If the coffee machine is empty, it sends
an email to supplies division for refilling.
27
Interactive Television
The Java TV API sits on top of J2ME to add television-
specific features like channel changing and audio and
video streaming and synchronization.
TV stations can send programs down the data stream
that allow channel surfers to interact with the shows.
An infomercial for spray-on hair could serve a GUI
program that lets the viewer pick a color, enter their
credit card number, and send the order through the
cable modem and over the Internet using their
remote control.
A news magazine could conduct a viewer poll in real
time and report the responses after the commercial
break. 28
Next ….
2. Security
29
Security
Remotely loaded code cannot access arbitrary addresses in
memory. Unlike the other restrictions in the list, which are
enforced by a SecurityManager, this restriction is a property of
the Java language itself and the byte code verifier.
30
Security (cont.)
Remotely loaded code cannot read from or write to the system
clipboard. (Java WebStart applications can do this with the user’s
explicit permission on a caseby- case basis.) It can read from and
write to its own clipboard.
If failed, email me
◦ ransaraw@gmail.com
34