Record Locking
Barry Shein
bzs at bu-cs.UUCP
Thu Feb 20 11:54:49 AEST 1986
>From: cottrell at NBS-VMS.ARPA (COTTRELL, JAMES)
>Allow me to propose a kluge. Since on can create lockfiles of any
>name, create a parrallel directory /whatever/lock, and create lock
>files of the form `name#number' in that directory. Thus to lock
>record three of file `foo' create a lock /whatever/lock/foo#3'.
>Multi-record lox are more difficult, but can be done with a little
>head scratching. Yeah, it ain't pretty, but it just might work.
I have a better idea. Being as 4.2bsd can have up to 256 characters
in a file name and that most data-bases can live with less than 256
characters in a record (or a multiple, fixed record scheme can be
used, or even variable) why not just store the data in the file names
and leave the files empty (or fill them with change info or something.)
You can then use all those file searching things (like wildcards and
'find') as data-base queries, you can do 'record' locking etc etc.
Touch becomes the data-entry program, rm for removing, built in dates
of creation, modification, access, ownership kept in the inode, guaranteed
synchronous write-through on update, atomicity of record creation...
I know, shut up Barry, you've lost your mind again....
-Barry Shein, Boston University
More information about the Comp.lang.c
mailing list