In our context, due to fast searching requirement, we are using remote service to hold a huge database in memory.
The reason we are using remote service, instead of local service is that, we believe running the service in separate process, will make us harder to hit maximum memory per process limitation (The limitation is vary based on different devices and OS version).
In our initial design, we are using AIDL
. Later, we switch to Messenger
. I cannot recall the reason behind. I will check back our source code history log to figure out why. But, I think it is mostly, Messenger
is less complicated than AIDL
, and we do not need the multi-thread capability provided by AIDL
.