User Datagram Protocol or UDP for short is very simple connectionless
protocol that can be used to transfer datagram packets in both the direction.
Client can send the datagram packets to server and it can also receive the reply
from server. UDP does not provide the reliability nor ordering guarantees that TCP does.
What is UDP?
The User Datagram Protocol (UDP) is a transport protocol that supports
Network Application. It layered on just below the ?Session? and sits
above the IP(Internet Protocol) in open system interconnection model (OSI).
UDP Client in Java In this section, you will know how to send any request or
messages for UDP server by the UDP client. For this process you must require the
destination IP address and destination port number. If you know both, then you
send messages to UDP server.
You can also develop the UPD server in Java that can process the data
received on a particular port. This type of application is very useful in
getting the data using UDP protocol. With the help of these tutorials you should
be able to develop your own application in Java.
UDP Server in Java Providing you information relating to all
technicalities of UDP server. This section provides you the brief description
and program of the UDP server only for received your messages or information.
Multicast in Java This section introduces you how to deliver or transmit data in network
and describes the fundamental of various technique like: unicast, broadcast
Multicast Server in Java
This section introduces how to receive and send the IP packet by the
multicast server and provides the functionality of multicast server through
Multicast Client in Java
This section describes how to send and receive the IP packet or message by
multicast client. Here, you provide many multicast clients and it's functionality
for sending or receiving messages at a time.
May 24, 2011
Project: Multicast under UDP: Reliability
Project: Multicast under UDP: Reliability 12/11/10
UDP is used to support mulicast. Recall that UDP is connectionless and non reliable. Hence, there is no guarantee that a multicast message will be received by all a group hosts. The aim of this project is to implement a solution that provides reliability for multicast applications under UDP. For more information, check the following site which provides different solutions to multicast reliability:
In this project, you will write two classes RMulticastServer (called server in the following) and RMulticastClient (called client in the following) in Java that implement a simple solution to provide reliability in multicast. You have to allow up to 10 RMulticastClient to have the possibility of parallel subscribing to the multicast group address that your RMulticastServer will serve. This server has to keep tracks of all the clients that have subscribed. For each message multicasted by the server, the latter should receive an acknowledgment sent by the clients that have subscribed.
If not all the acknowledgments (from all clients) have been received by the server during a timeout period, the server will send the message in unicast to all the clients that have subscribed but which fail to send an acknowldgement. The server will not serve the next multicast message until all acknowledgment are received
In particular, the server has to provide the following:
1. The server and clients have to allow the user to indicate the multicast group address and the port number. In addition, the clients have to make it possible to a user to indicate which server he will use for subscription
2. The server has to ask the user to provide the number of messages that the server will multicast. In addition, the server will continue to listen the requests from clients (join and leave requests) until all messages from the user are entered.
3. You have to simulate message loss: this achieved by letting the server and clients accept only ninety percent (90%) of the messages that have been received:
a. The server and clients discard 10% of the messages
b. The acknowledgment of the clients will be sent only for the messages that haves been accepted (ie those messages that have been not discarded).
c. The server will discard 10% of acknowledgements
4. The server will use a timeout of five seconds, that is, if an acknowledgement from some clients does not come before the expiration of this timeout, the server will retransmit, in unicast, the message that have not been acknowledged before the timer expiration to all the concerned clients (ie the clients that have not succeed to sent an acknowledgement or if the acknowledgement has been discarded as mentioned in step 3 above).
5. The content of the sent message has to be displayed by the server:
a. A message has been sent as multicast or as a re-transmission and in this latter case you have to provide the destination of the message
6. After a message has been accepted by a client, the content of the message has to be displayed. In addition the client has to specify if the message is multicast or unicast (re-transmission).