The performance can be optimized in different tier or layer.
in web layer, you can set up load balance to distribute requests to clusters but this is normally supported by application server. it is a general solution to parallel your application and optimize your performance.
in business layer, you know what you gonne do and you can design a specific parallel solution for your application. The principle is as follow:
1. find out all the unit task you need to implement your business logic
2. check the sequence of these unit tasks. if they depend on each other, then you dont have luck.
if some tasks are independent from each other, then you can parallel them in different CPUs or different machines.
but Be careful of one point: the limit of your parallel solution is the communication among all these servers.
So finally if you finish all your unit tasks in different machines , they have to gather to one machine and continue their sequential tasks and it may lead to a situation that some results
have to wait for the other slow calculations.
in short, when you use parallel programming, you have to be clear that performance cannot be optimized endless. sometimes 1+1>2 which means u have more cpus but the performance is reduced.
3. in persistent layer, the best way is to let DB handle everything and optimize your SQL to fit for that DB SQL parser.
Because lots of DB interpret SQL ability are different. please check the reference and benchmark them.
at least in Oracle, better to call a stored procedure in your java code and let the real sql stay inside the stored procedure.
So that is the fastest way.
In my personal opinion, dont use hibernate.
Use DAO. with DAO, you can control the SQL in maxim performance while, in the other hand, you do the orm yourself. So you dont lose the OO design. you still can have a DAOManager to concentrate all the persistent layer tasks in one Class. and the layer is still clearly separated.