Recently, I have been learning lots of interesting stuff, not directly related to db2 or database administration. I have been poking around ruby, reading about JSON, and been curious about couchdb. I wanted to test all these things out in a mini project.
Without any practical use in mind, rather than just trying stuff out, I decided to make a db2 analytics tool. Yes, yet another db2 analytics tool, because I also wanted to somehow tie ruby/json/couchdb back to my database administration. Couchdb is a schemaless database with map/reduce making it very strong in analytics. It will be the datastore for the JSON values converted using ruby from a datasource. The datasource in this case comes from db2pd(it could be from get snapshots or from sql tables, db2diag logs, etc).
The workflow basically starts with a db2pd output, which is then converted to JSON, and the stored on couchdb. Converting to JSON makes it very flexible, where it can easily be made into an object for your object oriented programs. It can easily be stored in a plain old database table using an object relational datamapper of somekind. There are a lot of things to can convert it to once its in JSON.
The first db2pd output I will try to do analytics will the the db2pd -appl sampling output. My objective is to determine the connection states(UOW Waiting, Lock-wait, Executing, Compiling, etc) by day and by hour. Maybe determine the breakdown of the statuses by a day of the week or hour of the day. This should be a good way to learn map/reduce.
On the next post, I will try to create a db2pd parser and converter. If there is anyone who is familiar with ruby and want to help me out with tips on how to accomplish this, please don't hesitate to make yourself known in the comments