Dropbox API-将Dropbox用作服务器 [英] Dropbox API - Using Dropbox as a server

查看:109
本文介绍了Dropbox API-将Dropbox用作服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用文件共享服务器在多台计算机上的应用程序的多个实例之间保持某些文件的最新性和恒定性,例如(例如)编写多人游戏,该游戏将所有玩家的位置存储在一个文本文件,并使用诸如Dropbox之类的东西在所有应用程序中保持文本文件不变,并且每个应用程序实例都可以使用该应用程序的播放器位置更改文件,然后其余应用程序可以进行相应更新。这仅是示例,并非我打算使用该技术进行的操作。我想做的事并不依赖于快速的数据共享,而只是定期下载和更新文本文件。

I was wanting to use a file sharing server to keep certain files up-to-date and constant across multiple instances of my application across multiple computers - like (for example) writing a multiplayer game, which stores all the player's positions in a text file, and uses something like Dropbox to keep the text file constant across all the applications, and each application instance can change the file with that application's player's position, and then the rest of the applications can update accordingly. This is only an example, and is not what I intend to do using this technology. What I want to do does not rely on fast sharing of data very quickly - but only periodically downloading and updating the text file.

我想知道如何才能

根据我的实验发现,Dropbox通过网络浏览器提示用户输入密码,并且旨在容纳多个帐户,而我只需要容纳服务器帐户。

From what I have found out from experimenting, Dropbox prompts users for their passwords via a web-broswer, and is designed to accommodate multiple accounts, whereas I only need to accommodate the 'Server' account.

因此,是否有必要使用Dropbox API进行此类操作,还是应该使用其他方法?还是我需要了解如何编写自己的服务器。对我来说,使用某种文件共享API比编写实际服务器要容易得多。

So, is there anyway to do this sort of thing using the Dropbox API, or should I use something else. Or do I need to find out how to write my own server. Using some sort of file sharing API seems a lot easier to me than writing an actual server.

感谢您的帮助,

Ben

推荐答案

您可能会考虑使用Google App Engine(GAE)。最近,我有一个类似的要求,我想当您需要集中式数据时,这是一个不错的选择。另外,您可以使用自己的自定义身份验证登录无浏览器帐户,或者我认为甚至可以通过OAuth进行登录吗?取决于我猜数据的敏感程度。我只是自己滚了。

You might think about using Google App Engine (GAE). I had a similar requirement recently and I'm thinking this is a good option when you want centralized data. Plus you can do the no-browser account login by using your own custom authentication, or I think it's even possible via OAuth? Depends on how sensitive the data is I guess. I just rolled my own.

根据我的研究,我发现将Dropbox用作服务器存在一些可扩展性问题,因为每天最多只能限制5,000个呼叫。 它基于Amazon S3构建,因此您也可以考虑直接使用它。

From my research I found that using Dropbox as a server has some issues with scalability, since you'll be limited to maybe 5,000 calls per day. source It's built on Amazon S3, so you could also look at using that directly.

GAE举升机的上限为675,000,但可以免费增加到9100万。
https://developers.google.com/appengine/docs/quotas

GAE lifts that limit up to 675,000, but can be increased up to 91 million for free. https://developers.google.com/appengine/docs/quotas

我确实找到了的开源项目Java ,或者您可以查看 Python示例

I did find an open-source project for doing this with Java, alternative you could look at Python example

这篇关于Dropbox API-将Dropbox用作服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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