On Wed, 29 Aug 2007, Matt Sergeant wrote:

On 28-Aug-07, at 11:04 PM, Charlie Brady wrote:

> Err, actually I had a brain fart. It should be remote_port.

No, it should be remote_IP.remote_port.local_port and should include a transaction_within_connection count. I don't think that pid adds anything.

Please try any way you can to get the algorithm I've used to generate a duplicate transaction id. Feel free to use your fastest hardware.

My fastest hardware isn't relevant. And I don't have any fast hardware :-)

I've tried, and cannot conceive of any way to get a repeat with this algorithm.

"This algorith" I take to mean your proposal of time() . $$ . $remote_port.

That is just asserting that no single process could receive two connections in the same tick of time() (because if it could, it's trivial to arrange for them to have the same remote port). I can conceive of that happening, so we should do better. Use the four-tuple.

Perhaps in 30 years maybe (when computers are that fast), but for now it works well.

But not perfectly :-) Nor as well as it could with a tiny bit more effort.

---
Charlie

Reply via email to