Google App Engine 上的只读关系数据库?

发布于 2024-10-11 20:08:07 字数 248 浏览 6 评论 0原文

我有一个中等大小(~100mb)的只读数据库,我想将其放在谷歌应用程序引擎上。我可以将其放入数据存储中,但数据存储有点慢,没有关系功能,并且有许多其他令人沮丧的限制(这里不讨论它们)。另一种选择是将所有数据加载到内存中,但我很快就达到了谷歌规定的配额。最后一个选择是使用 django-nonrel + djangoappengine,但恐怕该包仍处于起步阶段。

理想情况下,我想创建一个使用 blobstore 作为其数据源的只读 sqlite 数据库。这可能吗?

I have a medium size (~100mb) read-only database that I want to put on google app engine. I could put it into the datastore, but the datastore is kind of slow, has no relational features, and has many other frustrating limitations (not going into them here). Another option is loading all the data into memory, but I quickly hit the quota imposed by google. A final option is to use django-nonrel + djangoappengine, but I'm afraid that package is still in its infancy.

Ideally, I'd like to create a read-only sqlite database that uses a blobstore as its data source. Is this possible?

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

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

发布评论

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

评论(3

戏剧牡丹亭 2024-10-18 20:08:07

我认为你不可能找到这样的东西......当然不会在 blobstore 上找到。因为如果你的所有数据都存储在一个 blob 中,那么你必须将整个数据库读入内存才能进行任何操作,而你说过你不能这样做。

使用数据存储作为后端更合理,但也不是很多。提供 SQLite 驱动程序的一个大问题是实现事务语义,并且由于这是 GAE 为了高可用性而从您那里拿走的关键东西,因此很难想象有人会费很大的力气来编写这样的东西。

I don't think you're likely to find anything like that...surely not over blobstore. Because if all your data is stored in a single blob, you'd have to read the entire database into memory for any operation, and you said you can't do that.

Using the datastore as your backend is more plausible, but not much. The big issue with providing a SQLite driver there would be implementing transaction semantics, and since that's the key thing GAE takes away from you for the sake of high availability, it's hard to imagine somebody going to much trouble to write such a thing.

动次打次papapa 2024-10-18 20:08:07

django-nonrel 并没有神奇地提供 SQL 数据库 - 所以它并不是真正解决您的问题。

像访问文件一样访问 blobstore blob 是可能的,但 SQLite 模块需要本机 C 扩展,而 App Engine 上未启用该扩展。

django-nonrel does not magically provide an SQL database - so it's not really a solution to your problem.

Accessing a blobstore blob like a file is possible, but the SQLite module requires a native C extension, which is not enabled on App Engine.

无人问我粥可暖 2024-10-18 20:08:07

虽然可以通过 BlobReader 类作为类文件对象,如果尝试在此类文件上执行关系数据库操作而不首先将整个文件加载到内存中,数据存储的性能可能会更差。

While it is possible to access Blobstore objects via the BlobReader class as file-like objects, it'd probably perform even worse the the datastore to try to do relational database operations on such a file without loading the entirety of the file into memory first.

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