NetTalk Central

Author Topic: Sync web app with desktop app  (Read 2953 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Sync web app with desktop app
« on: December 18, 2012, 08:54:20 PM »
     I'm looking for some advice on synchronizing a NT 7 app with a desktop app.  Both apps use TPS files. with the apps run on different virtual servers on the same network.  On the server running the NT 7 app, I have a drive mapped to the location of the desktop app.
     My thought is to build a source procedure that opens the coresponding web and desktop files, and move/copy any new web app data to the desktop file.  I intend to call this procedure manually from an "Admin" menu I have set up.  If this works, I will then create a standalone version of the procedure, to run as a service so data can be moved automatically on a periodic basis.
     I will only move/copy data if it does not exist in the desktop file, or copy if it has changed.  I have done this successfully in other desktop apps by creating a CRC of a record and storing this in the file.  I can then use this to see if a record has changed, but I'm open to other suggestions if there is a better way.

Thanks,

Jeff King

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Sync web app with desktop app
« Reply #1 on: December 18, 2012, 10:51:44 PM »
Hi Jeff,

This is a "non trivial" problem which has a number of possible solutions, but no "silver bullet".

a) change to SQL, use SQL replication to replicate the data from one system to the other. OR

b) stay on TPS, but implement client-side replication (like say using Replicate). OR

c) (simplest by far) - reframe the question so you ask why there are 2 databases to begin with? Perhaps a shared folder for the TPS files, or a shared SQL server would be good.

In terms of home-grown replication - that's a complex topic, and not trivial to do.

cheers
Bruce

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Sync web app with desktop app
« Reply #2 on: December 20, 2012, 06:19:41 PM »
Hi Jeff,

I agree with Bruce with solution "c". If it's on the same network I would share the TPS data. Of course TPS file being accessed over a network are prone to corrupt so just a plain SQL solution (1 DB, no replication) may work better which is what I use for a similar setup with desktop and web apps sharing the same data.

Cheers,

Kevin