[sf-perl] [sfpug] Practical theory: graphs

Quinn Weaver qw at sf.pm.org
Thu Dec 22 09:43:05 PST 2005

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"

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

More information about the SanFrancisco-pm mailing list