Message-Id: <3.0.6.32.19990204200656.00809c20@pop.netaddress.com> X-Sender: pderbysh AT pop DOT netaddress DOT com X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Thu, 04 Feb 1999 20:06:56 -0500 To: djgpp AT delorie DOT com From: Paul Derbyshire Subject: [Semi-OT] Making a transaction. Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com I've become stumped by a signaling problem. Say we have two machines on a network, A and B. We want to send a message from A to B, but we want, within a short time after the fact, for one of two situations to be the case: 1. B received the message successfully and A and B performed some action to do with the message that needs to be atomic, such as an electronic funds tranfer (as an example). 2. Neither A nor B performed the action. The basic problem then is sending a message and having both sides know for sure that either the message succeeds or it fails. A problem arises. The simplest apparent solution is to have B send an acknowledgement to A. But the acknowledgement may go missing, so we need B to be sure A got it, and we enter an infinite regress. Can anyone here give, or concoct, a solution to this problem? e.g. a way for A and B, in finite time, to wind up in state 1 or 2 above. The solution can include timeouts, heartbeats, "naks" that are sent due to failure to receive an expected message, and so forth, as long as the number of messages involved in a transaction can be kept reasonable, say, under 20 (with a continuous heartbeat possible added on). Whoever emails me or the list the solution that a) has no loopholes or bugs and b) has the fewest message-passes per transaction, wins. The winner gets a heartfelt thanks from me, and gets to have his or her name attached to the code I wind up writing based on it. (In the library readme file/docs under contributors, in the source code, and in a string that should end up in every binary built from it. A contributor in my view need not have submitted actual code; ideas, major help, pseudo code, algorithms, data that is a component of the product, example code, bug reports and fixes, anthing significant is a contribution. DJ Delorie, Eli Zaretskii, and Nate Eldridge are in the Hall of Fame already, and so are any people whose source code I cannibalize (Shawn Hargreaves will probably end up in there since I'll study/cannibalize Allegro code)...) -- .*. "Clouds are not spheres, mountains are not cones, coastlines are not -() < circles, and bark is not smooth, nor does lightning travel in a `*' straight line." ------------------------------------------------- -- B. Mandelbrot |http://surf.to/pgd.net _____________________ ____|________ Paul Derbyshire pderbysh AT usa DOT net Programmer & Humanist|ICQ: 10423848|