Programming Republic of Perl, the Windows story

Task: port Kronometrix from Linux, FreeBSD to Windows platform, including all data recorders and the transporter. Preferable use a programming language, like Perl to easy the porting process and re-utilize whatever we have already in Kronometrix.

Timeline: ASAP

Open Source: Yes


Goals

Some top rules for developing the new recorders:
  • all recorders, must be coded in a scripting language
  • preferable, all recorders must work as CLI and Windows services
  • all raw data, should be easy to access, via C:\Kronometrix\log\ , no more mysteries about AppData directory
  • transporter should be done similar way, coded using a scripting language
  • memory footprint 64MB RAM

Perl5

We been experimenting previously with C/C++ for Kronometrix on Windows. Nothing wrong with C/C++ except, that for every small change we had to do a lot of work & testing. We looked to PowerShell and other langauges but nothing came closer and felt like home, than Perl.

All our data recorders are simple Perl5 citizens already, so why not to have Kronometrix on Windows done in Perl too !?

After some research and coding we found a very powerful module, Win32 which was capable to speak WMI and access almost anything from a running Windows system. That's it. Enter Perl. We selected ActiveState PDK to compile each .pl to a Win32 executable service. Nice and easy.

A simple Win32 service sample, in Perl5 using PDK:

Win32 Perl Service


Windows

Here, 2 main data recorders, and sender, the transporter, running on top of Windows 2008 Server, as services:


Kronometrix Windows Services


Source Code

Visit our repository to see and check out, our Windows data recorders. This is work in progress , more recorders will soon be published and released.

Comments

Popular posts from this blog

Asus Zenbook and FreeBSD 11

Raspberry Pi and Redis

Web Performance, tell me the story