Socket = an interface connection between two (dissimilar) pipes. OS provides this API to connect applications to networks. home.comcast.



Similar documents
Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Network Layers. CSC358 - Introduction to Computer Networks

ICT SEcurity BASICS. Course: Software Defined Radio. Angelo Liguori. SP4TE lab.

Network Programming TDC 561

Application. Transport. Network. Data Link. Physical. Network Layers. Goal

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

CONNECTING WINDOWS XP PROFESSIONAL TO A NETWORK

Limi Kalita / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 5 (3), 2014, Socket Programming

Internetworking Microsoft TCP/IP on Microsoft Windows NT 4.0

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

SERVICE DISCOVERY AND MOBILITY MANAGEMENT

Chapter 6 Configuring the SSL VPN Tunnel Client and Port Forwarding

Division of Informatics, University of Edinburgh

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

Chapter 2: Remote Procedure Call (RPC)

Cross-platform TCP/IP Socket Programming in REXX

Computer Networks/DV2 Lab

finger, ftp, host, hostname, mesg, rcp, rlogin, rsh, scp, sftp, slogin, ssh, talk, telnet, users, w, walla, who, write,...

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Session Hijacking Exploiting TCP, UDP and HTTP Sessions

Introduction to Computer Networks

Application-layer protocols

How To Manage Address Management In Ip Networks (Netware)

INUVIKA OPEN VIRTUAL DESKTOP FOUNDATION SERVER

Connecting to and Setting Up a Network

Lab 2. CS-335a. Fall 2012 Computer Science Department. Manolis Surligas

Simple Solution for a Location Service. Naming vs. Locating Entities. Forwarding Pointers (2) Forwarding Pointers (1)

ELEN 602: Computer Communications and Networking. Socket Programming Basics

Project 4: IP over DNS Due: 11:59 PM, Dec 14, 2015

Network Configuration Settings

Detailed Table of Contents

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

Introduction to Network Operating Systems

Chapter 11. User Datagram Protocol (UDP)

Network Security. Network Packet Analysis

Network Programming with Sockets. Process Management in UNIX

Basic Operation & Management of TCP/IP Networks

Last Class: Communication in Distributed Systems. Today: Remote Procedure Calls

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

COMMMUNICATING COOPERATING PROCESSES

Chapter 3. Internet Applications and Network Programming

Chapter 25 Domain Name System Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Introduction to Socket Programming Part I : TCP Clients, Servers; Host information

Distributed Systems. 2. Application Layer

Network Communication

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Virtual Server and DDNS. Virtual Server and DDNS. For BIPAC 741/743GE

UNIX Sockets. COS 461 Precept 1

The TCP/IP Reference Model

DB2 Connect for NT and the Microsoft Windows NT Load Balancing Service

Invocación remota (based on M. L. Liu Distributed Computing -- Concepts and Application

What is CSG150 about? Fundamentals of Computer Networking. Course Outline. Lecture 1 Outline. Guevara Noubir noubir@ccs.neu.

Computer Networks - Xarxes de Computadors

Network: several computers who can communicate. bus. Main example: Ethernet (1980 today: coaxial cable, twisted pair, 10Mb 1000Gb).

Overview of Computer Networks

Address Resolution Protocol (ARP)

Linux MDS Firewall Supplement

Introduction to Network Security Lab 1 - Wireshark

From Centralization to Distribution: A Comparison of File Sharing Protocols

Computer Networks/DV2 Lab

TCP/IP Networking An Example

VisuSniff: A Tool For The Visualization Of Network Traffic

Managed VPSv3 Firewall Supplement

Transport and Network Layer

Java Secure Application Manager

DNS ROUND ROBIN HIGH-AVAILABILITY LOAD SHARING

Web Browsing Examples. How Web Browsing and HTTP Works

Development of the Domain Name System. Joey Brown David Margolies

Introduction To Computer Networking

Hands On Activities: TCP/IP Network Monitoring and Management

Understand Names Resolution

Automatic Configuration and Service Discovery for Networked Smart Devices

IP address format: Dotted decimal notation:

Naming vs. Locating Entities

Network Defense Tools

Applications of Passive Message Logging and TCP Stream Reconstruction to Provide Application-Level Fault Tolerance. Sunny Gleason COM S 717

Unix System Administration

Port Use and Contention in PlanetLab

Socket Programming. Request. Reply. Figure 1. Client-Server paradigm

Deploying Windows Streaming Media Servers NLB Cluster and metasan

Windows Sockets Network Programming

Abhijit A. Sawant, Dr. B. B. Meshram Department of Computer Technology, Veermata Jijabai Technological Institute

Lecture (02) Networking Model (TCP/IP) Networking Standard (OSI) (I)

Tutorial on Socket Programming

IP addresses have hierarchy (network & subnet) Internet names (FQDNs) also have hierarchy. and of course there can be sub-sub-!!

How To Understand The History Of The Network And Network (Networking) In A Network (Network) (Netnet) (Network And Network) (Dns) (Wired) (Lannet) And (Network Network)

This Lecture. The Internet and Sockets. The Start If everyone just sends a small packet of data, they can all use the line at the same.

SCUOLA SUPERIORE SANT ANNA 2007/2008

Network Pop Quiz 5 Brought to you by please visit our site!

Network Security CS 192

Novell Access Manager SSL Virtual Private Network

Linux Network Security

Overview - Using ADAMS With a Firewall

Report of the case study in Sistemi Distribuiti A simple Java RMI application

Dissertation Title: SOCKS5-based Firewall Support For UDP-based Application. Author: Fung, King Pong

Overview - Using ADAMS With a Firewall

presentation DAD Distributed Applications Development Cristian Toma

ELIXIR LOAD BALANCER 2

File Transfer And Access (FTP, TFTP, NFS) Chapter 25 By: Sang Oh Spencer Kam Atsuya Takagi

Transcription:

Interprocess communication (Part 2) For an application to send something out as a message, it must arrange its OS to receive its input. The OS is then sends it out either as a UDP datagram on the transport layer or as TCP stream on the transport layer. This is done via a socket. Socket = an interface connection between two (dissimilar) pipes. OS provides this API to connect applications to networks. home.comcast.net For communication purpose: A socket is System 1 System 2 Client Socket IP: A Server Socket Port: x IP: B Client process: (creates socket at OS, connect socket to server address B at port x using connect( ), send to and receive from server socket using, say, read( ) and write( ) system commands)

Server process: (creates socket at OS, bind the socket to an address and a port number, issue listen ( ), if a connection appears call accept( ), send and receive data) Every socket is endowed with socket type, and address domain. Socket types: stream socket (TCP) or datagram socket (UDP) Address domain: Unix domain or Internet domain Berkeley sockets are the most popular Internet socket Runs on FreeBSD, Linux, Windows using TCP/IP protocol. Stream sockets. Connection oriented Two-way communications Reliable (order is maintained at the reception) Uses TCP e.g. Telent, ssh, http applications Datagram sockets: Connection less. Open connection is not maintained Uses UDP, no delivery guarantee e.g. skype

Client-Server sockets Request Client Server Response socket() bind () socket() listen() connect() Establish connection accept() send() Data request recv() recv() close() Data response Close the session send() recv() close() Example. Client socket. ๐ Create socket socket() ๐ Connect to server connect() ๐ While still connected send msg to server send() receive msg from server recv() ๐ Close TCP connection and socket close()

Naming and Name-server Objects and entities in DS must have names and locations in order to communicate. Name provides an access point. Access point: www.sunyit.edu Access point of a process at a transport level: (IP address, port) Access level of a machine at Data Link layer: mac address Using address to refer to an entity is not human friendly. Address may even change. Therefore, a mnemonic like: spirrowa@fang.cs.sunyit.edu. This is a location independent access point a better design. Name types: Identifier Address Human friendly name Names could be flat without assuming any structure. Names could be hierarchically structured. Name server s job is to aid in the mapping, Name resolver: name location. Name server As in a LAN. A station wants to know the Mac address of an entity with a specific IP address. Station uses ARP protocol to resolve the issue at the Domain Name Server (DNS). Local DNS may not have the mapping of a specific address to a location. In that case, DNS may try it at a root server to resolve the issue. Root server needs to be replicated.

Thus for a name server, several solutions may exist to locate an entity Broadcasting solution (not feasible in large network) Forwarding pointers Home based solution Hierarchical solution Distributed Hash-table Forwarding pointer: I know A s location now. A moves to some other location, and it leaves a pointer to its new location with me. Ideal for mobile objects. Problem: long chains of pointers. Prone to failures. Home based solution: Each mobile object has a home it could refer to. Moving away to a foreign domain is handled in this manner: what-when-how.com This is a popular method for Mobile IP. Normally a tunnel would be used to transfer packets from Home domain to the foreign agent at the foreign domain.

Hierarchical solution via a root server If it cannot be located at a local DNS, the enquiry is passed to the root DNS for resolution. Another mode of communication in distributed system is RPC Remote Procedure Call. Here the idea is to avoid direct message passing from one process to another. Instead a process makes a procedure call in a remote machine making it as if it is a local call. In an RPC parameters are passed as value parameters by the client stub to the server. The server unpacks the client stub, carries out the procedure locally, and packs the result into the server stub, and sends it to client.

Packing arguments in a stub is called marshalling process. The arguments are passed as value parameters. A. Birrell, B Nelson, Implementing Remote Procedure Calls, ACM Symposium on Operating System Principles, 1984 In RPC, the value parameters are passed to the remote procedure.

In RMI, Remote Method Indication, JVM can access a remote object in another machine and run one of its methods (remotely) using parameter passing by reference. Basically, Local objects This machine invoke receive Remote objects Remote machine Java RMI allows interacting with distributed objects at remote servers. Local clients are usually thin clients invoking services at the top-heavy servers. The constraint: Language dependent. Basically it is a totally Java solution. Basic architecture: (almost like RPC) Client Server Stubs Skeletons Remote Reference Reference Instantiate an object of interest in another machine Invoke one of its methods.