Skip to main content

Posts

Showing posts from July, 2008

Perl, Win32 API and COM automation

Lots of people (me amongst them) use Perl modules on Windows that interface with the Win32 API and the most usual problem is with Unicode since some modules call the Ansi functions and not their Unicode equivalent counterparts. Not only this, but the actual job that they are after can be achieved much easier by using facilities readily provided and embedded within Windows itself. Specifically the COM automation is a great tool for performing myriads of activities, be it monitoring all aspects of the system using WMI, monitoring an Active directory environment using ADSI, working with files (most Unicode related problems start here) with Filesystemobject or fiddling with the network and DCOM using WSH. The automation abstracts the API , makes work easier and is more tolerant to errors in contrast to their API counterparts. All of that can be used through the Win32::OLE module. I'm not saying not to use modules that interface with the API, there are many cool ones,and speciali

Ingres resource limiting : Part4 (Final Thoughts)

ABF is not used widely today as it is considered legacy, but with the advent of OpenRoad these techniques can be applied to modern day applications, as only minor modifications of the ABF/4GL code are required for transiting to the OpenRoad environment. The rationale behind this project was to use the QEP or the ingres resource limiter as means of making decisions on the fly; whether or not to execute a query based on the results fed back by the optimizer. Usually a QEP is used for identifying problematic queries using procedures as described in the very good article A Procedure to Identify and Fix Long running Queries which requires monitoring the system and analyzing QEP's offline but here I am trying a proactive approach. This could be useful for identifying and not allowing heavy querys to run during peak hours on an already loaded server. The platform used for both testing and production was Ingres II 2.6 on SCO Unix The error handling procedures as far 4GL/ABF goes :