HP3000-L Archives

November 2002, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ken Hirsch <[log in to unmask]>
Reply To:
Ken Hirsch <[log in to unmask]>
Date:
Thu, 21 Nov 2002 13:20:28 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
Wirt Atmar writes:
>      2. Once done, COPY (filecopy) the source file into the watched
> folder/group. This is generally a very high-speed process that will run at
> the speed of the host's backplane.


Even better is to rename the file, which is an atomic operation.  You have
to make sure that the rename will succeed (same volume/file system/etc).

It avoids this problem:

> The only failure mode that we've been able to induce using tests to create
> maximally likely conditions of conflict is one where the FTP process
manages
> to get it's transfer request in during that very tiny window when the new
> file's name has just been entered into the directory but writing has not
yet
> begun into the new file. At that point, there is no exclusive writer
process
> holding off other openers, thus we "transfer" down a zero-record file and
> then mistakenly delete the file from the server.


I always recommend including some kind of explicit end-of-file marker if at
all possible.  XML's well-formed syntax constraints also serve this purpose.
Encryption can also serve as an integrity check in addition to providing
security.  I always do a syntax check before I delete the source file.


The protocol for reliable notifications is simple, but I wish there was a
widely available protocol at the application-level that supported it.  TCP
does it at a lower level.  It is just this:
   The sender is responsible for sending and resending until it gets a
positive acknowledgement from recipient.
   Unique identifiers are used so that duplicates can be detected and we are
sure acknowledgements are for the right "packet".
    Receiver acknowledges but discards duplicates.
    (CRC/checksum may be necessary if not provided at lower level)

BEEP does this, but it's not widely available yet.  Some have derided BEEP
as TCP over TCP because (since it implements multiple channels over one TCP
connection) it has to re-implement congestion control.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2