6
oject Title: stablishing communication between e server and Envirobat using TCP/IP Presented by Apourva.P

Project Title: Establishing communication between the server and Envirobat using TCP/IP

Embed Size (px)

DESCRIPTION

Project Title: Establishing communication between the server and Envirobat using TCP/IP. Presented by Apourva.P. Currently, User Datagram Protocol (UDP) is used being used as the transport layer protocol to facilitate communication between the device and the server. - PowerPoint PPT Presentation

Citation preview

Page 1: Project Title:  Establishing communication between  the server and Envirobat using TCP/IP

Project Title:

Establishing communication between the server and Envirobat using TCP/IP

Presented byApourva.P

Page 2: Project Title:  Establishing communication between  the server and Envirobat using TCP/IP

Currently, User Datagram Protocol (UDP) is used being used as the transport layer protocol to facilitate communication between the device and the server.

The client side is programmed using Embedded C and the server side is programmed using Java network programming.

My objective is to implement TCP/IP for communication between the device and the server.

The following table shows some of the major differences between TCP and UDP and which protocol is preferred for a specific application :

Page 3: Project Title:  Establishing communication between  the server and Envirobat using TCP/IP

Data is sent as a byte stream.Does not preserve message boundaries

Data is forwarded as datagrams.Preserves message boundary

Used in applications that require reliable transmission.

Used where prompt delivery is more important than accurate delivery

Transmission Control Protocol (TCP)

User Datagram Protocol (UDP)

Connection oriented Connectionless

Reliable Unreliable

Provides ordering of packets Does not provide ordering of packets

Heavy weight and lower speed when compared with UDP.

Lighter and faster.

Preferred for two way communication

Preferred for one way communication

Page 4: Project Title:  Establishing communication between  the server and Envirobat using TCP/IP

One of the important factors to be considered during the implementation for TCP is the identification of message boundaries.

UDP preserves message boundaries whereas TCP doesn’t.

Eg : Send 3 packets -‘good’ ‘morning’ ‘everyone’ using UDP.Each of these is sent as a separate datagram. Each receive function call at the receiver will obtain each of these datagrams from the buffer.

TCP however is a stream oriented protocol. It does not preserve message boundaries. The send and receive calls will send and obtain all the data in the buffer which may be more than one message or even a fraction of the message.

Hence, we have to explicitly code the identification of message boundaries.

Page 5: Project Title:  Establishing communication between  the server and Envirobat using TCP/IP

This is usually implemented in 3 ways:

•Send fixed sized packets.

•Use a delimiter to distinguish the message boundary.

•Prefix each message with the length of the message.

Page 6: Project Title:  Establishing communication between  the server and Envirobat using TCP/IP

Thank you.