Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
Member Area
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Become a Member
-Why sign up!
-Chat Online!
-Indexes NEW!!
-Build your resume
-Find a job
-Post a job
-Resume Search
-Link to us
Visit Embarcadero
Embarcadero Community
Why and which ports to use for multitier applications Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Delphi All Versions
User Rating
# Votes
Vicens Meier, Guillem
Reference URL:
			Let's suppose you want to implement a multitier application. It could be just a
client-server one, or a client-AppServer-DBServer one, or even a 4-tier application.

If you want these applications to communicate through a LAN or whatever type of 
network (using TCP/IP or UDP) you will need to use ports. A port is basically an
indication for "through where" should your application be listening and/or 
sending the information from/to the other application. Another way to see them is 
as "the names of the end of the logical connections which carry long term 

For example, SMTP uses port 25 and POP3 uses port 110. If someone would try to
communicate with you sending you an e-mail not using port 110, you would never
receive that e-mail, because your e-mail program would not "see" the communication, 
as POP3(most used today) protocol only listens to port 110.

Another point to take care of are collissions. Let's say your application uses 
port 100 to listen for its communications. If there is any other application 
running on the same machine and listening to the same port it could happen that 
the other application gets the info which was for yours. Or your application 
would probably get info that was destined to the other. In both cases the 
applications will surely not know what to do with that information, and it will 
get lost.

So now that we know why we need to use ports and know if there is no other 
application using them, which port could you use?

Well, that is something really easy to know. You only have to connect to the IANA 
(Internet Assigned Number Authority) and have a look at the last updated Port 
Numbers list. Direct link is:


There you get not only a list of all the 65535 ports available, but also an 
explanation about the 3 categories of ports that exist : Well Known, Registered 
and Dinamic and/or Private. Basically, Well Known Ports are assigned by IANA and
usually used for privileged or root/system processes; Registered Ports are listed 
by IANA and used for ordinary processes; and Dinamic and/or Private Ports are 
neither registred nor listed (you can use them but you can not know if they are 
used by others).

Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10


Share this page
Download from Google

Copyright © Mendozi Enterprises LLC