使用 Amazon EC2 和 SimpleDB 设计 Android 应用程序

发布于 2024-10-20 18:31:27 字数 680 浏览 3 评论 0原文

我目前正在开发我的第一个 Android 应用程序,并且仍处于设计阶段,试图提出一个可靠的模型。

我的应用程序将使用用户 Google 日历中的 GCal 数据,并将其与一个或多个其他用户同步,以确定所有人之间的共同会议时间,而无需通过电子邮件来回安排繁琐的时间。

我设想通过将每个用户及其日历数据存储在每天刷新的数据库中来实现这一目标。当发出确定组之间最佳会议时间的查询时,我想从数据库中选择每个用户的日历数据,执行计算以找到最佳时间,并将结果显示回进行查询的用户。

适用于 Android 的 AWS SDK 支持 Amazon SimpleDB 和 S3,在这种情况下,我将使用 SimpleDB 作为我的数据库。我迷失的地方是使用 Amazon EC2 Web 服务与 SimpleDB 配合执行计算。

首先,感谢对我的方法和/或设计的任何反馈。

其次,使用非 Android 但基于 Java 的 API/SDK 对应用程序有何影响,或者是否有可能这样做?

如果可以与 Android 一起使用,用于 Java 的 API typica 看起来会很有趣且有用。

谢谢!

I'm currently developing my first Android application and still in the designing stage trying to come up with a solid model.

My application will use the GCal data from a users Google calendar and sync it up with one or more other users to determine common meeting times between all without the tedious back and forth of scheduling over email.

I vision this working by storing each user and their calendar data in a database that will be refreshed daily. When a query to determine the optimal meeting times between a group is issued, I want to select the calendar data of each user from the database, perform the computation to find optimal times, and display the results back to the user who made the query.

The AWS SDK for Android supports Amazon SimpleDB and S3, in which case I would use SimpleDB for my database. Where I am getting lost is using the Amazon EC2 web service in concert with the SimpleDB to perform the computation.

First off, any feedback on my approach and/or design is appreciated.

Second, how does using non-Android, but Java based APIs/SDKs effect applications, or is it even possible to do so?

The API typica for Java looks interesting and useful if it is possible to use with Android for instance.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

她如夕阳 2024-10-27 18:31:27

因此,我认为注意以下几点很重要。

  1. 您所描述的不是“android 应用程序”。它是一个带有 Android 客户端的 Web 服务应用程序。我之所以迂腐,是因为您需要做出的许多设计决策完全与您的主要客户端将在 Android 上运行这一事实无关。

  2. 我担心将用户日历存储在非关系数据库中的可行性。我不知道您是否已经看过这个,但是您试图解决的问题(日历)似乎会受益于关系数据库的关系优势。例如,我不确定如何以非关系方式构建过去、现在和未来事件/会议的数据存储结构。这可能是可能的,但我不确定它是否是最佳的。根据数据量,您可能还需要考虑最大记录大小。

  3. 虽然适用于 Android 的 AWS SDK 确实支持写入 S3 或 SimpleDB,但我认为还有很多需要考虑的地方。您对与 EC2 的交互感到困惑的原因是,通常情况下,您的 EC2 Web 服务将与 S3 或 SimpleDB 交互。通过使用 AWS SDK,您理论上可以消除对 Web 服务的需求。我的主要问题是,由于没有通用的访问模式,您现在被迫在每个客户端上执行更多操作。您的 iOS 客户端或 Web 客户端需要具有与 Android 客户端相同的逻辑,以确保其访问您的 s3 和简单数据库数据相同。如果这没有意义,我可以详细说明。

  4. 使用非 Android api 和 sdks 是一个混合体。有时,如果类编译为 Davlik,效果会很好。如果不这样做,则不起作用。

我可能会指出一件事,因为您可能已经与 Google 技术联系在一起了,那就是 Google App Engine。它的好处是有一个免费的服务级别,可以让您免费启动和运行您的应用程序。根据您建议的技术,您可能需要研究一下。除此之外,我的另一个强烈建议是,您首先专注于构建独立于 Android 客户端的 Web 服务。花时间对客户端服务器交互进行建模,并将尽可能多的“逻辑”移至服务器。这就是我觉得你最初的描述中缺少的东西。嘎吱嘎吱的地方。

So, I think its important to note a couple of things.

  1. What you are describing is not an 'android application'. Its a web service application with an android client. The reason I'm being pedantic is that many of the design decisions you need to make are completely besides the fact that your primary client will run on android.

  2. I'm concerned about the viability of storing the users calendar in a non-relation database. I don't know if you've already looked through this, but the problem you are trying to solve (calendaring) seems like it would benefit from the relational benefits of a relational database. For instance, i'm not sure how you would structure for storage the data of past, present and future events/meetings in a non-relational. Its probably possible, but i'm not sure if its optimal. Depending on the amount of data you may also need to consider the maximum record size.

  3. While its true that AWS SDK for android supports writing to S3 or SimpleDB, I think there is a lot to consider. The reason you are confused about the interaction with EC2 is that normally, your EC2 web service will be interacting with S3 or SimpleDB. By using the AWS SDK you can, in theory, remove the requirement for a web service. My main issue with that is that you're now forced to do lots more on each client because there is no common access pattern. Your ios client or web client needs to have all the same logic that your android client has to make sure its accessing your s3 and simple db data the same. If that doesn't make sense i can elaborate.

  4. Using non-android api's and sdks is a mixed bag. Sometimes it works fine if the classes compile to Davlik. If they don't it doesn't work.

One thing I might point out, since you'll already possibly be tied to a Google technology is Google App Engine. The nice part about it is that there is a free level of service which lets you get your app up and running without cost. Based on the technologies you are suggesting, it might be something for you to look into. Other than that, my other strong suggestion is that you focus on building out the web service first and independently of the android client. Take the time to model what the client server interaction would be and move as much of the 'logic' to the server as is possible. Thats what I felt like was missing from your initial description. Where the crunching would be.

傻比既视感 2024-10-27 18:31:27

我的解决方案是使用面向对象原则。将您的数据库存储在 amazon dynamoDB 上,然后与移动应用程序同步用户数据。然后在显示结果之前在设备上处理数据/计算

my solution is that you use O-O principles. store your db on amazon dynamoDB and then sync user data with the mobile app. then you do processing of the data/computation on the device before displaying the results

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文