3

我们正在开发一个应用程序,该应用程序需要客户端(移动设备)将大小为 5MB 或更大的文件发送到服务器组件进行处理,我们希望得到以下方面的建议:

有没有办法将后端即服务 (BaaS) 平台与我们自己的数据存储(在我们的特定案例中托管在 AWS)相结合?如果来自客户端的文件直接发送到我们自己在云中的数据库,而不是存储在 BaaS 服务器中,我们基本上更愿意。
换句话说,我们需要一个 BaaS 平台或解决方案,允许解绑/绕过其数据存储功能,以便我们可以仅将 BaaS 用于其其余设施(例如客户端身份验证、REST API 等)。
我们在 EC2 中有自己的服务器,这些服务器是文件的主要处理部分所需要的,并且只需要 BaaS 平台即可在短时间内启动我们的应用程序。在大多数情况下,将文件从 BaaS 平台自己的数据存储中提取到 EC2 服务器会导致总体延迟开销以及额外的带宽成本。

4

1 回答 1

1

I'd faced a similar dilemma while building my app. In my case, I had to upload and store photos uploaded by users somewhere AND I didn't want to build a backend myself. So, I decided to use Amazon S3 to store the photos uploaded by the user and used SimpleDB as it offered me greater flexibility and ease of use than using a MySQL backend. Now, obviously, SimpleDB is not a Backend-as-a-Service platform but I was looking for the same convenience as you are.

So what I'm suggesting is that you use a Backend-as-a-Service platform like Parse (which has an excellent freemium model), CloudMine (another great service but with tight limitations on the freemium model i.e only 500 free users/month) or Kinvey (which markets itself as the first BaaS platform, I don't have much information about it but it's definitely worth a look). And use S3 for your data storage. This way you can use the BaaS for client authentication, the REST API etc as you mentioned and you can continue using S3. All you need to do is create an appropriate naming scheme for your S3 buckets and objects such that you can easily identify which object belongs to which user, this can be done easily using a prefix-based naming scheme (seeing as S3 doesn't offer the ability to create sub-folders in buckets). Now whenever you need to pull some client information you can make a call to your BaaS with the client authenticated details and whenever you need access to your data-storage you can make a call to S3 using the Android SDK provided by AWS to retrieve the objects that belong to that particular user. Seeing as you plan on using EC2 to process those files transferring those files from S3 to EC2 should not cost you any extra bandwidth (I might be wrong here because I haven't looked into it but as far as I can remember transferring data within AWS is free).

Do let me know if you have additional questions.

于 2012-08-18T01:31:01.553 回答