Google App Engine + Google Cloud Storage + Sqlite3 + Django / Python

时间:2022-08-22 11:15:32

since it is not possible to access mysql remotely on GAE, without the google cloud sql, could I put a sqlite3 file on google cloud storage and access it through the GAE with django.db.backends.sqlite3?

因为在GAE上无法远程访问mysql,没有google cloud sql,我可以在google云存储上放一个sqlite3文件,并通过GAE使用django.db.backends.sqlite3访问它吗?

Thanks.

3 个解决方案

#1


1  

No. SQLite requires native code libraries that aren't available on App Engine.

不,SQLite需要App Engine上不可用的本机代码库。

#2


0  

Since you cannot modify files in Google Cloud Storage (see this doc for further details), I don't think it would be a good idea to even try it. Additionally, the overhead of downloading (probably) every time the whole sqlite file would make your app really slow.

由于您无法修改Google云端存储中的文件(有关详细信息,请参阅此文档),我认为即使尝试它也不是一个好主意。此外,每次整个sqlite文件下载(可能)的开销将使您的应用程序真的很慢。

#3


0  

Google Cloud SQL is meant for this, why don't you want to use it?

谷歌云SQL就是为了这个,为什么你不想使用它?

If you have every frontend instance load the DB file, you'll have a really hard time synchronizing them. It just doesn't make sense. Why would you want to do this?

如果你有每个前端实例加载数据库文件,你将很难同步它们。它没有意义。你为什么想做这个?

#1


1  

No. SQLite requires native code libraries that aren't available on App Engine.

不,SQLite需要App Engine上不可用的本机代码库。

#2


0  

Since you cannot modify files in Google Cloud Storage (see this doc for further details), I don't think it would be a good idea to even try it. Additionally, the overhead of downloading (probably) every time the whole sqlite file would make your app really slow.

由于您无法修改Google云端存储中的文件(有关详细信息,请参阅此文档),我认为即使尝试它也不是一个好主意。此外,每次整个sqlite文件下载(可能)的开销将使您的应用程序真的很慢。

#3


0  

Google Cloud SQL is meant for this, why don't you want to use it?

谷歌云SQL就是为了这个,为什么你不想使用它?

If you have every frontend instance load the DB file, you'll have a really hard time synchronizing them. It just doesn't make sense. Why would you want to do this?

如果你有每个前端实例加载数据库文件,你将很难同步它们。它没有意义。你为什么想做这个?