Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site bu-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!bu-cs!bzs From: bzs@bu-cs.UUCP (Barry Shein) Newsgroups: net.lang.c Subject: Record Locking Message-ID: <183@bu-cs.UUCP> Date: Wed, 19-Feb-86 20:54:49 EST Article-I.D.: bu-cs.183 Posted: Wed Feb 19 20:54:49 1986 Date-Received: Fri, 21-Feb-86 07:03:09 EST Organization: Boston Univ Comp. Sci. Lines: 23 >From: cottrell@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