Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TorgoX (1933)

TorgoX
  sburkeNO@SPAMcpan.org
http://search.cpan.org/~sburke/

"Il est beau comme la retractilité des serres des oiseaux rapaces [...] et surtout, comme la rencontre fortuite sur une table de dissection d'une machine à coudre et d'un parapluie !" -- Lautréamont

Journal of TorgoX (1933)

Friday March 08, 2002
05:39 PM

In it should be stuck a fork, because of it being done!

[ #3387 ]
Dear Log,

I writed an article for The Perl Journal! To appear in the next issue. It's called "Resource Locking Over Networks", an action-packed sequel to my "Resource Locking with Semaphore Files". So if you want to read it, subscribe and wait for it to come in the mail! Or email me and ask me really really nicely.

An excerpt:

«So let's use a concrete example here, such as should be familiar to all our readers. You're the Chief Technical Officer for XAOS, the worldwide consortium of supervillians. Among your many evil duties are coordinating the exchange of the staff phone number directory, phone.tsv. In an ideally evil world, you would have all the evil resources you'd need to build a solid network. But for years now, all available funds have been diverted to the construction of the giant orbiting death-ray, leaving you with only a ramshackle mess of legacy systems.

Notably, the chief of Henchman Resources, Generalissima Mok, personally updates the phone directory on a daily basis, as old staff are killed for their incompetence and others are promoted. She has learned to do this using FileMaker on an old Apple laptop running MacOS 7. You once meekly suggested that she use a web interface for maintaining the phone database, and the Generalissima reacted by torturing you with electric shocks until you promised to forget the whole idea.

She did, however, let you write and install a MacPerl program on her laptop to ftp the phone.tsv file from her Mac to the main server, and she dutifully runs the program after every evil update to the database. The meat of that program looks like this:

[...]

But the problem you quickly run into is that others might be downloading phone.tsv from the server just as she's uploading it, resulting in them getting a file that's truncated or garbled. This upsets people, since if they fail to find some friend's name in the phone directory, they assume he has been killed for incompetence. This leads to a tense work environment. You solve the problem of unnerving partial transfers by using a lock directory, like so: [...] »

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.