in reply to Re: Re: (jeffa) Re: flocking databases
in thread flocking databases

Usually i am good about saying stuff like "here is some more advice to go along with diotalevi's even more excellent advice." This time i didn't. bad jeffa.

diotalevi, if you are upset that sulfericacid did not take your advice to use BerkeleyDB, then i am sorry that i carved a "path of least resistance" for sulfericacid. That is not what i meant at all. Since sulfericacid did not (apparantly) know about anything about file locking at all, i thought "why not ask him to read one of our tutorials?" I think you would rather sulfericacid had read that tutorial than not ... now sulfericacid has some background to work with. That's good.

sulfericacid ... now that you know about file locking, you really should give BerkeleyDB a whirl. Then, once you have mastered that, try out the even cooler SQLite (by the way ... DBD::SQLite is merely the Perl driver for SQLite). SQL is indeed a hurdle you have to spend time to overcome ... but once you learn it, when the time comes to start using a real RDMS (Postgres, MySQL, Oracle, etc.) you will already be ready for it.

Oh, and since no one has said it yet ... turnstep++ for her excellent tutorial. ;)

jeffa

"The path of least resistance always leads you to the least everytime." -- Ty Hagar

Replies are listed 'Best First'.
Re: (jeffa) 4Re: flocking databases
by diotalevi (Canon) on Apr 14, 2003 at 14:46 UTC

    I did read the tutorial you mentioned in the hopes that it would mention things like the tie/open prebuffering issues associated with dbm files. I would have been very happy to upvote you and recommend your node if that critical bit of information had been present. As written, however, it encapsulated the fatal flaw with applying flock() knowledge to locking dbm-style databases.

    So I was upset that you perpetuated a bad-meme. I recommend BDB because if I use it then I don't have to remember how to do this safely (as long as NFS isn't involved anyway) and can delegate the task to the database/database wrapper.

    That was it. I also picked on you because sulfericacid responded to your post and it looked like s/he might actually use that knowledge which would be a bad idea. Oh and sulfericacid - that tutorial is perfectly valid and good if you're dealing with normal files and you use things like open/close/readline/etc to work with it. The issues I'm raising and that you're falling over are (to my knowledge) restricted to dbm-style databases.