Funny you should mention PDQ and Ruby. One of the people I work with
just got back from his class. If you look carefully in the distribution
(hints for finding it are on Dr. Gunther’s web page) you will find the C
code for PDQ, and it’s easy to wrap in Ruby or any other language. I
don’t know about the Python version, but the Perl version simply calls
the C code to do the real work.
He has a new book coming out very soon now. It’s been printed and
distributed in Europe, but it hasn’t started shipping in the USA yet.
PDQ is indeed “used for system performance modeling”. But the algorithms
are simple enough that you can code them by hand. And I see little
reason to rewrite them in Ruby if you can read either C, Perl or Python.
Funny you should mention PDQ and Ruby. One of the people I work with
just got back from his class. If you look carefully in the distribution
(hints for finding it are on Dr. Gunther’s web page) you will find the C
code for PDQ, and it’s easy to wrap in Ruby or any other language.
Yes, I figured someone might be interested in writing a Ruby/C
extension.
He has a new book coming out very soon now. It’s been printed and
distributed in Europe, but it hasn’t started shipping in the USA yet.
It’s available in the US. I saw it at a Borders Bookstore.
PDQ is indeed “used for system performance modeling”. But the algorithms
are simple enough that you can code them by hand. And I see little
reason to rewrite them in Ruby if you can read either C, Perl or Python.
And for the people who can’t, it would be nice to have a Ruby binding.
I don’t really like the algorithms in PDQ. They’re way too limited –
essentially, Gunther makes you code everything in raw Perl except the
“vanilla” open circuit and closed circuit solvers.
Gunther’s books have a few tidbits none of the others have, but it’s
more “here’s the formulas, here’s a bunch of Perl code, and here’s how I
solved problems with it.” And they’re pretty hard to read relative to
some of the others. His class, on the other hand, is excellent. He’s
really the only one outside of a university setting that teaches this
kind of material, at least in the USA.
So … rather than re-implement PDQ in Ruby – which I’m sure someone
else will take on – I decided to switch authors, books and
algorithms. Specifically, I’ve based SPQR (Stuff for Processing
Queuing models in Ruby) on the multi-class open and closed network
solvers with load dependent service centers in Performance By Design,
by Daniel A. Menasce, Virgilio A. F. Almeida, and Larry W. Dowdy.
I just posted the Rakefile, the main Ruby code and the RSpec “spec” file
– I’m attempting to learn behavior-driven design with this code. Right
now, all that’s there is the closed network solver and one test case
taken from an earlier book by the same authors. I’m hoping to get the
open network solver running over the weekend. The code isn’t very well
documented, but the book has all the gory details anyway. It’s badly in
need of refactoring as well; some entities in the algorithm are
“naturally” two-dimensional so the way I factored things doesn’t always
make much sense.
So … I hate to make everyone buy another book, but, well, that’s life
when you’re a performance engineer.
P.S.: I was originally going to call it “RubyQueues” but I discovered
there’s already a “Ruby queue”, so I scrambled around for another name.