Tuesday, September 16, 2008

Events that have occurred

So a lot has happened over the past few months. 
  • I left one job and started a new job as a programmer/data center admin at a company called Clarity Technology Group.  It's a much smaller company than what I had been at & is a work environment better suited to me.
  • I've discovered that fresh vegetables are very helpful when you're trying to go on a diet.
  • I've decided to improve my >2:1 ratio of blog drafts to blog posts.
  • I've started writing bindings to VMWare's VIX API in Haskell.
Now as for the VIX bindings, I haven't gotten very far yet but I have to give a shout out to the writers of Real World Haskell for writing a rather excellent introductory chapter on Haskell's FFI.  It's a lot less scary than I thought it would be and that's a credit to the authors.  I consider teaching to be the art of making things seem as simple as they truly are, and their explanation certainly succeeds there.

Also, as a general question to the Haskellers out there:  does anyone have experience calling WMI from Haskell?  Are there bindings that are useful for this task?

10 comments:

Antoine said...

What the heck is WMI?

(I could Google it, but this is somehow easier.)

Creighton Hogg said...

Windows Management Instrumentation
It's a way to measure & do an awful lot of stuff on both your local & remote windows machines. It's extremely useful for managing systems, but I think it'd be a fun showcase if I could do all my throw away WMI scripting in Haskell instead of vbs or C#.

Antoine said...

Hmmm ... it claims to be standards compliant and Wikipedia briefly mentions C, but I haven't found out anything solid from that angle.

Just powershell and .Net stuff.

Antoine said...

after more study, it looks like WMI is based on an open protocol WBEM.

This link talks about fetching WMI data using linux-based WBEM tools:

http://forums.cacti.net/about11752.html

I haven't read it, but since its going from one platform using WBEM to another using WMI, it might be useful.

Creighton Hogg said...

Interesting. Very different tack that I had been taking. I was going to look into Haskell COM bindings and use those to talk to the WMI service. I know there is some rough work on that front, but I have no experience with it yet.

Antoine said...

Here's a C WBEM client:

http://sblim.wiki.sourceforge.net/Sfcc

I have no idea what sort of state it's in.

It's sounds like it's based on XML/http[s].

Getting Haskell <-> COM into shape might be just as hard as writing native WBEM bindings, then you can write WMI on top of that.

I don't really know the details yet, so I have no idea ^_^

Antoine said...

The spec:

http://www.dmtf.org/standards/wbem/CIM-XML

If you want to read the DTD for the XML, I recommend running it through the DtdToHaskell utility that comes with HaXml. Much easier to read that way :-)

Antoine said...

Okay, so not as simple as I originally thought -

WMI uses the CMI stuff, but it does it over DCOM instead of HTTP.

So now I have no idea if that's something we can even just stuff XML onto, or what.

Creighton Hogg said...

Yeah, given how much I'm intimately tied with Windows I think I'm going to try and go the route of setting up the Haskell COM bindings I found on http://darcs.haskell.org/packages/hscom/

Anonymous said...

Interesting to know.