IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

RE: solving the SFTP text mode issue



> The solution proposed works extremely well in the
> fixed length record cases -- in fact, I would say
> it is ideal.  It provides, fast, efficient, random
> record based access.

The question is: is there a need for random access to record-based files?

After some consideration, I think that the READ_RECORD/WRITE_RECORD proposal
is probably too enthusiastic. Implementing random access to files where
records are lines of text will be difficult on most platforms. Most
applications don't currently do random access in the first place, so it's
hard to imagine it being done much with records.

But if we dismiss random access, than the only remaining advantage of the
readrecord/writerecord proposal is that it allows LF to be embedded in
lines.

I think that Wei's proposal is the most balanced of all I've considered
today:

- It does seem to support all kinds of text files reasonably well, including
record-based text files. The latter is true as long as individual records
don't contain LF characters, which I assume is reasonable to expect from a
text file.

- It is simple to implement on Windows and Unix. It resembles the approach
taken by C/C++ standard libraries to solve the same problem. Translation
between CRLF and LF is simple. No convoluted algorithms to support random
access need to be implemented.




Home | Main Index | Thread Index | Old Index