Exercise 2.9
Consider a hypothetical car hire company and sketch
out a three-tier solution to the provision of their underlying distributed car
hire service. Use this to illustrate the benefits and drawbacks of a three-tier
solution considering issues such as performance, scalability, dealing with
failure and also maintaining the software over time.
Answer :
A three-tier solution might consist
of:
- a web-based front-end offering a user interface for the car hire service (the presentation logic);
- a middle tier supporting the core operations associated with the car hire business including locating a particular make and model, checking availability and pricing, getting a quote and purchasing a particular car (the application logic);
- a database which stores all the persistent data associated with the stock (the data logic).
In terms of performance, this
approach introduces extra latency in that requests must go from the web-based
interface to the middle tier and then to the database (and back). However,
processing load is also spread over three machines (especially over the middle
tier and the database) and this may help with performance. For this latter
reason, the three-tier solution may scale better. This may be enhanced though
by other, complementary placement strategies including replication.In terms of
failure, there is an extra element involved and this increases the probability
of a failure occurring in the system. Equally, failures are more difficult to
deal with, for example if the middle tier is available and the database
fails.The three-tier approach is much better for evolution because of the
intrinsic separation of concerns. For example, the middle tier only contains
application logic and this should therefore be easier to update and maintain.
No comments:
Post a Comment