Re: Database syncronization

From: Footlocker <footlocker_at_openpip.com>
Date: Sat, 27 Apr 2002 09:05:13 +0200
Message-ID: <3cca4d87$1_at_news.uni-ulm.de>


Hi Jose

Your problems were exactly my problems for my Master Project. Basically my solution works fine for me, however I would not use it in a professional environment right now ;-)

I have a UUID and a timestamp for every row in my database. The UUID (in my case only 32bit wide - not very good) makes sure, that 2 people can create entries in their tables without collision. The timestamp shall ensure to identify old entries. Problem (not synchronized time). Workaround that will serve for me (soon) is to dynamically determine a delta-time between 2 servers for mutual synchronization. This can be done by determining the roundtrip-time. If you are interested in the project you can have a look at www.openpip.com which is beeing devolped right now.

"Bytter" <bytter_at_netc.pt> schrieb im Newsbeitrag news:3cc9faad$1_at_213.30.5.12...
> Hi,
>
> I've got a problem that I can't seem to resolve in a simple way. My
problem
> is: one database in 'n' computers (to make it simple, lets start with 2).
> Both have the same tables, which have the same fields. But both run on two
> different computers. On both, they can add new things, delete old ones,
and
> modify existing entries. But, at one time, they must syncronize. They data
> must be shared: those entries added, must be added, those modified must be
> modified, and so on... (simple uh :)) Let's start using a simple table,
with
> an unsigned long int primary key:
>
> Names
> -------
> Cod (LONG INT) (PK) (auto-increment)
> Name (varchar)
>
> Ok until here... Now let's run it on two diferent computers. Tables are
> empty, we create two diferent entries on both computers. They get the same
> 'Cod'... :-(
>
> Now, let's change our 'Cod' to a TIMESTAMP... The problem seems to be
> resolved but then, who said that it wouldn't be possible two create two
> entries at the same second? Nothing guarantees that the clock is
> synchronized, nothing guarantees how many users are using it at the SAME
> TIME... So, problem unresolved.
>
> Third try: add an ID to the end of 'Cod', and mantain it TIMESTAMP. Well,
> fine... Problem is when 'n' (number of computers running the database
> independently) starts to grow... It doesn't seem a genial way to do it...
>
> So, what's next ? Any ideas ? I'm really needing some help here... Oh, and
> they are meant to be practically implemented (consider performance).
>
> Sorry about my english, but my thanks in advance,
>
> Hugo Jose Ferreira
>
>
Received on Sat Apr 27 2002 - 09:05:13 CEST

Original text of this message