1

I have a scenario where my software has to work even when there is no internet connectivity.

I have designed my application in such a way that the entire logic is deployed on the local system which generates the data into local database.

When ever internet is available a cron job would update the data from the local database to the appengine mysql database using a webservice.

The DB Structure in both the cases, the offline and the appengine database is same.

As the DB Structure is exactly same, is there any way available to sync up the two databases (Local and App engine) other than using webserivce or likewise ??

takrishna
  • 4,884
  • 3
  • 18
  • 35

2 Answers2

1

No, AppEngine is HTTP only so it has to be some kind of webservice.

Is this sync one-way, client only sends data to server? In this case it's more like a backup, you could just dump DB to file and upload the file for storage to AppEngine.

Peter Knego
  • 79,991
  • 11
  • 123
  • 154
  • This is not a one time move. I need this client to server move to happen and reflect in the database every 15 mins or so – takrishna Dec 20 '12 at 18:52
0

Is it a web application (appengine hosted) or do you use the appengine only to connect to the database with a native application? Which appengine database do you use?

If you using web technologies (html5) such a connection is hard to handle, because you can't connect to the databases directly with JavaScript [1]. So there is no other way -> you will have to send the db structure to the server and update the remote database on the server.

If you are using a native application maybe the Google Cloud SQL is a better solution for you [2].

[1] Can JavaScript connect with MySQL?

[2] https://developers.google.com/cloud-sql/

Community
  • 1
  • 1
Eich
  • 3,728
  • 1
  • 21
  • 34
  • Yeh.. It is ALSO app engine Hosted. It works both on the local as well as on the app engine. But before the app engine version can work a cron job syncs the DB so that the required data is available. I need a solution to sync the DB through some other means than a "web service". so i need not really update my sync up cron job everytime i make a change/upgrade the database. I want the entire database that is present in the local be available online. – takrishna Feb 15 '13 at 13:16
  • Thats not possible when no internet connection is available :) . An instand update process is only possible with an active internet connection. Maybe you can write a SQL-Wrapper that saves every sql statement (except the SELECT statements) and checks every 2s if an internet connection is available. If so, send all statements to the remote system (servlet, web service, ...) and execute them there. – Eich Feb 15 '13 at 13:51
  • If you are using mysql maybe replication is what you are searching for: http://dev.mysql.com/doc/refman/5.0/en/replication.html – Eich Feb 15 '13 at 13:54