Archive for 2007

MSG & OpenID update 2

Since my post last week, I’ve been trying to get the little bugs fixed up. For the first problem with LiveJournal OpenIDs, the reason turned out to be due to the fact that the parameters needed to be received by the LiveJournal server as a post request, and the association request was being sent as a get – hence the failure. This appears to be due to v1 of the OpenID spec stating that association request parameters should be sent in the post, but in OpenID spec v2 my reading is that parameters can be sent with either a get or post.

In the end I used a different library (openid4java) instead – I couldn’t figure a way to just ‘turn off’ the association requests (they are only optional) with the library I was using, and this appears to have fixed the issue with the delegation too.

So our OpenID server is using the JOID library but the MSG client is using the openid4java library

MSG & OpenID updates

Since my posting yesterday about allowing users to sign in to MSG with OpenIDs it seems that quite a few people have had a go… all good stuff… but has also highlighted the fact that there are still a few bugs that we need to get ironed out…

Firstly, that LiveJournal OpenIDs (eg alextlittle.livejournal.com) aren’t being accepted, haven’t quite worked out why this is yet 🙁

and secondly, that it’s not handling OpenID delegation – this one has only just been reported to me so will take a look when I get chance.

The OpenID login for MSG is still fairly experimental so cheers all for your feedback and keep it coming 🙂

MSG now accepts OpenID identities

MSG login page
New MSG login page

MSG will now accept OpenID Identity URLs to log in with. When you first log in with your OpenID identity you’ll be asked if you want to associate your OpenID with an existing MSG account, or you can create a new MSG account (without a password obviously!) .

As far as I’m aware MSG is the first instant messenger system to offer open registration and the ability to login with an OpenID identity (feel free to let me know if I’m wrong about this ;-))

I also have an OpenID server up and running (at: http://openid.open.ac.uk) and anyone is free to sign up for an OpenID identity with it, but please bear in mind that this is still an experimental service (I’m still tinkering!)

Next steps are some more testing and then having a look at trying one of the PHP OpenID libraries running as a consumer (plus making this blog OpenID enabled…)

OpenID server coming along…

I’m now quite close to having a (functioning!) OpenID identity provider server up and running. I’m using the JOID OpenID api and has been fairly easy to set up. What I’ve created is based on their example server application, but I’ve changed to using a database as the store and made the interface a bit prettier! I came across a couple of little issues, for example with logging in to LiveJournal, but managed to get these fixed up without too much hassle – the problems/queries I’ve had are posted up on the JOID-dev maillist – so I won’t repeat them all here.

The last few bits for me to finish off are allowing users to update their profile and to reset passwords, once that’s done I’ll post up the URL so people can have a play. Then I’ll be on to the task of allowing users to log into MSG using their OpenIDs 🙂

New blog design

You may or may not have noticed (depending on whether you’re using an RSS reader to read this) that I’ve updated my site design. Apart from the new colour scheme, I’ve tried to trim down the sidebar by not showing quite so many links! Anyway, any feedback, especially if you find any quirks in the new design, is much appreciated 🙂

Marc retires

Marc's retirement presentation
(image courtesy of Chris Valentine)

On Friday Marc, one of the founders of KMi, took early retirement, see the full story with more pics.

It’ll be a shame not having Marc around (though I’m sure we’ve not seen the last of him!), especially having worked closely with him on MSG over the last year or so, but wish him all the best in his retirement 🙂

The Eighth ‘Open’

Earlier, Marc posted a story on KMi planet about the 7 opens in MSG, well, I’ve started to make that 8 😉 as I’ve finally got round to spending a bit of time looking at OpenID.

I’d spent a little bit of time last week looking at the draft of the OpenID book, which explained all the processes well of how it all works, but I struggled a little with the actual example in chapter 5 (or was it 6?!) – following how the URLs & packets matched the workflow previously explained.

This evening, I installed the JanRain PHP OpenID library on my laptop, so I now have a (dummy) OpenID identity provider and consumer up and running on my laptop. The instructions were for setting up on *nix server, but runs fine (with few tweaks to the instructions) on Windows (XP with PHP5) too. What I’ve done is all pretty basic, and probably quite insecure as I’m not using SSL or a ‘proper’ random number generator – but will be good enough for playing with. I hope to be able to rewrite the server part into Java/JSP as that’s what we’re going to be running it on. Although it may seem a little odd just rewriting (esp. when Java libraries already exist for OpenID) but my thinking is that doing it myself should help a lot in my actual understanding of how it all works… possibly!

Volunteer Passport: Launch of ePortfolio system

Volunteer Passport screenshot

Over the last couple of months, in my spare time, I’ve been volunteering doing some programming work for the BTCV (British Trust for Conservation Volunteers) on their Volunteer Involvement Team to develop a “Volunteer Passport”. I’ve been volunteering with BTCV for a number of years, but always on their conservation work projects, so doing programming for them was a little more like my normal day job 😉

What they needed from the Volunteer Passport system was somewhere their key volunteers could record their learning experiences/objectives, skills, courses etc… so essentially an ePortfolio system. So rather than building something from scratch, I’ve adapted ELGG to add in the extra functionality required for the Volunteer Passport – this mainly involved updating the edit profile section to allow for skills and courses entry.

The system is now live on the BTCV servers at: http://passport.btcv.org.uk and we’re presenting it at the BTCV volunteers conference this weekend. It’s still not fully complete, there is plenty more functionality that we’d like to add, as well as getting it more closely integrated with existing BTCV IT systems, but it is a working system, so feel free to sign up and have a play 🙂 We’ve created a forum for feedback, so if you have comments, queries or suggestions please post them there.

For those interested I’ve used Google Code as the source code repository for the work I’ve done (see: http://code.google.com/p/volunteer-passport/). I know there are other (voluntary) organisations who are very interested in what we’re doing, with a view to creating their own, so all the code I’ve written is open source and freely available to anyone who wants to use it 🙂

Importance of being indexed

We noticed the other day that the MySQL process on one of our MSG servers was using up far more resources that it should do. After a little investigation it turned out that the problem was due to one very slow running query. The query in question had around 200k records in one table joined to a table with approx 80k records. Running the same query against my test database (with 70k and 80k records in the tables) ran in about 0.2 secs, but with the increased no of records it could take up to 630 seconds (yes – over 10 minutes), so no wonder then MySQL process was going into overdrive.

There were indexes on each of the tables, but only through a compound primary key, but the columns used for the join in the 2 tables in question didn’t have their own index. As soon as I added an index on these columns the query started to run in a much more respectable time (<0.2 secs).

So the lesson for me is to check that indexes are created for any columns used for joins on tables which are going to get big!

On a side note, this was in the OpenFire database and I’m not keen on the fact that their database structure uses the username column (a varchar(64) field) as the primary key for the user, rather than a more usual integer value. I suspect that joining two large tables on a varchar type column rather than integer column contributed to the slow running of the query.

BTW… can anyone recommend any (free/open-source) tools for analysing the performance and use of the indexes on a MySQL database? There seem to be loads MySQL admin type tools around, many paid-for products, but hard to tell which are any good for what I’m looking to do. Really I guess I’m looking for the similar features as MS SQL Query Analyser provides! Update 26/11/07 – I’m looking for something which gives me information about the query execution plan (i.e. how MySQL will use the indexes etc in the construction of the query) rather than general db admin tools for simply executing queries.

Video Chat added to MSG

Following my previous post on video chat, we’ve just launched a video chat facility to MSG (more info)

Video chat in progress