Heteroclinic.net logo

www.heteroclinic.net

Transactional Programming Episode One
II See Once See Good

20150431

Here we present a program to accomplish some tasks sequentially. But these tasks may fail at a un-noticeable rate and may throw a run-time exception so halt the executing program.

Transactional Programming Episode One
II Stress Causes Exceptions

20150430

Stress may cause exceptions, hang on, I would rather say stress reveals what is hidden, for a program (or something else?). Repeating many times shows the true color not addressing for philosophy. When I am wring a program. The next thing after the first run, is to run it a hundred times more. Normally, I would get something out of expectation. In CatchMeNot, only a large number of running cases may hit the run-time error. So we seek a solution when reliability is a concern.

Transactional Programming Episode One
III Sliding Window Protocol

20150430
The sliding window protocol is used in network data transmission for reliable in-order delivery. Here we don't go into details in this episode. What we learn from this protocol, is that first, if we fail at one step of an operation, we can roll back. The design philosophy is, we will handle all exceptions, we don't mind what exception we have to handle, but we will roll back to the starting point. Depends on the relationship of the sequential steps, we may choose re-do all or just re-do one step in question.

References:
baike.baidu.com/view/1199185.htm
http://en.wikipedia.org/wiki/Sliding_window_protocol

Transactional Programming Episode One
IV A Simply Rolling Back Example

20150430

We showed CatchMeNot's design fallacy. One party as the jober may concern "job 3" is done for "howManyYouConsiderMany". Another party as the jobee may concern "Eod pck". There will be exceptions that may affect the mutual goal (at the least the intersection shares a chunk of common interests). We use roll-back-to-start, handle all exceptions and ignore the exceptions' types. So the program can run many days without a halt. .