Question

I am reading the oracle JDBC tutorial here - http://docs.oracle.com/javase/tutorial/jdbc/overview/index.html

Please refer to Figure 2: Three-tier Architecture for Data Access.

It says that -

In the three-tier model, commands are sent to a "middle tier" of services, which then sends the commands to the data source. The data source processes the commands and sends the results back to the middle tier, which then sends them to the user. MIS directors find the three-tier model very attractive because the middle tier makes it possible to maintain control over access and the kinds of updates that can be made to corporate data. Another advantage is that it simplifies the deployment of applications. Finally, in many cases, the three-tier architecture can provide performance advantages.

I don't understand the bold parts. What is the logic behind those points ?

- middle tier makes it possible to maintain control over access and the kinds of updates that can be made to corporate data. --In what ways ?

- simplifies the deployment of applications -- How does that simplify deployment ?

- three-tier architecture can provide performance advantages. -- You just added a layer between two tiered arch. Now, instead of direct communication between code and DB there is a middle layer. So, should'nt that reduce your performance/speed ?

Was it helpful?

Solution

  • middle tier makes it possible to maintain control over access and the kinds of updates that can be made to corporate data. --In what ways ?

Consider these roles:

Workers can add low level data but can't add other workers.

Managers can add/update low level data but can't see the high level stats.

Executives can't update low level data, can't add workers but can see the high level stats.

The same can be in the world of components: loggers are write-only, some components can't access data of the other components, etc.

  • simplifies the deployment of applications -- How does that simplify deployment ?

Each layer provides an interface to its clients. If you change the internal implementation of the layer not touching its interface, the update can be completed seamlessly for the clients.

  • three-tier architecture can provide performance advantages. -- You just added a layer between two tiered arch. Now, instead of direct communication between code and DB there is a middle layer. So, should'nt that reduce your performance/speed ?

There are two ways to improve performance: vertical and horizontal scalability (google it). Here we talk about the horizontal one, it's hardly possible with two layered architecture.

OTHER TIPS

Consider few examples of "Middle Tier" in Java, Web Servers like Tomcat, Enterprise Servers like JBoss, BEA Weblogic, IBM Websphere. There could be many other examples as well which falls under middle tier category.

Most of the enterprise servers provide full management functionality for database. Which handles in broad-way following requirements:

  1. Configuration (Connection pool, XA, JDBC specific properties, ReadOnly/WriteEnabled, etc)
  2. Deployments
  3. Maintenance tasks (backup etc)
  4. Monitoring (Database performance stats, its machine performance stats, size stats etc)

As a specific example in Tomcat or a standalone Java application where you configure connection-pool will help in performance gain.

Deployment wise specific example could be, it would provide ways to configure new database, schema etc.

I think it would help you if you say pick one Middle Tier say Tomcat and configure/use it for typical standard database interactions using connection-pools etc. Then you would be able to comprehend comparisons between two-tier vs three-tier arch.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top