Hi Maurice,
On 2021-04-13 21:15:41, you wrote to August Abolins:
AA>> Is that a way to reduce the probability of collisions within a
AA>> certain span of allotted time?
MK> Good question. I've heard of a few different methods for doing this none
MK> of which I am currently deploying. Mind you I take care of MSGIDs in the
MK> creation of the MSG so the possiblity of collisions is near zero. There is
MK> a way but if that happens then it is a signal that something is seriously
MK> wrong on my system. It has yet to happen.
MK> Just for fun here is the output of 10 potential MSGID serailno's, the first
MK> column being unixtime 32-bit hex based, the second being the random 8
MK> character [:alnum:] regex dealies;
MK> 60760e0b kUBdI5RO
MK> 60760e0b G5T1LBae
MK> 60760e0b mFSS1Gxc
MK> 60760e0b Daxpq9EE
MK> 60760e0b XVCgstYj
MK> 60760e0b uWuB7Jqj
MK> 60760e0b J0qZbQIo
MK> 60760e0b kGrnLcEZ
MK> 60760e0b NQGnXOVM
MK> 60760e0b kK7htVJO
MK> Note that only one method produced zero collisions while the other produced
MK> nothing but collisions. Based on this very simple test the random 8
MK> character [:alnum:] regex thingies are obviously superior.
So your algorithm based on unixtime has a bug! It should take into account it can be called multiple times within the same second. If you do that correctly, it's superior to the random one...
Bye, Wilfred.
--- FMail-lnx64 2.1.0.18-B20170815
* Origin: FMail development HQ (2:280/464)
|