Search code examples
delphiremote-connections

Connecting Windows desktop applications to a remote location


I would like to know how I can connect remote offices to a central database.

Here is the scenario:

Office with several users working on a windows desktop application

This application get it’s data from the database in the office server.

Now 1 or more remote (offices, stores, whatever) need to have access to the same data.

How can we achieve this?

Sometimes we need real time

Sometimes it’s not that important.


Solution

  • You could easily use DataSnap or RemObjects to wrap and expose your existing database as a middle tier server then write clients against it. For connecting to this I would strongly suggest a VPN connection between your remotes and your middle tier. This way you don't have to worry as much about securing the communications link...unless the data you are transferring is low risk data (not worth anything).

    You will want to become very familiar with TClientDataset. It gives you the ability to operate your remote systems without having access to the master database, as well as reduce the amount of traffic that is shipped across the wire (you can filter and sort locally).

    Update Much of the performance will be based on the speed of your back-end server and the type and amount of data your transferring. It is fast enough for most purposes, and if you find yourself having to send lots of data down the pipe, I have found it worth while to do some client caching. By adding an update trigger to set an updated timestamp on each record, you can update your cache by only requesting records newer than the last one you received.