How do I sync data between devices online and offline using the Google App Engine?

I want to create an application that will synchronize data on several devices, for example, Evernote . I have seen Firebase and Couchbase , but due to problems with price and hosting I do not want to use these two, I want to create my own synchronization.

I want to create it as an Android Client , Google Endpoints for creating APIs and Appengine ..

Online and offline synchronization

Sample note application (e.g. Evernote)

A simple scenario assumes that the user logged on to multiple devices and created a note on one device, it should be synchronized with all other devices, device X is turned off, and one document is created, but its offline mode, when device X go online, it’s should get the latest server state and add the notes it created, and this should be synchronized with several devices.

Scenario 2

I present a scenario when data synchronization becomes a problem. Suppose an application should work if it is not connected to the Internet, and therefore cannot communicate with this central server. So:

A # 100 B # 100 C # 100 C (, # 100 ) A B , , , , .

, , -, alredy ?

? ?

In-short , , firebase Couchbase

+4
1

, , , .

Android, http://developer.android.com/training/sync-adapters/index.html

Couchbase. , , . - , , , - .

( Couchbase.)

+2

Source: https://habr.com/ru/post/1614689/