This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes [SCEA 5] Multitier architecture vs Three-tier architecture Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "[SCEA 5] Multitier architecture vs Three-tier architecture" Watch "[SCEA 5] Multitier architecture vs Three-tier architecture" New topic
Author

[SCEA 5] Multitier architecture vs Three-tier architecture

Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3210
    
    5
Hi !

What is the main difference ?



Multitier architecture

In software engineering, multi-tier architecture (often referred to as n-tier architecture) is a client-server architecture, originally designed by Jonathon Bolster of Hematites Corp, in which an application is executed by more than one distinct software agent. For example, an application that uses middleware to service data requests between a user and a database employs multi-tier architecture. The most widespread use of "multi-tier architecture" refers to three-tier architecture.



http://en.wikipedia.org/wiki/Multitier_architecture says that it's the same.

Thanks,
MZ


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11437
    
  87

Originally posted by Mikalai Zaikin:
http://en.wikipedia.org/wiki/Multitier_architecture says that it's the same.

Where do you see that?

I see the very first sentence stating "In software engineering, multi-tier architecture (often referred to as n-tier architecture)", and the very first paragraph ending with "The most widespread use of "multi-tier architecture" refers to three-tier architecture."

Neither of which is stating that multi-tier is 3-tier. What they are stating is that 3-tier is one example of n-tier, and the remainder of the article uses 3-tier as the example for multi tier.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3210
    
    5
Ok. However, the question was:


Multitier architecture vs Three-tier architecture

What is the main difference ?


Any other comments ?

regards,
MZ
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11437
    
  87

The only difference is that multi tier does not specify how many tiers there are - there could be 2 tiers, 3 tiers, 4 tiers ... n tiers. Whereas 3 tiers will have 3 tiers.

3 tiers is one example of multi tier architecture. It is an instanceof multi tier or n-tier where the n is explicitly set to 3.

Regards, Andrew
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
How many tiers do you see in the example below from the Java EE 5 Tutorial:



I see 4. But we could also combine the Client Tier with the Web Tier into one Presentation Tier and it would be 3 . So it depends on how you define 3 tier or 4 tier.

On the other hand, how would a 5 tier or 6 tier, no hold on ... better a 10 tier application look like . Maybe this multitier definition is pure nonsense .


SCJP, SCJD, SCWCD, SCBCD
arvin ramon
Ranch Hand

Joined: Oct 04, 2007
Posts: 31
Multi tier is a fairly loosely defined term.

I did see 4 tiers too when I first saw the picture in J2EE Tutorial.
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
At least one who agrees
J Vallejo
Ranch Hand

Joined: Jan 29, 2007
Posts: 31
Originally posted by Darya Akbari:


I see 4. But we could also combine the Client Tier with the Web Tier into one Presentation Tier and it would be 3 . So it depends on how you define 3 tier or 4 tier.


Does this mean the exact number of tiers in a particular architecture can depend on one's perspective? In some cases maybe, but I don't think you can see the Client Tier and the Web Tier as one (seeing it as one presentation tier), I believe these two would always be considered as two separate tiers. Same thing goes with a web server and an application server, you can put both in one machine yet still they count as two separate tiers.

This is just my opinion folks... I welcome any corrections...


J Vallejo<br />SCDJWS 5, SCJP 1.5, SCBCD 1.3
Juan Pablo Crossley
Ranch Hand

Joined: Oct 16, 2007
Posts: 128
mmm... I not totally agree with you :roll: , I really think three tier and n-tiers are a different approach, as far as I see, the tiers could run on separate machines, or run in 1 machine as well. if you have a three tier web application, you could be probably talking about the following tiers:

Client ---> Browser where will run static content, or dynamic content like DHTML or applets
Business tier --> Web tier, in this case the servlets and helper classes will do this part
DB --> the database

In this architecture the main problem is that you could have a manageability problem, because you cannot change (configure, distribute, etc.) easily a part to ensure the health of the system, without affecting the other parts.

In the n-tier architecture you will have a better separation of business tier, and this will lead to a better manageability, but not necessary a better performance... at least if you only have 1 server and few user load, but it will lead to a better performance if the number of users increase.

An example of a n-tier architecture could be:

Client ---> Browser where will run static content, or dynamic content like DHTML or applets
Business tier 1 --> Web tier, in this case the servlets and helper classes will do this part (as controllers, filters and dispatchers)
Business tier 2 --> EJBs, CORBA components, and so on, that could manage at finer granuality the business things.
...
DB --> the database

If I'm wrong please let me know that, because that's what I think about 3-tier and n-tier architecture.

PD: Sorry about my english, I know it's not the best one


SCJP, SCBCD, SCEA 5, MCP

How to pass SCEA 5 | 2, 3, N-tier which one should I pick? | Analysis of persistence layer from SCEA 5 perspective | Swing... why not?
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Originally posted by Juan Pablo Crossley:
mmm... I not totally agree with you :roll: , ...
Client ---> Browser where will run static content, or dynamic content like DHTML or applets
Business tier 1 --> Web tier, in this case the servlets and helper classes will do this part (as controllers, filters and dispatchers)
Business tier 2 --> EJBs, CORBA components, and so on, that could manage at finer granuality the business things.
...


Your Business tier 1 is a Web tier . That would be the same tiers as the Sun tier image above.

However, I think you mean n-tier is manifested in Business tier 1 ... Business tier n, right? This could be also a explanation . But do you have a reference for it?

I still believe that the multitier definition is nonsense, until someone comes up here and shows us the correct definition of it .
[ October 16, 2007: Message edited by: Darya Akbari ]
Juan Pablo Crossley
Ranch Hand

Joined: Oct 16, 2007
Posts: 128
Originally posted by Darya Akbari:
. But do you have a reference for it?


I search in google and found a good explanation (http://www.javaworld.com/javaworld/jw-01-2000/jw-01-ssj-tiers.html), and I think they support my theory, the tiers are separated logically and, could be break in different computers, so... if you can run it separately this will be a n-tier application... that's from my point of view.

If you have an application with 3 JSPs, 1 session bean, and endless helper classes with some stored procedures is that a n-tier application, because the separation of responsabilities between the classes? I think no, because you can not distribute it over various servers.

But, you're right, here there's not a right answer, because everything depends on the vendor, .NET could say that they are n-tier even if they use only aspx, and several C# classes.
[ October 17, 2007: Message edited by: Juan Pablo Crossley ]
Juan Pablo Crossley
Ranch Hand

Joined: Oct 16, 2007
Posts: 128
This comes from the JEE tutorial you mentioned in your post:
"Although a Java EE application can consist of the three or four tiers shown in Figure 1-1, Java EE multitiered applications are generally considered to be three-tiered applications because they are distributed over three locations: client machines, the Java EE server machine, and the database or legacy machines at the back end. Three-tiered applications that run in this way extend the standard two-tiered client and server model by placing a multithreaded application server between the client application and back-end storage.


Figure 1-1 Multitiered Applications
Diagram of multitiered application structure, including client tier, web tier, business tier, and EIS tier.
Security
"

you can see the full text in the java ee tutorial page http://java.sun.com/javaee/5/docs/tutorial/doc/bnaay.html
and they pointed "three-tiered applications because they are distributed over three locations: client machines, the Java EE server machine, and the database or legacy machines at the back end.", so if you have EJBs remote, that could be distributed over other servers, such as authorization ejbs in a unix machine used to validate credit card information, you will have 4 machines in the system... so it's a 4-tier application
Darshan Shroff
Greenhorn

Joined: Nov 25, 2009
Posts: 12

A very interesting read

http://pranshujain.wordpress.com/2006/09/15/layers-and-tiers/

Hemantha Jayasundara
Greenhorn

Joined: Oct 21, 2013
Posts: 1
That is good ....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [SCEA 5] Multitier architecture vs Three-tier architecture