home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.21 / text0166.txt < prev    next >
Encoding:
Text File  |  1990-10-26  |  5.4 KB  |  101 lines

  1. Submitted-by: jason@cnd.hp.com (Jason Zions)
  2.  
  3. For 1003.8 Subset TFA, it is (in my understanding) the working group's
  4. intent to provide interface hooks to permit an application to be written
  5. portably and in such a fashion as to work correctly over *any* file sharing
  6. mechanism providing semantics at least as powerful as those required by
  7. what we're calling "Core TFA". The Core is weaker in semantics than NFS,
  8. certainly; it is roughly equivalent in power to FTAM using a very
  9. restricted set of FTAM File Types (by design!); it can be made to fit on
  10. top of the DOS filesystem.
  11.  
  12. Common practice is to simply hack and tweak one's implementation to fit
  13. over this whole set of weaker filesystems. Common practice is not to warn
  14. programmers that files accessed over some network file sharing mechanism
  15. might behave *differently* from files accessed locally. Common practice for
  16. most non-POSIX filesystems is to use obscure or proprietary interfaces for
  17. controlling those interfaces, when control interfaces are provided at all.
  18.  
  19. We expect to tie into 1003.1 and 1003.4 mechanisms to permit applications
  20. to be written to use standard interfaces to control things. Use pathconf()
  21. to tell if a particular file access semantic from 1003.1 is available. Add
  22. a new interface giving an application control over whether it can access
  23. files over mechanisms not supporting Full TFA.
  24.  
  25. We expect to *clearly* delineate in the Subset TFA standard *exactly* what
  26. semantics some interface must provide if it claims to support a particular
  27. semantic feature. An application can say "If I open and unlink this file,
  28. will I retain access in all circumstances until I close it?" and get a
  29. meaningful answer.
  30.  
  31. We looked at the gap between Full TFA (i.e. 1003.1) and Subset TFA (based
  32. on FTAM) and broke it down into a set of logically-related behaviors. We've
  33. called these sets "functional blocks". Many of these functional blocks are
  34. tied into constraints in 1003.1; if a mechanism does not claim to support
  35. one of those functional blocks, the meaning is that some constraint within
  36. 1003.1 has been relaxed under this mechanism. The list of functional blocks
  37. we're currently looking at can be found in 1003.8 D3, available from the
  38. usual source.
  39.  
  40. The programming model for Subset TFA is based on inquiry about guarantees.
  41. On a 1003.8-compliant system, no application is permitted to perform
  42. operations on files not supporting full 1003.1 semantics *unless and until*
  43. the application *specifically* authorizes such subset behavior. That
  44. authorization can be granted process-wide or on a file-by-file basis.
  45.  
  46. Once subset semantics are authorized, the implementation permits access to
  47. any file whose access mechanism supports *at least* Core Subset semantics.
  48. The application is _a_priori_ guaranteed only those Core semantics. For a
  49. given file, the application can inquire about what other semantics above
  50. and beyond Core semantics are guaranteed by the mechanism used to access
  51. the file. If an application doesn't like the semantics available  for a
  52. given file, it knows up front; it can bail out, use workarounds, whatever.
  53.  
  54. Example: An unmodified 1003.1-compliant application, running on a system
  55. providing the 1003.8 interface, will *never* be permitted to operate on a
  56. file whose access mechanism fails to provde full 1003.1 semantics.
  57. (Operations will fail with a new error; I think we're looking at using
  58. EOPNOTSUPP.)
  59.  
  60. (You realize, of course, that *something* ceases to conform whenever a
  61. strictly-conforming POSIX application opens an NFS file on a POSIX system;
  62. that application ceases to receive semantics guaranteed by 1003.1. Who's at
  63. fault: the system, for permitting the application to open the file, or the
  64. application, for not making sure it gets what it thought it got?)
  65.  
  66. Example: A 1003.1-compliant application, which has had a single call added
  67. to it to authorize subset-semantic behavior but has had no other
  68. modifications, will be permitted to operate on any file whose access
  69. mechanism provides at least Core Subset semantics.
  70.  
  71. (Many programs will be written just this way. We're wrestling with some
  72. issues here: Should process-wide authorization be inheritable over fork()?
  73. We think yes. Over exec()? We think not. Should there be an external
  74. authorization mechanism not requiring code changes and recompiles? We don't
  75. know.)
  76.  
  77. Example: An application might need only the ability to seek to an arbitrary
  78. location in a file and write at that point. It would first open the file,
  79. authorizing subset semantics. It might then inquire (using pathconf()) if
  80. the mechanism used to access the file supported seeks. If so, it would
  81. simply seek, write, and close.  Otherwise, it might open a temporary file
  82. in the same directory as the source, copy the contents of the file up to
  83. the seek point, then write the data it wanted to, then write the rest of
  84. the source; finally, destroy the source file and move the copy on top of
  85. it. Behavior is the same, but performance is lower in the second case;
  86. nonetheless, the application can be written *portably* to behave in the
  87. most efficient manner possible.  (Note that FTAM Type 1 files do not permit
  88. arbitrary seeks. Note also that most Unix####POSIX filters do not need
  89. seeks.)
  90.  
  91. That's what we're about. Please remember the usual disclaimer; although I
  92. chair 1003.8, my word is not law; I may have misunderstood the group's
  93. direction, or the technical content of the draft. I am not speaking on
  94. behalf of the entire working group.
  95.  
  96. Jason Zions
  97. Chair, 1003.8 POSIX Transparent File Access
  98.  
  99. Volume-Number: Volume 21, Number 166
  100.  
  101.