云解决方案同步在Android应用程序数据库 [英] A cloud solution to synchronize app database in Android

查看:206
本文介绍了云解决方案同步在Android应用程序数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个自定义的联系人应用程序,将设备上的数据存储在SQLite数据库。这是非常重要的是,此设备数据库可以与云数据库同步,因为某些原因:

I'm developing a custom Contacts app that will store data on the device in a SQLite database. It's very important that this device database may be synchronized with a cloud database, for some reasons:

用户可能有不止一台设备,并希望他们的应用程序的数据有多达最新的所有设备; 用户可能能够从Web应用程序访问这些数据; 由于这个程序将存储大量图片,设备内存将不足以容纳所有的数据和存档选项将可保持数据仅在云数据库。 归档到云将自动为较旧的记录来完成。 还原选项将可在需要时下载的数据记录。 正如你所看到的,设备数据库将持有的联系人一个用户和云数据库将是一个类似的数据库,但持有所有用户的数据。因此,有在该同步逻辑。它`不只是一个问题Ø复制整个的SQLite数据库文件上下。这必须是一个行/列级同步。

Users may have more than one device and wish to have their app data up-to-date on all devices; Users may be able to access these data from a web application; As this app will store many pictures, device memory will not be enough to hold all data and an archive option will be available to keep data only on the cloud database. Archive to the cloud will be done automatically for older records. A restore option will be available to download data for records when needed. As you can see, device database will hold contacts for one user and the cloud database will be a similar db but holding data for all users. So, there is a logic in this synchronization. It`s not just a matter o copying the entire SQLite DB file up and down. This must be a row/column level synchronization.

我不知道哪种解决方案,我可以用它来完成这项工作?是否可以使用谷歌云或应用程序引擎来实现服务器端?我能做些什么在设备端?任何想法?

I'm wondering which kind of solution can i use to accomplish this? Is it possible to use Google Cloud or App Engine to implement the server-side? What can I do on the device side? Any ideas?

我真的AP preciate任何答案。

I really appreciate any answers.

感谢。

推荐答案

您可以使用任何你想要的云基于web服务,你有Java的所有实力和雄厚的HTTP库提供给您的手机上。这当然是可以像亚马逊EC2或应用程序引擎平台构建的应用程序/ Web服务,然后调用直接从您的应用程序,处理的安全性,存储,并在自己的同步。

You can use any 'cloud' based webservice you want, you have the full strength of Java and solid http libraries available to you on the phone. It is certainly possible to build an app/webservice on a platform like Amazon EC2 or App Engine and then call that directly from your app, handling the security, storage, and synchronization on your own.

就个人而言,以我的经验,我使用Django / Python中的EC2(连同各种AWS数据服务),它的伟大工程。

Personally, in my experience, I use Django/Python on EC2 (along with a variety of AWS data services) and it works great.

另外,我知道有各种创业公司打造出的现成的解决方案,为您的方案中 - 即只为移动开发针对性的专项SDK和后端服务。我没有这些方面的经验,但这里有两个,其中我知道(没有代言,只是链接): https://www.parse.com/ https://www.stackmob.com/

Separately, I know that there are a variety of startups building out-of-the-box solutions for your scenario - i.e. special SDKs and backend services targeted just for mobile developers. I do not have any experience with these, but here are two of which I'm aware (no endorsement, just links): https://www.parse.com/ https://www.stackmob.com/

这篇关于云解决方案同步在Android应用程序数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆