multi.htmTEXTBlWd ЮJNJNqm Multi-user issues

Back to index


Multi-user Issues

STATUS AS OF v1.2

SunOS

- works fine with default locking, multiple readers & 1 writer
- explicit locking works with multiple writers

Mac

- works fine with default locking, multiple readers & 1 writer
- explicit locking works with multiple writers

Windows

- dunno
- tried testing on single machine (WFWG3.11) and can't get test program to yield enough time to start a 2nd copy - HELP!

SETTING MULTI-USER ACCESS MODES (exposing c-tree)

The initial release of multi-user is based on c-tree's filesharing model (the FPUTFGET model). The main thing to do to build a multi-user version is to link with multi-user libraries, and ensure OOFILE is compiled with a ctoptn.h which matches your libraries (ie: FPUTFGET defined).

In beta1.02 a simple mechanism has been adopted which varies the file open settings depending on #ifdef FPUTFGET but allows you to override those settings.

At the top of oofctree.cpp is the definition of two static variables:
dbConnect_ctree::sFileMode OOF_tableBackend_ctree::sFileMode

These SHOULD be adequate for most circumstances, however you are able to assign to them if you want to change the settings. Please make such assignments in your own code, BEFORE the dbConnect::newConnection or openConnection calls.

The dbConnect_ctree::sFileMode controls the file mode used for opening the superfile containing the database as well as various special files within the database.

The other sFileMode is used to open the fixed length files used for user storage and the BLOB file used to store all variable length fields. If you wish (for example) to or in CHECKLOCK then just changing this setting would affect all files.

ONE WRITER, MANY READERS

The default locking behaviour of ctree will cope with this situation without any explicit locking - just set the ctoptn.h FPUTFGET so you are in multi-user mode.

LOCKING

The current simple approach is to let you turn locking off and on in your application. It has proven difficult for automatic locking at the table level without more feedback from the testers as to how they need this to work.

The simple enterWriteLocking, enterReadLocking and exitLocking calls are all performed on your database connection.

PROPOSED NEW METHOD FOR SETTING MULTI-USER and OTHER BACKEND PARAMS

What I'm going to do is give you a way to override the default ctree file open settings - this seems to make a bit more sense right now than trying to provide my own multiple file-open models, that don't make much sense for other environments.

The way I was thinking of doing this was to introduce a "backend settings" class. You would then create a ctreeSettings subclass of this with the various file options (and other items as we think of them). This settings object could be used for all files, or just a few, making it easy to standardise.

Once given the ability to set the ctree file open settings, you can then directly use their transaction calls.

This "settings bundle" could also contain instructions to specific tables to store them outside the superfile, use mirrored storage etc. I'd welcome suggestions to other features you'd like control over.


Back to index


vvZH0tN"` LA L NuH0$BB multi.htmPartSIT!PartSIT!uDNDNuNuNVH8&n$kx?<$NPJTOgJ+nfp`p R hWDHHJ-$f/ NXOg RA4Cp"Q2 R6(HS`jR  w%w%w%    w%w%w%  "a/Q%  w%w%w%-  .  w%w%w%5  6  w%w%w%A  B  w%w%w%y   w%w%w%   w%w%w%  w%w%w%   w%w%w%   w%w%w%  +  w%w%w%/  ^  w%w%w%g j  w%w%w%t    w%w%w%    w%w%w%   w%w%w%    w%w%w%     w%w%w%   w%w%w%    w%w%w%    w%w%w%    w%w%w%    w%w%w%    w%w%w%    w%w%w%    w%w%w%   w%w%w%  a  w%w%w%j q  w%w%w%{  [  w%w%w% `   w%w%w%     w%w%w% )    w%w%w% !  N  w%w%w% S   w%w%w%    w%w%w%    w%w%w%   w%w%w%    w%w%w%    w%w%w%   vvZ0rZstylsoup&88592242@