Peer 2 Peer – First Report Submitted by: Arthur Kiyanovsky Elena Zarkhin Ilya Bokshtein

Slides:



Advertisements
Similar presentations
1 Topic 2 – Lesson 4 Packet Filtering Part I. 2 Basic Questions What is packet filtering? What is packet filtering? What elements are inside an IP header?
Advertisements

Transmission Control Protocol (TCP)
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Netprog: TCP Details1 TCP Details. Netprog: TCP Details2 TCP Lingo When a client requests a connection, it sends a “SYN” segment (a special TCP segment)
TCP Lightweight Agent Project Goal : Implementation of a generic agent that will be able to measure connection parameters between a client and a server.
Developers: Alexey Rastvortsev, Ilya Kolchinsky Supervisors: Roy Friedman, Alex Kogan.
1 Internet Networking Spring 2004 Tutorial 13 LSNAT - Load Sharing NAT (RFC 2391)
Netprog: TCP Details1 TCP Details Introduction to Networking John Otto TA Jan 31, 2007 Recital 4.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
1 Java Networking – Part I CS , Spring 2008/9.
Page: 1 Director 1.0 TECHNION Department of Computer Science The Computer Communication Lab (236340) Summer 2002 Submitted by: David Schwartz Idan Zak.
Netprog: TCP Details1 TCP Details Introduction to Networking.
TCP/IP Network and Firewall. IP Packet Protocol  1 ICMP packet  6 TCP packet  17 UDP packet.
VoIP on a Wireless LAN Orly Goren Tomer Shiran Lior Nir.
An Introduction to Internetworking. Why distributed systems - Share resources (devices & CPU) - Communicate people (by transmitting data)
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
IMDraw An Instant Message and Drawing Program Tim Poley Kelly Whitacre.
ISP – 9 th Recitation Socket programming – Client side.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
P2P Project Mark Kurman Nir Zur Danny Avigdor. Introduction ► Motivation:  Firewalls may allow TCP or UDP connections on several specific ports and block.
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital.
The Computer Communication Lab (236340) Spring 2005 Universal Plug and Play on Mobile Phone With Qualcomm - Device -
Chat Room Project (IM- E2003) Supervised by : Dan Witzner Hansen Group Member: Xijie Lu Vu Pham To IT University of Copenhagen 23rd Jan.2004.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #12 LSNAT - Load Sharing NAT (RFC 2391)
I NTRODUCTION OF S OCKET P ROGRAMMING L.Aseel AlTurki King Saud University.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
ECE 544 Project3 Kush Patel Siddharth Paradkar Ke Dong.
Socket Programming References: redKlyde ’ s tutorial set Winsock2 for games (gamedev.net)
Hands On Networking Socket Programming Ram P Rustagi, ISE Dept Abhishek Gupta, ISE Dept Laxmi Kuber, MCA Dept June 28-30, 2012.
Assignment 3 A Client/Server Application: Chatroom.
Professor OKAMURA Laboratory. Othman Othman M.M. 1.
Firewall and Internet Access Mechanism that control (1)Internet access, (2)Handle the problem of screening a particular network or an organization from.
TCP/IP: Basics1 User Datagram Protocol (UDP) Another protocol at transport layer is UDP. It is Connectionless protocol i.e. no need to establish & terminate.
6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
Chapter 2 Applications and Layered Architectures Sockets.
Network Programming Eddie Aronovich mail:
Practical Session 12 Reactor Pattern. Disadvantages of Thread per Client It's wasteful – Creating a new Thread is relatively expensive. – Each thread.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
Client/Server Socket Programming Project
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 15 Application Layer and Client-Server.
Warlords Patrick Levoshko SE 558 – Multiplayer Game Design.
Making SIP NAT Friendly Jonathan Rosenberg dynamicsoft.
Today’s topic: UDP Reliable communication over UDP.
Computer Communication: An example What happens when I click on
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Networks, Part 2 March 7, Networks End to End Layer  Build upon unreliable Network Layer  As needed, compensate for latency, ordering, data.
1 Dimension of Server Designs r Iterative vs Concurrent r Connection-oriented vs. connectionless r Stateful and stateless m Constrained by application.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
Network ManagerConnection Manager Connectivity and Messaging block Protocol Marshaller Factory.
A Local Area Network Chat Client ITTC LAN CHAT John Vincent Cecogo Jerikho Daguno Ardee Santos Elaine Mendoza Anjomar Pat Del Mindo Philip John Sales Philip.
SPL/2010 Reactor Design Pattern 1. SPL/2010 Overview ● blocking sockets - impact on server scalability. ● non-blocking IO in Java - java.niopackage ●
Skype.
The Echo Server Problem. Contents  Basic Networking Concepts  The Echo Server Problem.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Object-Orientated Analysis, Design and Programming
Chapter 11 User Datagram Protocol
Assignment 3 A Client/Server Application: Chatroom
CSC410: Distributed System
Introduction to Networking Recital 4
The Client Server Model
Remote Procedure Call (RPC)
Starting TCP Connection – A High Level View
TA: Donghyun (David) Kim
An Introduction to Internetworking
Exceptions and networking
Presentation transcript:

Peer 2 Peer – First Report Submitted by: Arthur Kiyanovsky Elena Zarkhin Ilya Bokshtein

Objectves P2P chat application including conference chats Many Clients One Server Registration Connection Client discovery Firewall bypassing Tools: Java, Swing

Client Connection Types  Direct UDP  Direct TCP (if UDP port blocked by firewall)  Reverse TCP (if connection initiator is blocked by a firewall but the target is not)  Indirect – both clients stay connected to the server and speak through it.

PART 1: The Protocol & Algorithms

Connection & Conference ID Each connection has a Connection ID Each conference chat has a Conference ID. These IDs allow Client A to talk with client B in 2 different chats. The ID structure is : : : : The serial number is necessary for the possibility of a client starting more than 1 chat in the span of 1 second. The ID of a conference is the connection ID of the first connection in the conference.

UDP Reliability UDP Datagram (exp. backoff) UDP_ACK Stop & Wait Exponential backoff

Registration 1 st phase (Partial or no Firewall) PROB_ACK(UDP) PROBE(UDP) REGISTER REG_ACK PROBE(TCP)

Registration 1 st phase (Full Firewall) PROBE(UDP) REGISTER REG_ACK PROBE(TCP)

Registration 2 nd phase Notify Clients of a new client Notify new client of clients CLIENTS_ADDED

Connection 1 st phase: Connection method retrieval from server CONNECT CON_ACK

Connection 2 nd phase (both UDP/TCP open) JOIN_TALK TEXT_MESSAGE SourceDestination

Connection 2 nd phase (one UDP closed dest TCP closed) INIT_CALL JOIN_TALK SourceDestination TEXT_MESSAGE

Connection 2 nd phase (dest UDP closed both TCP closed) SourceDestination JOIN_TALK TEXT_MESSAGE CALL_ME

Conference Call - Adding a new client Added Adder Already in the Conf. call ADD_CLIENT JOIN_TALK

Chat session termination TERMINATE Source Destination\s TERMINATE

Client Exit Source All Online Clients CLIENT_EXIT

Error 1: Server returned wrong connection method JOIN_TALK SourceDestination CHECK_CLIENT PROBE PROB_ACK CON_ACK JOIN_TALK

Error 2: Client name already exists REGISTER ERROR

Periodical client probing PROBE(UDP) PROB_ACK(TCP) PROBE(TCP) Every X seconds the server sends probes to all the clients. If the status of a port (open\closed) in a client changes the server updates its database.

Client recovery after being blocked by a firewall In case a client doesn ’ t receive probes for 2X seconds because of a firewall it registers to the server again. PROBE(UDP) PROBE(TCP) REGISTER PROBE(UDP) PROBE(TCP)

Client recovery after being blocked by a firewall - TCP Windows Firewall BUG MESSAGE

Client Recovery after firewall has been removed Since probes are periodically sent to both TCP, UDP ports of the client, if one of these ports is suddenly opened the server will know and will consequentially redirect next chats accordingly.

Abnormal Client Termination If both client ports are closed the server waits 3X seconds for the client to register again. If that doesn ’ t happen, the server assumes the client disconnected and notifies all other clients by sending them CLIENT_EXIT messages.

Abnormal Client Termination cont. PROBE(UDP) PROBE(TCP) PROBE(UDP) PROBE(TCP) Abnormally terminated client All other clients CLIENT_EXIT

Abnormal Server Termination Like in the firewall case, if a client doesn ’ t receive probes for 2X seconds it tries to register at the server again. Since the server is not there, connection will fail. All chats will not let the clients to send messages through them. New chats will not be possible.

Server Resurrection The client will try to register every 2X seconds the whole time the server is down. If a new server comes up the clients will find out when they try to register again. All the chats will become accessible. If needed the chats will recreate indirect connections with other clients. The system will continue working normally.

Part 2: Modules Incoming Interfaces Outgoing Threads ClientServer Listeners Handlers handlermain talk UDP-5000 TCP-5000 TCP-80 UDP-80 probe ServerClient

Server Modules TCP listener thread 80 UDP listener thread 80 Handler thread Probe thread Outgoing interface Incoming interface Outgoing interface

Client Modules UDP listener thread 5000 TCP listener thread 5000 Talk Thread Main Thread TCP listener thread 80 Outgoing interface Incoming interface

Networking - TCP accept TCP listener handler message TCP interface

Networking - UDP UDP listener registry Find interface UDP interface message