Introduction to Java Networking Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-6.

Slides:



Advertisements
Similar presentations
What is RMI? Remote Method Invocation –A true distributed computing application interface for Java, written to provide easy access to objects existing.
Advertisements

Java Network Programming Vishnuvardhan.M. Dept. of Computer Science - SSBN Java Overview Object-oriented Developed with the network in mind Built-in exception.
Multiplexing/Demux. CPSC Transport Layer 3-2 Multiplexing/demultiplexing application transport network link physical P1 application transport network.
Copyright © 2001 Qusay H. Mahmoud RMI – Remote Method Invocation Introduction What is RMI? RMI System Architecture How does RMI work? Distributed Garbage.
Review of Important Networking Concepts
Network Architectures Professor Jinhua Guo CIS 527 Fall 2002.
Network Programming Chapter 11 Lecture 6. Networks.
Socket Programming.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
1. Introducing Java Computing  What is Java Computing?  Why Java Computing?  Enterprise Java Computing  Java and Internet Web Server.
Networking Support In Java 2 Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Java Socket Support Presentation by: Lijun Yuan Course Number: cs616.
CS3771 Today: network programming with sockets  Previous class: network structures, protocols  Next: network programming Sockets (low-level API) TODAY!
Internet Programming In Java. References Java.sun.com Java552 Many of the programs shown.
COMP1681 / SE15 Introduction to Programming
An Introduction to Internetworking. Why distributed systems - Share resources (devices & CPU) - Communicate people (by transmitting data)
Networking Support In Java Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
What Is TCP/IP? The large collection of networking protocols and services called TCP/IP denotes far more than the combination of the two key protocols.
Protocol Architecture The “Common Language”. Copyright by Jorg Liebeherr 98, 99 Need for Protocols Protocols are a set of rules and conventions. By enforcing.
CS Computer Networks Dr. Randy L. Ribler 103 Hobbs
Data Communications and Networks
Fall 2000Datacom 11 Lecture 4 Socket Interface Programming: Service Interface between Applications and TCP.
Hands-On Microsoft Windows Server 2003 Networking Chapter Three TCP/IP Architecture.
NET0183 Networks and Communications Lecture 31 The Socket API 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks Lecture powerpoints from.
CS 453 Computer Networks Lecture 2. A little History Computer networking had some origins in the 1950s Mostly phone circuits to connect remote IO devices.
1.1 What is the Internet What is the Internet? The Internet is a shared media (coaxial cable, copper wire, fiber optics, and radio spectrum) communication.
Introduction To Internet
IT 347 Final Review Winter 2011 J.J. Ekstrom. IT 347 Course Topics Network Models Protocols and Encapsulation Reliable Delivery / Sliding Window Clients,
1. I NTRODUCTION TO N ETWORKS Network programming is surprisingly easy in Java ◦ Most of the classes relevant to network programming are in the java.net.
1 Cisco Unified Application Environment Developers Conference 2008© 2008 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction to Etch Scott.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
L 2 - 1 3( 1/ 20) : Java Network Programming. The Socket API The previous contents describe client-server interaction that application programs use when.
Networking with Java Socket programming. The Interweb thing Al Gore invented… Internet is a network of networks. The Internet is really people communicating.
 2003 Joel C. Adams. All Rights Reserved. Calvin CollegeDept of Computer Science(1/11) Java Sockets and Simple Networking Joel Adams and Jeremy Frens.
BASIC INTERNET PROTOCOLS: http, ftp, telnet. Mirela Walczak.
Java Programming: Advanced Topics 1 Networking Programming Chapter 11.
What is Java? Object Oriented Programming Language Sun Microsystems “Write Once, Run Everywhere” Bytecode and Virtual Machine Java Platform (Java VM and.
CSI 3125, Preliminaries, page 1 Networking. CSI 3125, Preliminaries, page 2 Networking A network represents interconnection of computers that is capable.
Java Network Programming Network Programming Spring 2000 Jeffrey E. Care
Advanced Java Session 4 New York University School of Continuing and Professional Studies.
Advanced Higher Computing Computer Networking Topic 1: Network Protocols and Standards.
Performance Metrics & Network Architectures Professor Jinhua Guo CIS 427 Winter 2003.
Chapter 2 Network Models
Client-server communication Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
Network Programming. These days almost all devices.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco Public 1 OSI data link layer CCNA Exploration Semester 1 Chapter 7.
Network Programming Communication between processes Many approaches:
Jaringan Komputer_D3 TT
Chapter 3: Network Protocols and Communications
COMP2322 Lab 4 Socket Programming
Chapter 2 Network Models
Object-Orientated Analysis, Design and Programming
IP Telephony (VoIP).
Networking Based Applications
Basic Communications Model Standards are needed at all Layers
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Network Programming in Java CS 1111 Ryan Layer May 3, 2010
OSI model vs. TCP/IP MODEL
MCA – 405 Elective –I (A) Java Programming & Technology
Pertemuan 19 Introduction to TCP/IP
NETWORK PROGRAMMING CNET 441
Network Programming Introduction
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
An Introduction to Internetworking
An Introduction to Internetworking
Technologies and Applications of Computer Networks
Chapter 8 – Data switching and routing
Objectives: 1.Identify different internet protocol (IP) 2.Configure sample of IP address 3.Appreciate and relate protocol in our life.
Presentation transcript:

Introduction to Java Networking Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-6

Slide - 2 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Networking Topics  Network Protocols in Java:  TCP  UDP  Multicast  Threaded and Non-Threaded examples  Remote Method Invocation (RMI)

Slide - 3 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng A Short History of Java Networking (1/3)  The Dark Ages: C/C++ Networking and the Need for Change  Before Java, simple network connectivity required lots of code.  C/C++ provided many, many choices/options for networking  Good for C programmers.  Most programmers did not use all these options.

Slide - 4 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng A Short History of Java Networking (2/3)  Java 1.0  Basic networking capability with high level abstraction of URL handlers.  Low level choices were missing (e.g., connection timeouts.)  Raw socket classes were final--java.net.Socket and java.net.ServerSocket could not be extended.  “One shot” implementations with java.net.SocketImpl allowed only one implementation in each VM.

Slide - 5 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng A Short History of Java Networking (3/3)  JDK 1.1 (the big leap)  Added four common socket options.  Allowed raw data manipulations within high-level abstractions.  Removed final designations.  Added multicast connections (previously limited to LAN and/or external native calls).  JDK 1.2 (a second big leap)  Addition of fine-grained Java Security Model.  ability to control processes/connections/ports with very fine granular control over details.  Added functionality to APIs.

Slide - 6 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Competing Networking Models: OSI vs. Internet Whose Kung Fu is Better?  Two competing models are used to describe networking  Open Systems Interconnection (OSI) architecture  Internet Architecture  Open Systems Interconnection Standard  partitions network connectivity into seven layers.  published by OSI and International Telecommunications Union (ITU) in series of “X dot” standards: X.25, X.400, etc.  Internet Architecture Standard  also known as “TCP/IP architecture” after its two key protocols  evolved from packet-switched ARPANET of DoD  Internet Engineering Task Force (IETF) maintenance.

Slide - 7 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng OSI in Action

Slide - 8 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Internet Architecture Model

Slide - 9 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Internet Architecture Model (1/2)

Slide - 10 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Internet Architecture Model (2/2)

Slide - 11 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Network Protocols in Java (1/3)

Slide - 12 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Basic Terminology: IP Address (2/3)

Slide - 13 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Basic Terminology: Ports (3/3)

Slide - 14 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng The java.net.* Package

Slide - 15 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Address Representations

Slide - 16 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Converting IP Numbers to String

Slide - 17 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Other InetAddress Services   public boolean isMulticastAddress();   static InetAddress[] getAllByName(String host); Determines all the IP addresses of a host, given the host's name.   static InetAddress getByName(String host); Determines the IP address of a host, given the host's name.

Slide - 18 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Sockets: Constructors

Slide - 19 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Sockets: Simple Usage

Slide - 20 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng TCP/UDP Connections Distinguished

Slide - 21 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Reading and Writing from Sockets (1/2)   Sockets in Java are full duplex--meaning that they can both send and receive information.   A good example of this feature is an echo client. The echo service listens to Port 7, and simply returns or ‘echoes back’ all information received from the client.   An echo client, therefore, has to be able to send and receive over the same socket.   Let’s look at an echo client written by Sun....

Slide - 22 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng Reading and Writing from Sockets (2/2)

Slide - 23 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng ServerSockets (1/3)

Slide - 24 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng ServerSockets (2/3)

Slide - 25 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng ServerSockets (3/3)

Slide - 26 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng

Slide - 27 OOP Lecture 2004 Dr. –Ing. Ir. Kalamullah Ramli, M.Eng The End QUESTIONS & COMMENTS ?