home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / OOFILE / docs / multi.txt < prev    next >
Encoding:
Text File  |  1995-04-11  |  3.1 KB  |  73 lines  |  [TEXT/ttxt]

  1. multi.txt
  2. STATUS AS OF b1.02
  3.  
  4. SunOS 
  5. - works fine with default locking, multiple readers & writers
  6.  
  7. Mac
  8. - works if 1 Writer is first to access, allowing multiple Readers after
  9. - fails with permission error if open a Writer after any other Writer or Reader
  10. has opened the database
  11.  
  12. Windows
  13. - dunno
  14. - tried testing on single machine (WFWG3.11) and can't get test program to yield
  15. enough time to start a 2nd copy - HELP!
  16.  
  17.  
  18. SETTING MULTI-USER ACCESS MODES (exposing c-tree)
  19. The initial release of multi-user is based on c-tree's filesharing model (the
  20. FPUTFGET model). The main thing to do to build a multi-user version is to link
  21. with multi-user libraries, and ensure OOFILE is compiled with a ctoptn.h which
  22. matches your libraries (ie: FPUTFGET defined).
  23.  
  24. In beta1.02 a simple mechanism has been adopted which varies the file open
  25. settings depending on #ifdef FPUTFGET but allows you to override those settings.
  26.  
  27. At the top of oofctree.cpp is the definition of two static variables:
  28. dbConnect_ctree::sFileMode OOF_tableBackend_ctree::sFileMode
  29.  
  30. These SHOULD be adequate for most circumstances, however you are able to assign
  31. to them if you want to change the settings. Please make such assignments in your
  32. own code, BEFORE the dbConnect::newConnection or openConnection calls.
  33.  
  34. The dbConnect_ctree::sFileMode controls the file mode used for opening the
  35. superfile containing the database as well as various special files within the
  36. database.
  37.  
  38. The other sFileMode is used to open the fixed length files used for user storage
  39. and the BLOB file used to store all variable length fields. If you wish (for
  40. example) to or in CHECKLOCK then just changing this setting would
  41. affect all files.
  42.  
  43. ONE WRITER, MANY READERS
  44. The default locking behaviour of ctree will cope with this situation without
  45. any explicit locking - just set the ctoptn.h FPUTFGET so you are in multi-user
  46. mode.
  47.  
  48. LOCKING
  49. The current simple approach is to let you turn locking off and on in your application.
  50. It has proven difficult for automatic locking at the table level without more
  51. feedback from the testers as to how they need this to work.
  52.  
  53. The simple enterWriteLocking, enterReadLocking and exitLocking calls are
  54. all performed on your database connection.
  55.  
  56.  
  57. PROPOSED NEW METHOD FOR SETTING MULTI-USER and OTHER BACKEND PARAMS
  58. What I'm going to do is give you a way to override the default ctree file open
  59. settings - this seems to make a bit more sense right now than trying to provide
  60. my own multiple file-open models, that don't make much sense for other
  61. environments.
  62.  
  63. The way I was thinking of doing this was to introduce a "backend settings"
  64. class. You would then create a ctreeSettings subclass of this with the various
  65. file options (and other items as we think of them). This settings object could
  66. be used for all files, or just a few, making it easy to standardise.
  67.  
  68. Once given the ability to set the ctree file open settings, you can then
  69. directly use their transaction calls.
  70.  
  71. This "settings bundle" could also contain instructions to specific tables to
  72. store them outside the superfile, use mirrored storage etc. I'd welcome
  73. suggestions to other features you'd like control over.