views:

800

answers:

4

Hi All,

I have a few questions about data synchronization. The architecture does not seem to be clear about this:

  1. Does Google Gears provide from automatic synchronization of data (from client to server and server to client)?

  2. If it does provide for automatic data synchronization, then can i write functions to hook into the sync mechanism (on the server and on the client) to control what data is synced?

  3. Is there anyway to partition the data on the server? for example a client should be able to download only those rows in a table which are related to it (for example there is 'hostname' column in the table, and only those rows which contain the hostname of the client trying to download the data should be downloaded to it)

Basically what I am looking for is: does Google Gears Synchronization support the data synchronization features like SQL Server Merge replication? [ http://technet.microsoft.com/en-us/library/ms152746.aspx ]

+3  A: 

Gears does not provide any synchronization capabilities. I think I remember listening to a podcast interview with one of the gears developers when it first came out, and he said that they wanted to provide a framework to help with synchronization, but realized that everyone's synchronization needs were sufficiently different that it would be too difficult to find a one-size-fits-all solution.

In addition, it's important to note that because the database portion of Gears is really just a client-side database accessible from javascript, there's nothing in Gears that specifies a specific server-side implementation, or even a specific server api. Thus, doing things like the data partitioning you describe are up to the developer, as is interfacing with the server in general.

Scotty Allen
A: 

Yes, you can partition the data on the server however you want... because there's no automatic synchronization

Eli
A: 

I initially thought that Gears provided synchronization capabilities. But realized it does not.

Ngm
A: 

If you look at the Google Gears docs you'll see that the local SQLite database is not writable for you. It's writable for Gears, so it can't even help you with local caching of data that will be sent to the server. It's for caching read-only data, at this point.

Yar