Home arrow Delphi-Kylix arrow Page 2 - Client/Server Applications Made Easy
DELPHI-KYLIX

Client/Server Applications Made Easy


In this five-part series of articles we are going to discuss client/server applications and the different protocols involved with them. We are also going to look extensively at parts of the TCP/IP protocol which are critical to these kinds of applications. Then we are going to discuss how and what tools to use when translating these protocols into code.

Author Info:
By: Leidago
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
December 04, 2006
TABLE OF CONTENTS:
  1. · Client/Server Applications Made Easy
  2. · Client and Server Applications
  3. · Logical Addressing and Name Resolution
  4. · Error and Flow Control

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Client/Server Applications Made Easy - Client and Server Applications
(Page 2 of 4 )

The Client Application

So how does a client work? As I have stated before, the client basically makes requests to a server and then waits for a response, which it then interprets and displays. Now, how does the client know where the server is located? Well, for a client to connect to a server, it needs two things, the IP address and the port number.

The IP address tells the client where the server is located. A server can be located on the same machine, on a local network, or on the Internet. In other words, it could be located anywhere on the planet. Wherever the server is running, it will have an IP address and that is the only way a client can ID and connect to a server. As for the port number, that is where the server "listens" for connections. A port number is what the server uses to send and receive messages. 

The Server Application

The server processes request made by a client and responds to the client. That is the core function of any server. Servers are generally passive as they wait for a client request.

Unlike clients, servers must run continually because a client can send a request at any time. Clients, on the other hand, don't have to run continually. They only need to be running when they require a service. 

Many server applications allow for multiple clients to request a service. For example, while you are reading this page, others interested in this article could also request and read the same web page.

TCP/IP

The client-server architecture is heavily dependent on TCP/IP. TCP/IP stands for Transmission Control Protocol / Internet Protocol. It is a set of protocols that enables communication across networks and the Internet. Basically, TCP/IP is a family of protocols that includes FTP, email (SMTP/POP3 etc), TELNET, and so forth. It sets the rules for how one computer communicates with another on a network and more importantly, defines how a unit of data should look and what information it should contain so that a receiving computer can interpret the message correctly.

I've been using the terms "data" and "packet" interchangeably. Basically the term "packet" is TCP/IP speak for data.  TCP/IP and its related protocols form a complete system that defines how data should be processed, transmitted, and received on a TCP/IP network.

TCP/IP is a connection-oriented protocol that transfers data from one socket to another as an unstructured stream of bytes. A socket is created when you have a port number and IP address. You need to have two or more computers in a TCP/IP network for TCP/IP to work. You will also need software that is capable of interpreting and responding to data. For the purposes of this article we need to cover the following:

  • How a computer is identified on a network (or on the Internet).
  • How we can be sure that requests made by our client applications are going to be received by the server.
  • How our application is supported by the Internet or network.

TCP/IP addresses these issues through:

  • Logical Addressing
  • Routing
  • Name Resolution
  • Error Control and Flow Control
  • Application Support

Although all of the above are relevant to client/server architecture, we are only going to explore Logical Addressing, Name Resolution, Error and Flow Control and Application Support as they are more relevant to the aim of the article.


blog comments powered by Disqus
DELPHI-KYLIX ARTICLES

- Loading an XML Document into the DOM
- Delphi Wrapper Classes and XML
- Delphi and the DOM
- Delphi and XML
- Internet Access: Client Service
- Finishing the Client for an Internet Access ...
- The Client for an Internet Access Control Ap...
- User Management for an Internet Access Contr...
- Important Procedures for an Internet Access ...
- Server Code for an Internet Access Control A...
- Constructing the Interface for an Internet A...
- Building a Server Application for an Interne...
- Building an Internet Access Control Applicat...
- Client Dataset: Working with Data Packets an...
- Using the Client Dataset in an N-Tiered Appl...

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials