Showing entries 1 to 10 of 44
10 Older Entries »
Displaying posts with tag: HP (reset)
School of Herring

My former boss, Marten Mickos, has created an excellent new resources for early stage founders, managers and execs called Each post has a short write up and often a 2-3 minute video covering a topic such as giving feedback, Peter Drucker's principles of good management, what it takes to build an effective team, hiring for strength etc. Some of these topics are very practical, like how to send good email, others are more thought-provoking, such as the notion that …

[Read more]
Live Kernel Patching - Why You Should NOT Use It

Just under a year ago on my old blog I discussed and even demoed the new Linux live kernel patching solutions. I was reviewing these technologies out of my own curiosity as well as HP's Advanced Technology Group having an interest. I think these technologies are great, I am personally more of a fan of the user experience of RedHat's kpatch solution but any solution is a great technical achievement.

Having said this I believe that the use case for this technology is quite narrow. Last time I looked into these technologies only patches that affected the code of functions could be modified. Changing structs and data definitely didn't work and I suspect that changing function declarations was also dangerous. There is also a performance …

[Read more]
C Library Visibility

I was surprised by the recent announcement that MySQL are going to start to conceal the hidden function calls in their C connector. Surprised because although this is great news I had expected them to do this years ago. Working for HP's Advanced Technology Group I realise I take such things for granted. For this blog post I'm going to talk about why it is important and how to do it.

So, when you create a dynamic library in C the default thing that happens is every function call in that library effectively becomes a potential API call. Whether you document every single function or not to make it official API is up to you but I suspect in 99.99% of cases there are private functions you don't want users to mess with. Additionally holding the symbol information for every function so that you can link your application to it takes a …

[Read more]
Why JSON is bad for applications

Today I read an article about how company X has improved things by amongst other things ditching JSON after 2 years of using it. Before I start on this subject I should say that JSON does have its place. If you have a web application where a browser is talking to a web server and in particular uses JavaScript then JSON is a good fit.

I've discussed this issue several times before with Brian Aker who works with me at HP's Advanced Technology Group and in the past I have been hit with the issues I'm going to talk about here.

JSON is human readable and easy to parse, that cannot be denied and for prototyping is good in a pinch. The first problem comes when you need to validate data. I've been stung many times by one end trying to read/write the JSON in a slightly different format to the other end, the end result is always not pretty. This is one advantage that XML and SOAP has going for it …

[Read more]
libAttchSQL Hits First GA!

We have come a long way since the first code was put down for libAttachSQL on the 4th July. It has been a fantastic project to work on so I am very pleased to announce our first GA release.

For those who haven't seen it so far libAttachSQL is a non-blocking, lightweight C API for MySQL servers. It is Apache 2.0 licensed so is compatible with most Open Source and commercial licensing. HP's Advanced Technology Group saw a need in this field not just for HP itself but for other companies and projects too.

As for the GA release itself, there are not many changes over the RC release beyond stability fixes. A full list can be seen in the version history documentation.

In addition to the GA release we have recently had a driver for …

[Read more]
libAttachSQL Single Thread vs. libmysqlclient Multi Thread

I have recently posted up benchmarks of libAttachSQL vs. libmysqlclient using sysbench. Whilst these are great and shows the results I hoped for, this isn't what we designed libAttachSQL for. It was designed for non-blocking many connections per thread.

With this in mind I spent today knocking up a quick benchmark tool which replicates the Sysbench "Select" test but using libAttachSQL's connection groups on a single thread. The code for this can be seen in the new AttachBench GitHub tree. Of course the secondary reason for this is to try and hammer the connection groups feature, which of course did find a bug when I scaled to around 32 connections. This has been fixed in libAttachSQL's master ready for …

[Read more]
libAttachSQL 0.9.0 RC - Connection Groups

It has been just over 4 months since I started working on libAttachSQL for HP's Advanced Technology Group. Today marks the first (and hopefully only) RC release of the library.

Connection Groups

The only real new feature that has been added to 0.9.0 is the concept of connection groups which is something I'm pretty excited about. Internally libAttachSQL uses event loops to supply the non-blocking API. Connection Groups join a bunch of connections together into a group that uses a single event loop. This makes things much more efficient internally and makes applications easier to code too.

Here is a simplified example of how to use it (for a more detailed example see our example in the documentation).

First we need to create the group and add connections to …

[Read more]
libAttachSQL Second Beta, After the Sledgehammer

Last week I blogged about getting sysbench working with libAttachSQL. This was not only an exercise in performance but also the first real test for libAttachSQL.

Before I had done this testing the most the early Alpha and Beta releases of libAttachSQL had gone through is a few basic queries. So, the first thing I did when I got the sysbench driver working was slap it with 1,000,000 queries. It pretty much exploded instantly on that. Over the course of this release I have probably hit it with over 100,000,000 queries and things run a lot smoother.

This has led to today's release of libAttachSQL 0.5.0. As far as changes go this release has the biggest changelog so …

[Read more]
libAttachSQL Benchmarks With Sysbench

This week I have been spending a little bit of time creating a module for Sysbench so that it can use libAttachSQL as a database driver. The reason for doing this is twofold:

  1. Brian (my boss at HP's Advanced Technology Group) said now would be a good time to benchmark libAttachSQL
  2. I really needed more than a few basic queries to shake out bugs in the library, and a benchmark is a good way to shove a few million through it

On the bug front, it did find a total of 5 bugs, a couple of them serious. Which is great, the more testing and bug finding the better. These have all been fixed in GitHub and will be part of the upcoming 0.5.0 release.

The Test Setup …

[Read more]
libAttachSQL Query Example

I was asked some questions on IRC last night about how the query example in libAttachSQL's code base works. For those who missed previous posts, libAttachSQL is a lightweight, non-blocking, Apache 2.0 licensed C connector for MySQL servers which I am developing for HP's Advanced Technology Group.

In this blog post I'm going to break down a basic query example and explain what is happening at each step. It is possible that this syntax may change slightly by the time we hit GA but it will be similar to this.

#include <libattachsql-1.0/attachsql.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>

Only one include is needed for the library itself, libattachsql-1.0/attachsql.h. The others are used for other functions in the code. …

[Read more]
Showing entries 1 to 10 of 44
10 Older Entries »