home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / perl / 5367 < prev    next >
Encoding:
Text File  |  1992-08-18  |  2.4 KB  |  55 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!usc!rpi!batcomputer!cornell!uw-beaver!fluke!gtisqr!roger
  3. From: roger@mav.com (Roger Droz)
  4. Subject: Re: Any portable way to get round...
  5. Message-ID: <1992Aug18.185755.21870@mav.com>
  6. Summary: gdbm has fewer arbitrary limits, but has multi-user restrictions.
  7. Organization: Maverick International Inc.
  8. References: <1992Aug9.204433.13995@news.uit.no> <ASHERMAN.92Aug10125542@laser.fmrco.com>
  9. Date: Tue, 18 Aug 92 18:57:55 GMT
  10. Lines: 43
  11.  
  12. In article <ASHERMAN.92Aug10125542@laser.fmrco.com> 
  13. asherman@laser.fmrco.com (Aaron Sherman) writes:
  14. >>>>>> tomg@stud.cs.uit.no (Tom Grydeland) said:
  15. >tomg> Subject: Any portable way to get round...
  16. >tomg> ...the limitation of one block per key/value pair and all
  17. >tomg> key/value pairs that hash together? I want to use the dbm/ndbm
  18. >tomg> format [...]
  19. >
  20. >Try linking perl with gdbm. I don't know that this will help, but in
  21. >general the GNU folks have been good about eliminating arbitrary
  22. >limitations.
  23.  
  24. gdbm is a disk space win.  It uses an extensible hashing technique
  25. that does create sparse (in the unix sense) files.  More blocks are
  26. allocated as needed to spread things out when too many keys hask
  27. together.
  28.  
  29. The downside of gdbm is that it doesn't permit concurrent writers or a
  30. writer to co-exist with a reader.
  31.  
  32. Perl dbmopen first trys to open the database for read/write.  Failing
  33. that, the dbmopen is retried for read-only access.  dbmopen succeeds
  34. in either case.
  35.  
  36. When gdbm is linked into perl, the second opener fails because the
  37. first opener was granted exclusive access to the database
  38. (whether he wanted to write or not).  I hacked our perl to pay
  39. attention to the mode argument when opening existing databases.  Thus
  40. our perl supports concurrent readers of gdm databases.
  41.  
  42. Does anyone have the way of supporting concurrent writers of gdm
  43. databases?  Do dbm/ndbm support concurrent writers?
  44.  
  45. (Email me a copy of replies you post.  Our newsfeed hasn't been reliable
  46. lately.)
  47. ____________
  48.                Roger Droz                  Domain: roger@mav.COM           
  49. ()       ()    Maverick International      UUCP: uw-beaver!gtisqr!roger
  50.  (_______)     8217 44th Ave West          Bell: (206) 743-6659
  51.   (     )      Mukilteo, WA 98275
  52.    |   |                         "We're all mavericks here: 
  53.    |   |                         Each of us has our own opinions,
  54.    (___)                         and the company has yet different ones!"
  55.