Subject | Re: [Firebird-Architect] RFC: Clustering |
---|---|
Author | = m. Th = |
Post date | 2006-11-21T08:24:55Z |
Completing the Roman's answers...
Jim Starkey wrote:
really random. The random number generator must be initialized with a
'seed' and after this the entire sequence is deterministic. Usually, the
'seed' is taken from the system clock or assigned by the developer.
Some solutions:
- The first client to connect sends the same 'seed' to all nodes
- The value of the last random generator call is stored in the db so
it is persistent across the sessions. At the database creation the
'value of the last random generator call' will be the same for all db
from the node (let's say 3.14 or whatever is convenient).
- If you talking about "now" as a variable which gets the current time,
this isn't a problem in a LAN, at least in a Windows Domain one, dunno
for Linux, but the things should be the same, where it's imposed (by the
Kerberos protocol which is used) that all the workstations to have the
clocks in sync. (ie. a time server is required).
hth,
m. th.
Jim Starkey wrote:
> Second, there is a problem of non-deterministic behaviors such as a- As you know, the 'random' numbers aren't (in a usually implementation)
> random number generator or translation of the manifest constant "now".
> Each will yield different results on different system and the servers
> will diverge.
really random. The random number generator must be initialized with a
'seed' and after this the entire sequence is deterministic. Usually, the
'seed' is taken from the system clock or assigned by the developer.
Some solutions:
- The first client to connect sends the same 'seed' to all nodes
- The value of the last random generator call is stored in the db so
it is persistent across the sessions. At the database creation the
'value of the last random generator call' will be the same for all db
from the node (let's say 3.14 or whatever is convenient).
- If you talking about "now" as a variable which gets the current time,
this isn't a problem in a LAN, at least in a Windows Domain one, dunno
for Linux, but the things should be the same, where it's imposed (by the
Kerberos protocol which is used) that all the workstations to have the
clocks in sync. (ie. a time server is required).
hth,
m. th.