Results 1 to 2 of 2

Thread: Syncing offline data

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2013
    Posts
    9

    Default Syncing offline data

    I have a multiple screen/grid extjs 5.1 app. When the app opens, it authenticates and the loads the appropriate client data from the server. Currently the app saves data, using direct calls to node who loads to mysql. Upon a successful return, data is loaded to the store. We need this app to be used in the field where internet is questionable. So the data needs to be saved locally first, then sync'd with the server, when a good connection is available.

    My questions are:

    When using my app on an ipad, I do not specify a db, I just load initial data from the server to the stores. Where is this data stored? Is the default indexed db?

    When syncing, many tables with multiple new, updated, and deleted rows would be sync'd. Is store.sync() the best way of syncing to the server. If there is an error does store.sync() know specifically which rows were not sync'd and syncs them next time? What about conflicts? Would I be better of with a sync software?

    In my data there are some ids created in the insert statements by getting the latest id from 2 tables and adding 1. This id is not unique, it is used for a group of data in one table and then on certain rows in other tables. Currently I insert, get the id, and load it to the other rows. If storing locally, first I could create temp ids to retain the relationship, but how do the main ids get created on the server after sync? I could use a db trigger or scripts. Node could also do it before load, but I don't want to slow down the data loads. What would be the best practice?

    Thank you for your assistance

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2013
    Posts
    9

    Default

    Looks like syncedDB https://github.com/paldepind/synceddb might be a good options for syncing indexedDB with mysql. Has anyone tried this with extjs?

Similar Threads

  1. Remote and local storage syncing when offline
    By The_Unknown in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 15 Dec 2014, 7:18 AM
  2. Problem while syncing an online store to an offline store
    By Abhi_aec in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 2 Oct 2012, 9:54 AM
  3. Problem while syncing an online store to an offline store
    By Abhi_aec in forum Sencha Touch 2.x: Q&A
    Replies: 3
    Last Post: 15 Jul 2012, 9:58 PM
  4. Local storage and syncing with json data
    By Frances in forum Sencha Touch 1.x: Discussion
    Replies: 9
    Last Post: 22 Jun 2012, 6:03 AM
  5. Bi-Directional Syncing for offline apps
    By Sukima in forum Community Discussion
    Replies: 2
    Last Post: 20 Jun 2012, 5:41 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •