Archive for the ‘Uncategorized’ category

LCFG profile querying

May 13, 2016

The new LCFG profile framework makes it simple to retrieve component and resource information from profiles stored in the various standard formats (XML, Berkeley DB and status files). Loading a profile from XML, DB or status directory: my $p = LCFG::Profile->new_from_xml(“example.xml”); my $p = LCFG::Profile->new_from_bdb(“example.db”); my $p = LCFG::Profile->new_from_status_dir(“/run/lcfg/status”); Loading a component from a DB […]

LCFG profile handling

May 13, 2016

Over the last few months the new libraries for handling LCFG profiles have been shaping up nicely. They are finally reaching a point where they match up with my original aims so I thought I’d give a taste of how it all works. Here’s an example of processing an LCFG XML profile into the Berkeley […]

Platform-specific config

January 13, 2016

I recently came across this blog article titled Stop writing code that will break on Python 4!. Although the title mentions python 4 it is really discussing “any future major version“. This is something we have learnt to deal with in LCFG over the years. We often have to tweak configuration slightly when developing support […]

Writing modern C

January 10, 2016

For the v4 LCFG client project I’ve been writing lots of C. To get my C knowledge up to scratch I’ve been consulting many books of varying vintages which leads to quite a mixture of coding styles. I’m quite keen to create code which is concerned “good” according to modern coding standards but I also […]

Security awareness

November 20, 2015

I recently came across a series of short blog posts from the SANS Securing the Human site on the topic of Security Awareness. I found them to be quite interesting and thought provoking. If you’re interested in what can be done to improve the security of an organization I’d recommend these as a good starting […]

LCFG XML Profile changes

August 20, 2015

As part of the LCFG v4 client project I am working on converting the XML profile parsing over to using the libxml2 library. Recent testing has revealed a number of shortcomings in the way the LCFG XML profiles are generated which break parsers which are stricter than the old W3C code upon which the current […]

MooX::HandlesVia and roles

August 20, 2015

I’ve been using Moo for Perl object-oriented programming for a while now. It’s really quite nice, it certainly does everything I need and it’s much lighter than Moose. Whilst working on the LCFG v4 client project I recently came across a problem with the MooX::HandlesVia module when used in conjunction with roles. I thought it […]

PostgreSQL new features

June 10, 2015

It looks like PostgreSQL 9.4 has some really interesting new features. Today I came across a blog post by 2ndquadrant demonstrating the WITHIN GROUP and FILTER clauses. I don’t think I’ve entirely got my head round the purpose of WITHIN GROUP yet, I suspect I need a couple of good real-world examples. The FILTER clause […]

LCFG::Component environment plugins

January 5, 2015

Version 1.13.0 the Perl version of the ngeneric framework (LCFG::Component) provides an all-new environment initialisation system for component methods. This has support for plugins which mean it is fully extensible. There is a new InitializeEnvironment method which is called for most standard methods which are accessible via om (including configure, start, restart, stop, run, and […]

Moo and Type::Tiny

December 14, 2014

At the start of 2014 I was working on a project to further improve the LCFG client. When I hit problems with Moose and its memory usage I discovered the excellent Moo framework which provides all the nice bits but is much less heavyweight. As part of the Perl Advent Calendar for 2014 someone has […]