Re: [sf-perl] Practical theory: graphs

From: Quinn Weaver <qw(at)sf(dot)pm(dot)org>
To: San Francisco Perl Mongers User Group <sanfrancisco-pm(at)pm(dot)org>, SF Postgres <sfpug(at)postgresql(dot)org>
Subject: Re: [sf-perl] Practical theory: graphs
Date: 2005-12-22 17:43:05
Message-ID: 20051222174305.GB97428@cfcl.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

Hello from Indiana. :) I've been away from email for a bit. I just
gave a proper read to the article, http://www.varlena.com/GeneralBits/65.php.

The article makes a great deal of sense. It's very lucid and easy to
follow (even for someone like me with barely a passing knowledge of
PL/pgSQL). It even presents one algorithm and code for "reparenting"
menus.

I think this is what I need. I'm quite gratified that it's all
set out and ready to use.

On Mon, Dec 19, 2005 at 11:16:17AM -0800, elein wrote:

> I would be interested to hear how this is different
> from your phone tree model needs.

In short, it's not. The only reason I might want to deviate from your
model would be to use a "graph-based" storage system (as opposed to an
RDBMS). But I'm not convinced that I should do that.

The pro of an RDBMS approach is data integrity. If I write a dialplan
to the database, I can be sure it will not be corrupted if (e.g.) the
system goes down in the middle of the reordering process.

The con is that it is trickier to manipulate records in a database
than objects in Perl (at least for me). However, as the article shows,
it's not that much trickier.

It seems to me that safety wins out over False Laziness, so I am
leaning towards the RDBMS approach.

In other words, I have repented of what I wrote earlier:

> In a sense, the system of record is the actual running "dialplan" (my
> preferred term for the "voice maze" or set of menus). Maybe I
> shouldn't be duplicating the dialplan in an RDBMS. It's already read
> in from an XML file (usually dynamically generated), so why complicate
> things?

... though I reserve the right to backslide. ;)

> Hmm. Some mails did not make it through on this thread.

You're right; I seem to have omitted your article in my thread
summary. My apologies; it was a mistake. I'm not sure how that
happened--especially since it's one of the most useful things
in the thread. ;)

--
qw (Quinn Weaver); #President, San Francisco Perl Mongers
=for information, visit http://sf.pm.org/weblog =cut

In response to

Browse sfpug by date

  From Date Subject
Next Message Quinn Weaver 2005-12-28 03:09:51 Video projectors?
Previous Message elein 2005-12-19 19:16:17 Re: [sf-perl] Practical theory: graphs