mardi 15 novembre 2016

Using AIDL to share and store data between applications

I know this is not a straightforward solution question, but I do need expert opinions regarding this since I could not find the solution anywhere on the net.

We have a platform that exposes services via REST and we build applications on top of this platform (both HTML and Android). Now we help build android applications for different customers and the app base is growing with time.

What I have found is that for most of these apps, the tables used to store local data are the same and in many cases one android app is dependent on the other android app on the same device for data and in many cases the apps will be offline. For ex: App1 and App2 are installed, App1 gathers data which maybe required for App2 before the data is synced to the servers. So I have an idea of making this data common between apps regardless of which app is installed on the device.

The concept is to have a common service running in the background which provides an interface to other client apps either via content providers or AIDL. All the data of the apps installed on the device will be managed by this common service. Of course there will be differentiating factors like app id, context id, user id etc., to maintain the integrity of the individual app data.

Reasoning behind the architecture is, 1) Reduces redundancy of the tables involved. 2) Any app can query the data of any other app using the app id. 3) Sync can be offloaded to this common service and dependency on data can be easily managed. 4) updates to data management layer in the apps can be easily managed by updating a single application. 5) Improves the productivity of an app developer since he/she does not have to worry about managing data offline or syncing it to our servers.

Disadvantages that I could come up with are 1) Single point of failure for all the applications. 2) Data transfer between apps may be slow (Just a feeling).

What do you guys think about this approach? Please highlight advantages or disadvantages and if there are alternate approaches.

Apologies for the long post, let me know if I have violated any forum guidelines.

Aucun commentaire:

Enregistrer un commentaire