Thread: Recommendations for a datasync scenario ?

Recommendations for a datasync scenario ?

From
Aarni Ruuhimäki
Date:
Hello good folks,

Our php application uses browser clients and magnetic card readers to collect
workmen's working times from a number of physical construction or project
sites to the main database at the head office, which is online with a private
ip-address.

Now we have a situation where not all construction sites' offices are online
or have so poor / instable connections that we can't rely on them. So we need
to install a local server to collect the data.

What would be a proper way to load the work time data up to the main database
when a local server is online again ?

Also, all the workers and sites are created and maintained at the head office
so we need to get this data down. There may / will be corrections to the
uploaded work time data as well.

I imagine all this could be done with unique row identifiers, temp tables and
shell- / sql-scripts, but why re-invent the wheel ...

All servers are linux + Pg8.2.

I followed the recent thread about 'replication in Postgres' but still any
info on experience of similar circumstances and pointers / comments /
recommendations are more than welcome.

BR,
--
Aarni Ruuhimäki


Re: Recommendations for a datasync scenario ?

From
Jorge Godoy
Date:
Em Friday 30 November 2007 05:02:25 Aarni Ruuhimäki escreveu:
>
> I followed the recent thread about 'replication in Postgres' but still any
> info on experience of similar circumstances and pointers / comments /
> recommendations are more than welcome.

You problem is not one where replication would help so much.  You can design
your solution so that you *always* feed a local database and this local
database syncs, from time to time, with a central database.

What to use for syncs?  Some script you can write easily.

All entries should have the location as part of their PK, so that there are no
clashes and you don't need to rely on sequences and the correct value being
used everywhere.

It is the same kind of problem that we have on supermarkets and POSs: the POS
has to sell even if the connection with the server is down.


--
Jorge Godoy      <jgodoy@gmail.com>