Wednesday, March 16, 2011

PDQ Models: Show Me the Code

The road to hell is paved with good intentions

During a recent exchange with a potential PDQ user, that occurred as a sequence of blog comments related to my earlier post about getting started wtih PDQ, I thought we were very close to converging on the appropriate queueing model for his problem, and that it would make a nice addition to the models discussed in my Perl::PDQ book. In fact, I thought the model looked like this

which involves a feedback flow of requests to the Authent-ification server.

I started to construct such a model in PDQ-R. However, during the exchange, while trying to determine some modeling parameters that would allow PDQ to solve, the model description and its goals became more and more muddled. In fact, that's why I don't normally engage in this kind of discussion as back-and-forth blog comments. Things are usually much more complicated than they seem, I can't read your mind and you don't have my expertise, so the downward spiral begins. But, on this occasion, it felt like we were close and it would work out quickly. I was wrong, but no harm done because it forced me to spell out some rules for addressing such situations in the future:
  1. Join the Guerrilla CaP forum to discuss PDQ.
  2. Show me your PDQ code.
  3. A diagram would also be good.
At the moment, I don't really see enough PDQ questions to warrant establishing yet another Google Group forum. So, for the time being, the GCaP forum can serve as that place.

Regarding item (2), using tools like Excel is fine for prototyping and otherwise playing around to get your bearings, but ultimately everything has to fit together rigorously in order to believe your modeling predictions. Just attempting to express your modeling conceptions in some flavor of PDQ code will get you most of the way there. After all, PDQ is essentially just a list of function calls.

We recently went through a similar exercise where a somewhat subtle bug was discovered in PDQ. That discussion, along with the corresponding PDQ code (written in python PyDQ), was carried out in the GCaP forum. But, as I said, I thought we were converging faster in this case and didn't need to go to that extent.

Item (3) is an ongoing topic. I've always resisted putting a GUI onto PDQ and I haven't changed my mind on that score, but this episode made me think of a completely different approach, about which I'll say more in another post.

Bottome line: If you want to discuss your PDQ models, come and join the GCaP forum and bring your PDQ code.

PS: I still have a hunch that the above diagram might be the correct PDQ model.

No comments: