You are on page 1of 11

Network Programming

Assignment #01 Name: Muhammad Shan Anwer Malik Registration No: SP11-BCE-034 Submitted to: Amber Madeeha Zeb Submission Date: 28th Feb 2014

What is network Application? Answer: Network applications use a client-server architecture, where the client and server are two computers connected to the network. The server is programmed to provide some service to the client. The client is typically a desktop, laptop or portable device like an Apple iPhone. The server can be any of these, but is typically a computer in a data center. In most (though not all) network applications, the client computer runs a Web client program like Firefox or Internet Explorer, and the server runs a Web server program like Apache or Internet Information Server. Shared data would be stored on the server or a computer it could access. Note that the user of a network application might be a computer, not a person. For example, a computer might query the server in a vending machine, checking to see if it was low on Doctor Pepper or Coke. Search engine companies like Google run client programs that constantly scan the Web, checking for new pages which can be indexed. Any application which makes use of network to do its functionalities is called network application. The network may be a small network or it may be a network of networks called the internet. Network application do their functionalities according to some protocols. A protocol is the special set of rules that end points in a telecommunication connection use when they communicate. Protocols specify interactions between the communicating entities. Two well known examples of network applications are: Skype: Skype is a software program of IM, it allows users to make telephone calls over the Internet to other Skype users free of charge and to landlines and cell phones for a fee. Additional features include instant messaging, file transfer, short message service, video conferencing and its ability to circumvent firewalls. Skype uses a proprietary Internet telephony (VoIP) network,it use TCP and UDP to communicate. Dropbox: Dropbox is a file hosting service that offers cloud storage, file synchronization, and client software. Dropbox uses SSL (for data transfers) and AES-256 for storage.

What are various protocols for development of network applications? Answer: First let ask ourselves a few questions. What is a protocol? A protocol is the special set of rules that end points in a telecommunication connection use when they communicate. Protocols specify interactions between the communicating entities. There are a lots of protocols for the development of network applications. Many of them are in the development stage like TFRC, TFMCC and some of them already a standard and is used by many network applications like TCP, VOIP, UDP, HTTP, FTP, IPv4, IPv6 etc. The ones which are very important in the world of socket programming are TCP/IP and UDP/IP. The structures of these protocols are used almost everywhere in the world of socket programming and the ones which are becoming popular when it comes to socket programming these days are TFRC and TFMCC. Some of the very important protocols are mentioned below: IP: The Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on the Internet. Each computer (known as a host) on the Internet has at least oneIP address that uniquely identifies it from all other computers on the Internet. When you send or receive data (for example, an e-mail note or a Web page), the message gets divided into little chunks called packets. Each of these packets contains both the sender's Internet address and the receiver's address.

TCP: TCP is a connection oriented protocol which is used to reliably send data making use of the sequence numbers and acknowledgements to send and receive data between two network applications. TCP makes use of IP called the internet protocol to send and receive data. The sessions are established using the socket address which is composed of port number of individual applications and the IP address of the communicating devices. TCP make sure that the data units are transferred reliably while IP is makes sure that actual and desired receiver gets the data. For example, when an HTML file is sent to you from a Web server, the Transmission Control Protocol (TCP) program layer in that server divides the file into one or more packets, numbers the packets, and

then forwards them individually to the IP program layer. Although each packet has the same destination IP address, it may get routed differently through the network. At the other end (the client program in your computer), TCP reassembles the individual packets and waits until they have arrived to forward them to you as a single file. UDP: UDP or User Datagram Protocol is a connectionless non reliable protocol which is used usually used for the most Real Time applications. Like TCP, UDP is also very important in the world of socket programming which shows its importance for the development of network applications. UDP is faster than TCP because it adds less overheads as oppose to TCP which used sequence numbers and acknowledgements which slows down the speed of data transfer. It is mainly used for Real Time applications like online streaming, Voice over internet protocol etc. because in real time application even if you miss a few packets of data it does not make much of a problem. For example in a network application where a live streaming of a video is involved if one of the frame gets missed during the transmission it does not create any sort of a problem or headache for the person watching the live streaming.

TFRC: TCP-Friendly Rate Control (TFRC) is a congestion control mechanism designed for unicast flows operating in an Internet environment and competing with TCP traffic. The goal is to compete fairly with TCP traffic on medium timescales, but to be much less variable than TCP on short timescales. TCP congestion control works by maintaining a window of packets that have not yet been acknowledged. This window is increased by one packet every round trip time if no packets have been lost, and is decreased by half if a packet loss is detected. Thus TCP's window (and hence throughput) is a function of the losses observed in the network and the round trip time experienced by the flow. The idea behind TFRC is to measure the loss probability and round trip time and to use these as the parameters to a model of TCP throughput. The expected throughput from this model is then used to directly drive the transmit rate of a TFRC flow.

TFMCC: TFMCC is an equation-based multicast congestion control mechanism that extends the TCP-friendly TFRC protocol from the unicast to the multicast domain. The key challenges in the design of TFMCC lie

in scalable round-trip time measurements, appropriate feedback suppression, and in ensuring that feedback delays in the control loop do not adversely affect fairness towards competing flows

FTP: FTP or file transfer protocol is a commonly used protocol for exchanging files over any network that supports the TCP/IP protocol such as the Internet or an intranet. There are two computers involved in an FTP transfer: a server and a client. The FTP server, running FTP server software, listens on the network for connection requests from other computers. The client computer, running FTP client software, initiates a connection to the server. Once connected, the client can do a number of file manipulation operations such as uploading files to the server, download files from the server, rename or delete files on the server and so on. Any software company or individual programmer is able to create FTP server or client software because the protocol is an open standard. Virtually every computer platform supports the FTP protocol. This allows any computer connected to a TCP/IP based network to manipulate files on another computer on that network regardless of which operating systems are involved if the computers permit FTP access. SSL: Another protocol used by network applications typically a Web Browser is SLL. The Secure Socket Layer (SSL) and Transport Layer Security (TLS) is the most widely deployed security protocol used today. It is essentially a protocol that provides a secure channel between two machines operating over the Internet or an internal network. In todays Internet focused world, the SSL protocol is typically used when a web browser needs to securely connect to a web server over the inherently insecure Internet.

HTTP: Short for HyperText Transfer Protocol, HTTP is a set of standards that allow users of the World Wide Web to exchange information found on web pages. When wanting to access any web page enter http:// in front of the web address, which tells the browser to communicate over HTTP. For example, the full URL for Computer Hope is http://www.google.com. Today's modern browsers no longer require HTTP in front of the URL since it is the default method of communication. However, it is still used in browsers because of the need to access other protocols such as FTP through the browser.

SMTP: Mail delivery from a client application to the server, and from an originating server to the destination server, is handled by the Simple Mail Transfer Protocol (SMTP). The primary purpose of SMTP is to transfer email between mail servers. However, it is critical for email clients as well. To send email, the client sends the message to an outgoing mail server, which in turn contacts the destination mail server for delivery. For this reason, it is necessary to specify an SMTP server when configuring an email client. One important point to make about the SMTP protocol is that it does not require authentication. This allows anyone on the Internet to send email to anyone else or even to large groups of people. It is this characteristic of SMTP that makes junk email or spam possible. Modern SMTP servers attempt to minimize this behavior by allowing only known hosts access to the SMTP server. Those servers that do not impose such restrictions are called open relay servers. Telnet: Telnet is a user command and an underlying TCP/IP protocol for accessing remote computers. Through Telnet, an administrator or another user can access someone else's computer remotely. On the Web, HTTP and FTP protocols allow you to request specific files from remote computers, but not to actually be logged on as a user of that computer. With Telnet, you log on as a regular user with whatever privileges you may have been granted to the specific application and data on that computer.

How the importance of network applications increase with the present trends in technologies? Life has been made simple and world has been made a pleasurable place by the advent of the networks and computers. We could not imagine a day without Internet. We are presently living in a world where technology changes many folds within a few days or we can easily say that trends in technologies gets changed in the blink of an eye. Internet Banking has changed the banking industry itself and it is no longer confined to the branches were one has to approach the bank in person, to withdraw cash or deposit a cheque or request a statement of accounts. It allows customers to conduct financial transactions on a secure way. Electronic Bill Payment and Fund transfer between Customers is made easier. Introduction of intelligent and high tech gadgets including mobile phones computers are putting their effect on the market of network applications. The mobility introduced in devices and the trends of cheap technology for everyone has poured technology in the pocket of every individual. In these circumstances it is difficult to find a person who does not have an idea of the importance of network applications. E-education is also known as e-learning and online education has created a revolution in education. In this competing world the students have to learn a lot. Everything cannot be taught by a teacher or in school. To face big challenges in life students take up extra learning which can be done thorough computers. Communication plays a pivotal role in our life. Communicating with the people overseas was a Herculean task before the arrival of computers. Today just by a click we can communicate directly with the people in any part of the globe. Computer today have become very user friendly even a 3 year old kid can operate it. Without network applications the communication between individuals is impossible, the communication using network applications plays the backbone role in most of the businesses around the world. The network applications have become the part of our lives and can be considered as basic needs of humans these days. Take the example of apps like whatsapp, viber, skype, facebook app, gmail, google drive, dropbox, filezilla and the list goes on and on. A few apps just mentioned can simply explain the importance of network applications alone. The introduction of high speed internet has

introduced new trends of streaming videos, songs etc. Downloading files have become quicker than going to the market and buying a DVD. Technologies become old within days by the introduction of new technologies. In recent past we used to buy floppy disks to get a small amount of space which was in KBs and now we have hard drives which are in sizes of tera, peta and sometimes exa bytes which are 1/3rd of the sizes of the floppy disks. In the recent past we used to connect to the internet using dialup connections which were like 54Kbps and now we can have download speeds in Giga bytes. Situations like this have made world a big market for the developers of network applications. There is no other field these days which has more business and job opportunities than network applications development. Often you will hear techno and even fresh graduates and students talking about the trends of becoming applications developer or web designer or networking expert. The trends have changed so quickly that the world is stunned. Internet through the use of different technologies is the pioneer in the latest changes in the trends of technologies. Becoming a network application developer seems to be the best option and can be putted on the top of the list. Network applications plays such a vital role that our banks, educational institutes, individuals and even defense are making use of them for their benefits and progress.

Explain the working of at least three different network applications. EMAIL: Working: Email is delivered using a client/server architecture. An email message is created using a mail client program. This program then sends the message to a server. The server then forwards the message to the recipient's email server, where the message is then supplied to the recipient's email client. To enable this process, a variety of standard network protocols allow different machines, often running different operating systems and using different email programs, to send and receive email. Mail delivery from a client application to the server, and from an originating server to the destination server, is handled by the Simple Mail Transfer Protocol (SMTP). The primary purpose of SMTP is to transfer email between mail servers. However, it is critical for email clients as well. To send email, the client sends the message to an outgoing mail server, which in turn contacts the destination mail server for delivery. For this reason, it is necessary to specify an SMTP server when configuring an email client. One important point to make about the SMTP protocol is that it does not require authentication. This allows anyone on the Internet to send email to anyone else or even to large groups of people. It is this characteristic of SMTP that makes junk email or spam possible. Modern SMTP servers attempt to minimize this behavior by allowing only known hosts access to the SMTP server. Those servers that do not impose such restrictions are called open relay servers. There are two primary protocols used by email client applications to retrieve email from mail servers: the Post Office Protocol (POP) and the Internet Message Access Protocol (IMAP).

SKYPE: Skype, like many other VoIP (Voice over Internet Protocol) clients available, has changed the way we think about communication and keeping in touch with loved ones over great distances. Working: Skype used Voice over internet protocol which uses internet for its application. VOIP makes use of the SIP to make its messages in the form of packets. VOIP use of the same network which we use for email and web surfing to send the packets. VIOP utilizes the resources so efficiently to send text, voice, images and even likes videos in high quality. Computers or special hardware devices like Skype phones are used to send and receive message packets which are send over the internet making use of the IP. The voice signal which is analog gets samples, quantized and encoded into digital. The digital signal is then passed onto the compressor which compresses the signal so that it could be sent even using a slower connection. The digital signal is then derivated into small message parts so that they could be fixed in packets. Then the destination and source headers are putted onto the packets so that they could be sent over the internet. The receiving end must reconstruct the packets sequentially for ideal reproduction, which does not happen on most public networks, which are prone to congestions during peak hours. Latency and packet loss can render the receiving end to be unable to reconstruct the complete audio stream resulting in blank audio space for short periods.

Transfer of files: Transferring files by making the use of internet is another very important application of networks. In recent past we would only use networks to transfer files within a local network. But due to the evolution or introduction of high speed internet and file transfer protocols it is possible for us to send huge files over the internet Working: FTP or file transfer protocol is a commonly used protocol for exchanging files over any network that supports the TCP/IP protocol such as the Internet or an intranet. There are two computers involved in an FTP transfer: a server and a client. The FTP server, running FTP server software, listens on the network for connection requests from

other computers. The client computer, running FTP client software, initiates a connection to the server. Once connected, the client can do a number of file manipulation operations such as uploading files to the server, download files from the server, rename or delete files on the server and so on. Any software company or individual programmer is able to create FTP server or client software because the protocol is an open standard. Virtually every computer platform supports the FTP protocol. This allows any computer connected to a TCP/IP based network to manipulate files on another computer on that network regardless of which operating systems are involved if the computers permit FTP access.

You might also like