Storing data locally and synchronizing it with data base on linux server

Discussion in 'Mac Programming' started by Monaj, May 3, 2010.

  1. Monaj macrumors regular

    May 24, 2009
    Hi all,

    I have developed a mac application, which is continuously interacting with database on linux server. As data is increasing it has become costlier affair in terms of time to fetch data from server. So I am planning to store required data locally, say on mysqlite and find some mechanism through which I can synchronize it with database on linux server.

    Can anyone suggest me some way to accomplish it?


  2. mrbash macrumors 6502

    Aug 10, 2008
    There are a number of ways of doing this, and your application will dictate which method is best suited for you. You need to be more specific in describing your situation. How often will your data change? Are you preforming queries or updates?

    One way would be to set up your local database as a replication server.

    Another way would be to manually cache the data you retrieve in memory so that you only have to retrieve it once. You can also batch your updates to minimize the number of times you access the db.

    Another thing you could do is like a replication server, but set it up to perform manually. That is; get an initial copy of the database, and set up a trigger so that any updates, inserts cause a similar operation to the tables on your local database.

Share This Page