Programming Assignment I

Slides:



Advertisements
Similar presentations
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
Advertisements

A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Networking Support In Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Online Chess Project 3 Due date: April 17 th. Introduction Third in series of three projects This project focuses on adding online support –2 players.
Introduction to the Application Layer Computer Networks Computer Networks Spring 2012 Spring 2012.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
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.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Chapter Two Application Layer Prepared by: Dr. Bahjat Qazzaz CS Dept. Sept
FTP (File Transfer Protocol) & Telnet
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
HTTP HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols.
CS/EE 145A Reliable Transmission over Unreliable Channel Netlab.caltech.edu/course.
What makes a network good? Ch 2.1: Principles of Network Apps 2: Application Layer1.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
NTU CSIE Computer Networks 2009 Spring Project 2 Internet Relay Chat (IRC)
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Assignment 1 tutorial. Assignment 1 Programming part: – Socket programming: a chat room application – Individual assignment – Deadline 20 th Oct 2015.
File Transfer And Access (FTP, TFTP, NFS). Remote File Access, Transfer and Storage Networks For different goals variety of approaches to remote file.
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Bapi Chatterjee Prajith R G.
Socket programming in C. Socket programming Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm.
CS470 Programming Assignment 1 Zilong Ye. A Chat Application Goal: learn socket programming and implement a chat application for exchanging messages between.
Process-to-Process Delivery:
© MMII JW RyderCS 428 Computer Networks1 Electronic Mail  822, SMTP, MIME, POP  Most widely used application service  Sometimes only way a person ever.
SOCKET PROGRAMMING Presented By : Divya Sharma.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Object-Orientated Analysis, Design and Programming
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Aras Atalar Prajith R G.
Introduction to Networks
Chapter 9: Transport Layer
EZ MESSENGER CUSTOMER portal training
Instructor Materials Chapter 5 Providing Network Services
Instructor Materials Chapter 9: Transport Layer
Assignment 2 – Team Project: Distributed System and Application
Project 1 Simple Socket Client.
Application layer 1 Principles of network applications 2 Web and HTTP
Assess Survey Invitations
Programming Assignment #1
Transport Layer.
Process-to-Process Delivery, TCP and UDP protocols
Principles of Network Applications
Simple Socket Client Project 1.
Networking for Home and Small Businesses – Chapter 6
TCP Transport layer Er. Vikram Dhiman LPU.
Data Networking Fundamentals
Introduction to Networks
Client/Server Example
Client-Server Interaction
Networking for Home and Small Businesses – Chapter 6
Chapter 2 Introduction Application Requirements VS. Transport Services
Sarah Diesburg Operating Systems COP 4610
The Internet and HTTP and DNS Examples
Multimedia and Networks
Simple Socket Client Project 1.
Process-to-Process Delivery:
Chapter 15 – Part 2 Networks The Internal Operating System
CSC Advanced Unix Programming, Fall 2015
Data Communication EDA344, DIT420 Description of Lab 1 and Optional Programming HTTP Assignment Aras Atalar Prajith R G 24/01/2018.
Andy Wang Operating Systems COP 4610 / CGS 5765
The Application Layer: SMTP, FTP
Networking for Home and Small Businesses – Chapter 6
Training 101 : Accessing iBoomerang Tools
Programming Assignment #1
Chapter 2 Application Layer
Computer Networks Protocols
Presentation transcript:

Programming Assignment I Due Wednesday 11th March

Introduction ─ The Problem Here comes the assignment ─ Chatroom ! It seems to be a tradition in this class. It is usually implemented in a way that the client is always connected to the server. There may be some problems … The capacity of the server is very limited ─ the famous C10K problem. Maintaining permanent connection can be difficult in some environment (ex: bad WiFi signals). Users may experience unexpected disconnection. (!!!)

Introduction ─ The Rescue Maybe we don't need the permanent link. How about the following ideas ? A message center is designed to forward the message. It is also used to manage and maintain the client status. (user current status and credential check) The connection is established when it is necessary. The client can be paged when a message should be “pushed.” Some kind of heartbeat mechanism is necessary for the message center to track the client status.

Introduction ─ The Basic Concept Message Sequence Chart Your own message format Your own message flow

Basic Implementation (80 points) What you need to implement Server / Message Centre Client Message Centre Features Authenticate users Route messages from sender to recipient Timeout inactive users Allow blocking / unblocking users Broadcast presence notifications Store messages for offline users

Basic Implementation Client Features Prompt for authentication Send messages / display messages received from other users Display server notifications Find users online Heartbeat Possible Bonus Option - User Interface

Peer-to-peer chat (20 points) Motivation Regular Chat via a server is boring - Too mainstream What if the server goes down? Your chat can still continue! Also, What if you didn’t want the server to read your messages? Solution Talk to your friend directly!

Peer-to-peer chat What you need to do Find out how to contact your friend. The chat server has the contact information (IP Address and Listening Port) Once you know the IP and Port, contact your friend directly. Both of the above actions have to be performed the private command is used. Example: private ns2984 Hello!

Peer-to-peer chat bonus (20 points) Features for bonus points P2P Privacy and Consent Guaranteed Message Delivery These are not your only choices. If you want to implement your own idea for a bonus feature, come talk to one of the TAs to find out if it is bonus-worthy!

Commands - Logging in/out Start the server java Server 4009 Start the Client java Client 10.11.12.13 4009 Login >Username: foo >Password: bar >Welcome to Simple Chat Server > Logout >logout PORT to listen on Server’s IP address Server’s PORT

Commands - Sending Messages Message a user via server: >message <user> <message> Broadcast to all users: >broadcast <message> Send message to user directly: >private <user> <message> A’s terminal B’s terminal C’s terminal >message B Hi >A: Hi >broadcast Hi there >A: Hi there >private C Hola >A: Hola

Commands – Blocking users Block a user from sending messages or obtaining private address >block <user> Unblock user >unblock <user> A’s terminal B’s terminal C’s terminal >block B >User B has been blocked >message A Hi >Your message could not be delivered as the recipient has blocked you >broadcast Hello >Your message could not be delivered to some recipients >B: Hello

Commands – Miscellaneous Print list of all users online >online >B, C Get address of a user and cache for future private message >getaddress <user> >ipaddress: 10.11.12.13 port: 8080 Subsequent private commands internally routed to 10.11.12.13, port 8080

Deliverables Your program will be submitted via courseworks. Please submit a zip file using the format <UNI>_<Programming Language>.zip (e.g. cn1111_python.zip) to the Programming Assignment 1 folder. Make sure you include all of the following files in your zip file:

Deliverables README.txt: Your readme file should include but not limited to the following parts A general description of your programming design and data structure Explanation of your source code (make sure your code is well commented and readable or you will be taken 5-10 points. To avoid such an undesirable scenario, tools like astyle may be helpful.) Detailed instructions on how to run/compile your source code Sample commands to run your program A short introduction of your additional features and sample test cases (Notice: discuss your design of additional features to one of TAs during office hour or post a private message on Piazza before you actually implement them, some features may not be considered “additional”)

Deliverables Makefile: if you are not familiar with makefile, you can read through the tutorial: http://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/ this article is also helpful: http://www.devin.com/cruft/javamakefile.html Source code Other files you think are important

Grading Functionality Points Basic Client/Server Model 80 - User authentication 10 - Message exchange - Multiple clients support - Heartbeat - Blacklist - Offline messaging - Broadcast 5 - Display current users - Logout - Graceful exit using control + c Basic P2P Model 20 - Obtain online user’s IP address 5 - Offline report 2 - P2P message exchange 13 Advanced P2P Features OR other personalized features 20 - P2P privacy and consent 10 - Guaranteed message delivery Note: 50% of the points will be deducted if using permanent connection. You will get 0 point if we find any plagiarism in your assignment.

Socket Programming- a door between application process and end-end-transport protocol (UDP or TCP) C: SOCK_STREAM JAVA: Socket a.k.a. TCP reliable delivery in-order guaranteed connection-oriented bidirectional C: SOCK_DGRAM JAVA: DatagramSocket a.k.a. UDP unreliable delivery no order guarantees no notion of “connection” – app includes dest. in packets can send or receive

Socket programming with TCP

Client/server socket interaction: TCP

Socket programming with UDP

Client/server socket interaction:UDP

Important Reminders Ensure your code compiles on the CLIC lab machines Document your code Discuss extra credit features with a TA before you implement them Preliminary Question Deadline: Wed, Feb. 25th (Set up everything before that!) Check with a TA before using 3rd party libraries Do not copy! Submission is due on Wed, March 11th