From time to time I see old-school software architectures at customers where all the layers of the applications (the most common ones are ui, business logic, persistence) are placed in separate tiers (different machines). There are a lot of problems with this approach:
- increased latency because of all the marshalling, marshalling and network communication.
- increased development time because of all the marshalling/unmarshalling code (so DTO’s, remote and local interfaces etc).
- increased hardware costs: often you see as much front end machines, as backend machines (that don’t do much essential stuff, but spend a lot of time waiting and marshalling/unmarshalling). So instead of 2×2 machines for example, you have more uptime with 3×1 machines and lower hardware costs.
- increased license costs since you need to run extra servers
- increased maintenance costs since you need to maintain more machines
- increased infrastructure costs since there are more machines to connect
- increased troubleshooting costs: in these environments it is much harder to figure out what is going wrong because there is so much communication going on.
So instead of hosting the layers on different machines, it often imho is better to host those layers on the same hardware or even on the same JVM. It doesn’t mean this is the only approach, but I have seen too many applications where this useless separation of tiers has lead to a lot of extra cost. So it certainly is something worth considering if you need to cut costs in these financial difficult times.