My question is; if I use hibernate with a second-level cache and ibatis3 with a cache implementation for its interface, which will be a faster candidate for the data access layer?
Cheers,
A good approach seems to be:
>The code is fast enough and efficient enough that you need to use many queries throughout the application. Complete this stage before, Because the code you write is fast, you won’t use tricky techniques to improve performance.> Find 1% queries that are not fast enough, frequently called, etc., so they account for the most total time (only consider the time real users are waiting). > Spend enough time to optimize this (you have this time because you gained time in phase 1). You can use things so fast, you don’t think about them globally (memory cache, native SQL, database programs… …).>Back to 2, until you run out of time, or your users are satisfied.
We can use infinispan or ehcache/terracotta to easily use the second level Caching accelerates hibernate applications, but ibatis only has a simple interface to implement caching. And hibernate knows more information about the data, so it also helps to better cache. On the other hand, the simplicity of ibatis is also its powerful function , If we don’t use caching for both, it is faster than hibernation.
My question is; if I use hibernate with secondary cache and ibatis3 with cache implementation for Its interface, which will be a candidate for a faster data access layer?
Cheers,
Fastness is not a general quality, performance must be considered in the context.
A good approach seems to be:
>The code is fast enough and efficient enough that you need to use many queries throughout the application. Complete this stage before, because the code you write is fast, you won’t use Tricky techniques to improve performance.> Find 1% queries that are not fast enough, called frequently, etc., so they account for the most total time (only consider the time real users are waiting).> Spend enough time to optimize this (you have this Time, because you get time in phase 1). You can use things so fast, you don’t think about them globally (memory cache, native SQL, database programs…).> Go back to 2, until you have no time Use it up, or your users are satisfied.