简体   繁体   English

Python-Django项目,可以在云(gae)和本地运行,无需互联网连接

[英]Python-Django project that can run both on cloud (gae) and locally without internet connection

I am working on a test project using Python on Django Project and will run on GAE. 我正在使用Django Project上的Python进行测试项目,并将在GAE上运行。 I stumble into a problem when one of the requirement states that the application should have a facility/mechanism of saving data from transactions even when there is no internet connection. 当其中一个要求声明应用程序应具有从事务中保存数据的工具/机制时,即使没有Internet连接,我也会遇到问题。

Normally it should work sending data for storage over the net. 通常,它应该通过网络发送数据进行存储。 But, when connection is not available, it should save the data on a local temporary storage. 但是,当连接不可用时,它应该将数据保存在本地临时存储中。 The system should also have the facility to update cloud storage once detected that local storage has latest data. 一旦检测到本地存储具有最新数据,系统还应具有更新云存储的功能。 It's like an resolution to address downtime on the end user's side (I mean I believe cloud platforms had their different forms of resolving downtime but how about the down time for end users - no internet connection). 这就像是一个解决最终用户端停机时间的解决方案(我的意思是我认为云平台有不同形式的解决停机时间,但最终用户的停机时间如何 - 没有互联网连接)。

So the application should could work both on the 'cloud' when possible (with strong internet connection) or can also work without connection by saving on local storage. 因此,应用程序应该尽可能在“云”上工作(具有强大的互联网连接),或者也可以通过保存本地存储而无需连接。 I really need inputs from Google app engine developers out there. 我真的需要来自谷歌应用引擎开发者的输入。 Actually I am trying to test this on both Java and Python. 实际上我试图在Java和Python上测试它。

There is no magic here whatsoever. 这里没有任何魔力。 Something that is made to work in the cloud, is not really working out of the box without Internet. 在云中工作的东西,如果没有互联网,就不能真正开箱即用。

Just to point you to a direction, you will have to do it manually yourself if you want to give to the end user a smooth support when Internet connection is going down. 只是为了指向一个方向,如果你想在互联网连接失败时给最终用户一个平稳的支持,你必须自己手动完成。 Among other things you will most likely going to use Web Storage, IndexedDB and Web SQL Database to support offline functionality and none of them have anything to do with GAE. 除此之外,您最有可能使用Web Storage,IndexedDB和Web SQL Database来支持脱机功能,而且它们都与GAE无关。

The problem you are describing is not related or specific to GAE, your hosting provider or Django. 您描述的问题与GAE,您的托管服务提供商或Django无关或特定。 What you need are the means to enable offline capabilities on the client, ie your web browser and to synchronize to your backend, ie Django. 您需要的是在客户端上启用脱机功能的方法,即您的Web浏览器以及与后端同步,即Django。 To do so, you need to get familiar with HTML 5 and you might want to check this out. 为此,您需要熟悉HTML 5,并且可能需要对此进行检查。

But none of these is related to GAE as you will see. 但是,正如您将看到的,这些都与GAE无关。 A nice libarary to support this might be Backbonejs.org 一个很好的图书馆支持这个可能是Backbonejs.org

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以从Java应用程序调用使用GAE中的Google Cloud Datastore的方法而无需重写与Datastore的连接代码 - can I call methods from java application that use google cloud datastore in GAE without rewrite the code of connection to Datastore 无法通过互联网访问本地托管的项目? - Can't access locally hosted project via the internet? 我的Maven项目如何在没有TestNG尝试运行JUnit测试的情况下同时运行JUnit和TestNG? - How can my Maven project run both JUnit and TestNG without TestNG trying to run JUnit tests? 我可以在本地运行并调试使用 Google API 的 Web 应用程序吗? [GWT+GAE] - Can I run locally and debug a Web App that uses Google API's? [GWT+GAE] 在Python上本地使用Java GAE数据存储区 - Using Java GAE Datastore on Python locally 如何在不使用GAE的情况下将文件上传到Google云存储中 - how can i upload a file in google cloud storage without using GAE spring boot 项目可以在没有互联网的情况下构建和开发吗? - Can spring boot project be built and developed without the Internet? RuntimeException不会暂停GAE,但在本地运行时返回HTTP 500 - RuntimeException does not halt GAE but returns HTTP 500 when run locally 无需代理即可直接连接到Internet - Direct connection to Internet without Proxy 没有Internet连接的许可系统 - Licensing system without Internet connection
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM