Project 3 Assignment - Multicast Application Design | ECE 4564, Study Guides, Projects, Research of Electrical and Electronics Engineering

Project 3 Assignment Material Type: Project; Class: Network Application Design; Subject: Electrical & Computer Engineer; University: Virginia Polytechnic Institute And State University; Term: Fall 2007;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 12/06/2007

vthokiegrad
vthokiegrad 🇺🇸

17 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 4564
Fall 2007
Project 3 Assignment Page 1 of 5
Virginia Tech
Bradley Department of Electrical and Computer Engineering
ECE 4564: Network Application Design
Fall 2007
Project 3: Multicast Application Design – Due: November 11, 2007, 11:59pm
1. Introduction
The educational objective of this project is to reinforce concepts related to datagram sockets, IP multicast,
and peer-to-peer applications. The design and programming objectives of this project are to design,
implement, and test a peer-to-peer text chat windowed application based on IP multicast. Specifically,
you are to develop an application using IP multicast that allows users to join a group, send text messages
to all members of the group, to display text messages from all members of the group, and to leave the
group. Notes on design are included in the appendix.
2. Honor Code
You may work on this project in teams of two students at most. You can work on it individually. You may
not share your code with other students or borrow code from other students. You may not discuss your
design or code with anyone except the instructor or the TA. You may not help other students in
debugging their code. You may not have others help you. Simply stated, you may not discuss or in any
way share any aspect of your original work with anyone except the instructor or graduate teaching
assistant for this class. If you use libraries or any code developed by others, its use must be properly
acknowledged.
You may discuss the details of system calls with other students. You may also discuss the protocol
specification and the requirements of this assignment with others. Contact the instructor if you have any
questions about the honor code requirements.
Policy regarding plagiarism
The TA will use MOSS to detect software plagiarism. Here is the link to MOSS:
http://theory.stanford.edu/~aiken/moss. If a student (or team) is proven to have used
code that is not his/hers/theirs, he/she/they will be automatically get an F in this course regardless
of how much of the submitted code is not his/hers/theirs and regardless of the source from which
they took the code.
3. Application Requirements
You application should support the following operations.
Allow a user to join and leave the chat. A default group of 239.255.10.10 and default port number of
4000 should be used, but the user should be allowed, through the interface to change this. Upon
joining, the application should create the socket, join the multicast group, and begin listening on the
specified port. Upon leaving the group the application should stop listening for messages, remove
itself from the group, and close the socket.
When joined to a group, allow a user to send messages to members of the group as an IP multicast
datagram. Messages must be carried in a single datagram and may consist of at most 256 characters.
Characters are represented as single bytes using ASCII encoding. Only message characters are
allowed in the IP datagram, i.e., no additional control information or special characters may be sent. If
the user is not joined to a group, the application should issue a friendly message telling the user they
are not currently part of a group.
When joined to a group, display messages received from other members of the group and from the
user (i.e., the application displays messages that it sends, as well as messages it receives). When
displayed, messages should be preceded by their remote endpoint information (IP address and port
number) or ‘me’ in the case of the user’s messages. For example, if the received message is “Hello!”
pf3
pf4
pf5

Partial preview of the text

Download Project 3 Assignment - Multicast Application Design | ECE 4564 and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

Virginia Tech Bradley Department of Electrical and Computer Engineering

ECE 4564: Network Application Design  Fall 2007

Project 3: Multicast Application Design – Due: November 11, 2007, 11:59pm

1. Introduction

The educational objective of this project is to reinforce concepts related to datagram sockets, IP multicast, and peer-to-peer applications. The design and programming objectives of this project are to design, implement, and test a peer-to-peer text chat windowed application based on IP multicast. Specifically, you are to develop an application using IP multicast that allows users to join a group, send text messages to all members of the group, to display text messages from all members of the group, and to leave the group. Notes on design are included in the appendix.

2. Honor Code

You may work on this project in teams of two students at most. You can work on it individually. You may not share your code with other students or borrow code from other students. You may not discuss your design or code with anyone except the instructor or the TA. You may not help other students in debugging their code. You may not have others help you. Simply stated, you may not discuss or in any way share any aspect of your original work with anyone except the instructor or graduate teaching assistant for this class. If you use libraries or any code developed by others, its use must be properly acknowledged.

You may discuss the details of system calls with other students. You may also discuss the protocol specification and the requirements of this assignment with others. Contact the instructor if you have any questions about the honor code requirements.

Policy regarding plagiarism

The TA will use MOSS to detect software plagiarism. Here is the link to MOSS: http://theory.stanford.edu/~aiken/moss. If a student (or team) is proven to have used code that is not his/hers/theirs, he/she/they will be automatically get an F in this course regardless of how much of the submitted code is not his/hers/theirs and regardless of the source from which they took the code.

3. Application Requirements

You application should support the following operations.

  • Allow a user to join and leave the chat. A default group of 239.255.10.10 and default port number of 4000 should be used, but the user should be allowed, through the interface to change this. Upon joining, the application should create the socket, join the multicast group, and begin listening on the specified port. Upon leaving the group the application should stop listening for messages, remove itself from the group, and close the socket.
  • When joined to a group, allow a user to send messages to members of the group as an IP multicast datagram. Messages must be carried in a single datagram and may consist of at most 256 characters. Characters are represented as single bytes using ASCII encoding. Only message characters are allowed in the IP datagram, i.e., no additional control information or special characters may be sent. If the user is not joined to a group, the application should issue a friendly message telling the user they are not currently part of a group.
  • When joined to a group, display messages received from other members of the group and from the user (i.e., the application displays messages that it sends, as well as messages it receives). When displayed, messages should be preceded by their remote endpoint information (IP address and port number) or ‘me’ in the case of the user’s messages. For example, if the received message is “Hello!”

the application might display “[127.0.0.1:5698] Hello!” as its output, where 127.0.0.1:5698 is the endpoint information for the message’s source.

  • A special “command” called who must be implemented. When a user enters who, the application must display all the current members of the group (for each member, the host’s IP (not the group’s IP) and the time the member joined the group).
  • At any time, allow a user to exit the application.

The time-to-live (TTL) value for multicast communication should be 1 or configurable with 1 as the default. The application will need to allow multicast loopback to display its own messages. Multiple instances of the application, all using the same IP group address and destination port number, should be able to run on the same host.

4. Implementation and Testing Constraints

The following constraints apply to the implementation and testing of the application.

  • The program must be developed using C# and the .NET Framework.
  • Your application must be designed as a Windows Forms application.
  • The exact user interface is not specified, as long as the required functionality is supported. An example interface is shown at the end of this document.
  • You will have to use some kind of asynchronous design since the application must constantly check for new incoming messages and, at the same time, check for new messages from the user. Be sure to investigate the Forms.Invoke() method for updating the user interface from other threads.
  • For network communication, your code can use classes as used in the posted code examples, including the Socket and UdpClient classes. Please ask permission before using other classes for network communication. You may use any classes or libraries available for text processing, user interface, and other functions not involving network communication. You may use synchronous or asynchronous methods, as well.
  • All code must be clearly written, easily understandable by a knowledgeable reviewer, and neatly formatted. Code should be “self-documenting,” i.e., all information needed to understand the structure and operation of your code and any data structures should be contained with the code itself.
  • Test with at least four instances of the application joined to the same group. You may test your application on a single host by running multiple instances of the application. If possible, test your application on a local network with “client” and “server” executing on different hosts.

5. Grading

Project grades will be based on the following factors as documented in your report and exhibited by your program.

15 points Project report contents, including completeness and quality 75 points Correct operation of the multicast chat application 10 points Implementation of additional features

Note that you can earn at most 90 points out of a maximum of 100 points by implementing the application as a console application. Up to 10 additional points will be awarded for the completion of the features specified below.

6 points The ability to send a unicast message to one of the participants based on the IP address of the participant. This should be done on a one message instance, where the default behavior is sending to the group. After a unicast message is sent, the sending behavior should revert to sending to the group. 4 points Log the chat session to a file. Content should include the address of the sender, the time of arrival, and the message text.

2.1. Windowed TCP Echo Client Example

Note that the windowed TCP echo client has a user interface that is very similar to what is needed for the multicast chat application required for Project 3. Instead of specifying a “Server” and “Port” for the server, the chat application needs to specify an IP multicast group and a destination port. Instead of performing a “Connect” or “Disconnect” operations, the chat application needs to “Join” or “Leave.”

The input window of the TCP echo client can serve as the message input window for the chat application. The output window of the TCP echo client can serve as the message output window for the chat application. “Send” and “Clear” operations can behave the same for both applications.

The File>Exit menu in the TCP echo client provides a way to exit the application.

The TCP echo client application also includes a BackgroundWorker object. The background worker can be used to asynchronously receive multicast messages in a way similar to how the TCP echo client application receives and displays data from the server.

2.2. Multicast Examples

Of course, the TCP echo client example is using TCP instead of UDP and is based on client-server communication instead of peer-to-peer multicast communication. The operation of the chat application as a UDP multicast application can be modeled after the multicast sender and multicast receiver examples. These examples show how to join a multicast group, receive messages from a multicast group, send messages to a multicast group, and leave a multicast group.

It is strongly recommended that your chat application use two different sockets, one for sending and one for receiving. This decouples these two operations and allows the source port numbers to be different for different senders.

2.3 User Interface Examples

Figure 1 shows an example user interface using menu objects for the join, leave, and exit functionality. Text boxes are used for input and a list box is used for output. A combo box is used for the optional functionality of sending a unicast message to a specific user; this allows the user to specify an address directly, or to use one from the list of collected addresses. A button is used to invoke the send operation.

Figure 1: Example UI.