Tuesday, 31 July 2012

Sakai Development: Post Three

At this point we can start to install Sakai itself. I decided to start with the source archive, mainly because I don't really want to have to debug any serious issues with the development source code. Because of the restrictions on my VM, I saved http://source.sakaiproject.org/release/2.8.2/artifacts/sakai-src-2.8.2.tar.gz to my desktop and then used scp to copy it to the server. I now have sakai-src-2.8.2.tar.gz in my home directory.

Once the source is downloaded, the first new step is to set up some environment variables. The instructions say that the java executables (java, javac, etc.) need to be in the path; in fact, the way that Java is set up on Debian makes this unnecessary, as /usr/bin/java (etc.) are symbolic links to the java executables, which do not need themselves to be in the path. Some work is needed, though; to increase the memory available to Sakai, create the file /usr/local/tomcat/bin/setenv.sh with the contents:

export JAVA_OPTS='-server -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:NewSize=192m -XX:MaxNewSize=384m -Djava.awt.headless=true -Dhttp.agent=Sakai -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dsun.lang.ClassLoader.allowArraySyntax=true'

Make the new file executable:

$ sudo chmod a+x /usr/local/tomcat/bin/setenv.sh

The required version of subversion is already installed.

Next, install maven 2.2. This is the version of maven in the Debian software repositories as maven2, but this is a package which has a very large number of dependencies, some of which will clash with the already installed Sun java (openjdk, for one). Although java binaries and compilation is supposed to be compatible across the different implementations, it feels wrong to use this maven - and having multiple java implementations on the server when its not necessary seems silly, a recipe for confusion later on. It makes me feel happier to install maven by downloading from apache. (Though in the end, for the sake of time, I chose to download the binary, with no idea about which java was used to compile it...) The installation process is basically the same as that for tomcat.

$ sudo mv apache-maven-2.2.1-bin.tar.gz /usr/local
$ cd /usr/local
$ sudo tar zxvf apache-maven-2.2.1-bin.tar.gz
$ sudo ln -s apache-maven-2.2.1 maven

maven needs some setting up, and I choose to do this globally, so that every new session picks up the home and options for maven. In /etc/bash.bashrc, add the lines:

MAVEN_HOME=/usr/local/maven

export MAVEN_OPTS='-Xms512m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m'
PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin:$MAVEN_HOME/bin
export JAVA_HOME CATALINA_HOME MAVEN_HOME PATH

at the end of the file (the last two lines replacing the ones given in the previous post). To do the same things for a single user, add settings to .profile in the home directory. When this has been done, run

$ source /etc/bash.bashrc

to import these settings into the current session and then test to be sure that this all worked:

$ mvn --version

Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.6.0_26
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-5-amd64" arch: "amd64" Family: "unix"

Create a local maven repository directory:

$ cd $HOME
$ mkdir -p .m2/repository


and add a settings file to the m2 directory also created by this command, as .m2/settings.xml, containing:


Additional information may need to be added if the server uses a proxy to communicate to the Internet, as maven doesn't check the http_proxy system variable (but go here rather than trying to follow the instructions in the Sakai guide to add the instructions to the settings.xml file). The instructions now tell you to configure Sakai, which is confusing as Sakai has not yet been installed (and the instructions tell the installer to edit as yet non-existent files). There is a minor step missing from the instructions, which is to open the archive of the Sakai source code already downloaded. In the user's home directory,

$ tar zxvf sakai-src-2.8.2.tar.gz
$ cd sakai-src-2.8.2

Next, set up the mysql database to use. The right JDBC driver for the database you intend to use needs to be downloaded and put into /usr/local/tomcat/shared/lib; for mysql, this is available from http://www.mysql.com/products/connector/. The database will also need to be set up as per the configuration entries you set up. For mysql this entails the following activities (with some parts of the server response omitted, and the actual password I used replaced by the word "password"):








$ mysql -u root --password
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

mysql> create database sakai;
Query OK, 1 row affected (0.00 sec)
mysql>  grant usage on *.* to sakai@localhost identified by 'password';Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on sakai.* to sakai@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> exit;
Bye

Note that I had already set a root password; often, new installations of mysql do not have the password set. To test this worked, I then ran:

$ mysql -u sakai -p 'password' sakai
mysql>; exit
Bye

Now it's possible to carry out some pre-compilation configuration. First, make a new properties file to configure the compilation-time information, such as the server domain name; I felt that the best start was with a copy of the existing exemplar, default.sakai.properties. There is also a file, sample.sakai.properties, which contains all the many possible items it is possible to configure at this point - since the default.sakai.properties file is already 924 lines long, to work through the longer file was a job I hoped would be unnecessary.





$ cd config/configuration/bundles/src/bundle/org/sakaiproject/config/bundle
$ cp default.sakai.properties sakai.properties

Then edit the new sakai.properties. Most of these changes from the default were because I decided to forward only access requests for /portal from apache to the tomcat listener, and so the URLs for navigation all need to start /portal. My expectation at this point is that the changes I make won't matter - they all seem to be in the nature of the sort of local customisation which should easily be changeable later (and, if not, I can always change the properties and compile again).. The contents of a sakai.properties file are documented in a 90 page Microsoft Word file found at sakai-src-2.8.2/reference/docs/architecture/sakai_properties.doc - useful, if a bizarre choice for a documentation format for an open source project. To summarise the main points, as relevant to the compilation I want to carry out:


  • The edited file should end up at /usr/local/tomcat/sakai/sakai.properties, and further changes can indeed be made later. The compilation process does not copy this file across, so it will need to be sorted out by hand. One of the consequences of not doing this is that Sakai will attempt to use the default hsqldb database, which has not been installed, and this will prevent the installation from working (the error in this case, which appears in catalina.out, is "java.sql.SQLException: Table not found in statement [select COUNT(*) from SAKAI_SESSION]").
  • The connection details for the database to use need to be set up, and the existing hsqldb values commented out.
  • The property portalPath is used for adding a pathway to the URL (which should not be used to contain the full path to the portal where there is some extra needed, as here where URLs ending /sakai are forwarded to tomcat); this is not in the default properties file.
Now comes the first moment of truth: compilation. The first stage of this is to compile the master project for Sakai.

$ cd ~/sakai-src-2.8.2/master
$ mvn clean install

This is followed by a lengthy list of missing libraries, followed by downloads and installation of these libraries - which is far nicer than having to fulfil all the dependences by hand. Eventually, there is the magic message:





[INFO] [install:install {execution: default-install}]
[INFO] Installing /home/sjm62/sakai-src-2.8.2/master/pom.xml to /home/sjm62/.m2/repository/org/sakaiproject/master/2.8.2/master-2.8.2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 14 seconds
[INFO] Finished at: Wed Jul 18 14:15:09 BST 2012
[INFO] Final Memory: 16M/495M
[INFO] ------------------------------------------------------------------------

Then, the actual compilation and deployment to tomcat of Sakai itself. I'm aiming to compile the cafe build, recommended for new developers.

$ cd ~/sakai-src-2.8.2
$ mvn -Pcafe clean install sakai:deploy -Dmaven.tomcat.home=/usr/local/tomcat

I set this going and then immediately realised that I don't have write permission to /usr/local/tomcat. As expected, this ends with

[INFO] [sakai:deploy {execution: default-cli}]
[INFO] Copy /home/sjm62/.m2/repository/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar to /usr/local/tomcat/shared/lib/jstl-1.1.2.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Fialed to deploy to container :/usr/local/tomcat/shared/lib/jstl-1.1.2.jar (Permission denied)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 minutes 36 seconds
[INFO] Finished at: Wed Jul 18 14:26:33 BST 2012
[INFO] Final Memory: 76M/495M
[INFO] ------------------------------------------------------------------------

What doesn't occur to me at this point is that the quick way to fix this problem is to give myself write permission to /usr/local/tomcat and its sub-directories, at least temporarily. Instead, I try using sudo to allow the installation to occur.

$ sudo mvn clean install sakai:deploy -Dmaven.tomcat.home=/usr/local/tomcat

Predictably, this also fails (the reason being that I created the sakai environment in  /home/sjm62/.m2, so if I run the command as sudo, the information fails to be found). So now try:

$ sudo mvn -s /home/sjm62/.m2/settings.xml clean install sakai:deploy -Dmaven.tomcat.home=/usr/local/tomcat

This seems to work better, though I'm not at all sure what it might be doing to the ownership and permissions in ~/.m2. Download checksums failed for a fair number of the required resources, with no obvious effect (It looks from this as though the checksum of the downloaded file is compared to the stored checksum, but all that happens if they are different is that a warning is given, but the downloaded file is used anyway.) After twenty minutes downloading and compilation, this happens:

[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 9 source files to /home/sjm62/sakai-src-2.8.2/osp/wizard/tool/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
...
(tedious details omitted)
...
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 minutes 30 seconds
[INFO] Finished at: Wed Jul 18 15:01:39 BST 2012
[INFO] Final Memory: 102M/243M
[INFO] ------------------------------------------------------------------------

This suggests that the maven options set the memory size too low, even though I used the values from the documentation. I doubled the values, and ran the compilation again, with the same result. (It's very frustrating to have the compilation run for almost twenty minutes, then run out of memory.) It looks as though more thought is needed - perhaps the virtual machine has too little memory. Indeed, with no interactive processes running, the machine has 584 Mb used out of a total of 1002 Mb available of virtual memory: so setting the maximum memory usage of maven above 512 Mb will be pointless (the information comes from running free -m). According to top, the most memory intensive process running is tomcat, so I now propose to run the compilation once more, with tomcat shut down (must remember to restart it later...). This time I will also monitor the memory usage in another shell, using top and also running tail -f /var/log/messages, which should indicate problems if the machine's memory is full (the page at http://rimuhosting.com/howto/memory.jsp is a very helpful introduction to the diagnosis of linux memory issues, BTW). There is no obvious message, though it is possible that

Jul 19 09:56:48 float mpt-statusd: detected non-optimal RAID status

is connected, as Linux memory usage is increased by the caching of disk blocks in spare memory. (I would expect Linux memory management to be sophisticated enough to stop caching the blocks at pretty short notice when an interactive process wants the memory, however.) So my conclusion now is - I should increase the memory allocation for maven and try again. This time, MAVEN_OPTS is set to "-Xms1024m -Xmx2048m -XX:PermSize=1024m -XX:MaxPermSize=2048m" - and the build still fails. It's time to hit the Sakai dev mailing list. Posting at 1.45AM Pacific time unfortunately makes it likely I'll need to wait for an answer - so I'll do something else for a while. The answer comes fairly quickly, but apart from fixing obvious typos, leads to circling round whether or not I should be using root or sudo or neither. (Note: I can't just create new users on this VM in the obvious way, because it's set up to use an LDAP server for authentication, requiring userIDs other than root to match ones on the LDAP. There's probably a way round this, but it's not worth the time to sort it out, I don't think.) Also, the suggestion that tomcat needs to be run as a non-root user is something I thought about, but then didn't do, as apache's tomcat documentation says that there shouldn't be issues. (And applications writing to files outside the tomcat tree seems to me to be the application's security problem not tomcat's - especially as it's not likely to be possible if selinux is enabled...)



Anyway, self-justification apart, the solution is to get more memory for the virtual machine. Even with 2Gb virtual memory, the compilation process takes up 90% of it, so it is clear that the maven options suggested in the documentation are rather on the low side of what is needed, at least on Debian. But with the upgrade and write permission to /usr/local/tomcat, the compilation now runs to a successful conclusion:







$ ls /usr/local/tomcat/webapps/
access.war         profile2-tool.war  sakai-rutgers-linktool.war
accountvalidator        profile-tool   sakai-rwiki-tool.war
accountvalidator.war        profile-tool.war   sakai-search-tool
authn.war         providers   sakai-search-tool.war
balancer         providers.war   sakai-sections-tool.war
courier.war         ROOT    sakai-siteassociation-tool.war
dav.war          sakai-alias-tool.war  sakai-site-manage-group-helper.war
direct          sakai-announcement-tool.war sakai-site-manage-group-section-role-helper.war
direct.war         sakai-archive-tool.war  sakai-site-manage-link-helper.war
emailtemplateservice-tool      sakai-assignment-tool.war sakai-site-manage-participant-helper.war
emailtemplateservice-tool.war  sakai-authz-tool.war  sakai-site-manage-tool.war
imsblis          sakai-axis   sakai-site-pageorder-helper.war
imsblis.war         sakai-axis.war   sakai-site-tool.war
imsblti          sakai-calendar-summary-tool.war sakai-syllabus-tool.war
imsblti.war         sakai-calendar-tool.war  sakai-tool-tool-su.war
jsf-resource         sakai-chat-tool.war  sakai-usermembership-tool.war
jsf-resource.war        sakai-citations-tool.war  sakai-user-tool-admin-prefs.war
jsp-examples         sakai-content-tool.war  sakai-user-tool-prefs.war
library.war         sakai-editor.war   sakai-user-tool.war
login-render.war        sakai-fck-connector.war  sakai-web-tool.war
messageforums-tool        sakai-gradebook-testservice.war samigo-app
messageforums-tool.war        sakai-gradebook-tool.war  samigo-app.war
osp-common-tool.war        sakai-help-tool.war  savecite.war
osp-glossary-tool.war        sakai-login-tool.war  scheduler-tool
osp-jsf-example.war        sakai-mailarchive-james.war scheduler-tool.war
osp-jsf-resource.war        sakai-mailarchive-tool.war servlets-examples
osp-matrix-tool.war        sakai-memory-tool.war  sitestats-tool
osp-portal-tool.war        sakai-message-tool.war  sitestats-tool.war
osp-portal.war         sakai-metaobj-tool.war  tomcat-docs
osp-presentation-tool.war      sakai-news-tool.war  tool.war
osp-wizard-tool.war        sakai-podcasts.war  webdav
podcasts.war         sakai-postem-tool.war  web.war
polls-tool         sakai-presence-tool.war  wiki.war
polls-tool.war         sakai-reset-pass   x
portal-render.war        sakai-reset-pass.war  xsl-portal.war
portal.war         sakai-rights-tool.war  x.war
profile2-tool         sakai-roster-tool.war

Now on to the final stage of getting Sakai up and running. Restart tomcat:

$ sudo /usr/local/tomcat/bin/startup.sh 
[sudo] password for sjm62: 
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/java-6-sun/
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar

and then it should be visible in the web browser. However, it isn't, and there are large numbers of errors in the tomcat logs.

I found that recompiling and installing over an existing, failed, sakai build caused huge numbers of problems in tomcat (the re-installed version is basically missing libraries which installed fine the first time around, even if it does have some which were originally missing). This seems to be the problem discussed in http://collab.sakaiproject.org/pipermail/sakai-dev/2009-August/002909.html and the solution is to re-install tomcat completely and remove the existing maven project in .m2/repository/org/sakaiproject directory. However, even then I was still getting errors like the following (note that the full error only appears in the localhost.[date].log file, not in catalina.out, which has an exceptionally unhelpful short version of the first line only):

SEVERE: Error configuring application listener of class org.sakaiproject.util.ToolListener
java.lang.ClassNotFoundException: org.sakaiproject.util.ToolListener
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
(etc.)

(This particular error is repeated a large number of times, presumably once for each time a servlet tries to load the class.) I'm not sure what the cause is - permissions, or not removing enough of failed installations, perhaps - but it's fixed by getting rid of the entire sakai and tomcat installation and starting again from scratch. Once I remember to:

  • ensure that CATALINA_HOME is correctly set;
  • copy the setenv.sh file to $CATALINA_HOME/bin;
  • copy the mysql JDBC driver JAR file to $CATALINA_HOME/shared/lib;
  • copy the sakai.settings file to $CATALINA_HOME/sakai;
then I end up having an installation I can see from a web browser. There are obviously still some fairly serious problems, as can be seen from the screenshot to the right, but I feel that I'm starting to get somewhere.

Wednesday, 18 July 2012

Sakai Development: Post Two

The virtual host is now operational, so it is time to start setting up the environment for installing the Sakai CLE (2.8.2) from source. The machine is running debian 6.0.5.

In the past, I haven't generally installed java and tomcat on linux machines in the standard ways, because when I started doing that, the easiest way to do the installs was to download the packages and install in /usr/local, setting up symlinks where necessary. But now I think would be a good time to start doing things the standard ways, which should in 2012 be much better than they were in 1998. At least, I hope so!

Note that I am doing all this using sudo. It is not always installed on debian systems, and you may prefer to do this as the root user.

Preferred versions of java and tomcat are Oracle's Sun java SE 6 (the JDK) and apache tomcat 5.5.35 respectively (even though end of life for 5.5.35 is September 2012). So to start with, install java from the debian packages, following the useful instructions at http://www.thegeekstuff.com/2009/09/how-to-install-java-on-ubunt-debiau/:

sudo apt-get install sun-java6-jdk
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'sun-java6-jdk' has no installation candidate

Looks as though the repository which contains sun-java6-jdk is missing. It's in the non-free repository, which can be added by adding "non-free" at the end of the first two uncommented lines in /etc/apt/sources.list:

deb http://ftp.uk.debian.org/debian squeeze main non-free
deb-src http://ftp.uk.debian.org/debian squeeze main non-free

(I used vi to do this.) Then update the list of packages:


$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

and indicate acceptance of the license which is displayed (press tab to select, return to activate it) - you should have to do this for two different screens. Check that this is now working, with:

$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Success. Now set up the environment variables for to enable tomcat to find this java when started using sudo. Edit /etc/bash.bashrc and add

JAVA_HOME=/usr/lib/jvm/java-6-sun/
export JAVA_HOME

as a new last line. (This method will also work if you wish to start and stop tomcat while logged in as root, but will only be picked up the next time you log in, not in the current session.) To make this value be set each time sudo is used, edit /etc/sudoers and add the line

Defaults env_keep += "JAVA_HOME"

after the existing Defaults line(s).

So now I need to install tomcat. The problem here is that the debian packages are now version 6, and Sakai 2.8 is not compatible with this version, despite an end of life date of September 2012. This is not the only problem, as according to http://www.crazysquirrel.com/computing/debian/servers/debian-tomcat-package.jspx, installation from the debian package is not recognised as valid by Eclipse, and this could well cause problems later if I want to use Eclipse for development - though I would be running Eclipse on my laptop, not on the server, hopefully. It's also worrying that the release notes for tomcat 5.5.35 indicate that it requires the Java JRE 5.0 by default, rather than Java 6 as recommended by the Sakai WIKI.

However, the strongest statement seems to me to be that Sakai 2.8 is not compatible with tomcat version 6. So I think that I'll need to install tomcat 5.5.35 from source. (The best option, given infinite time, would be to wait for the release of Sakai CLE 2.9, but my timetable does not permit that.) I'll follow the instructions on the crazysquirrel link already listed, as I can never keep the details of how to set up the Apache-to-tomcat connectors in my head.

Download the binary core distribution files from http://tomcat.apache.org/download-55.cgi?Preferred=http%3A%2F%2Fmirrors.ukfast.co.uk%2Fsites%2Fftp.apache.org%2F. The VM I'm using has been set up so that I can't connect from it to random sites on the Internet, so I download the file to my desktop and copy it to the VM.. I now have apache-tomcat-5.5.35.tar.gz sitting in my development space home directory. Actually installing tomcat is easy:

$ sudo mv apache-tomcat-5.5.35.tar.gz /usr/local
$ cd /usr/local
$ sudo tar zxvf apache-tomcat-5.5.35.tar.gz
$ sudo ln -s apache-tomcat-5.5.35 tomcat
$ cd

The symlink created in the last step is intended to make life easier: when upgrading tomcat, it shouldn't then be necessary to re-configure everything to point to the new location of tomcat.

As with java, system-wide environment variables should be set up. Edit /etc/bash.bashrc and add

CATALINA_HOME='/usr/local/tomcat'
PATH=$PATH:$CATALINA_HOME/bin
export JAVA_HOME CATALINA_HOME PATH

(The last line replaces the last line from the java installation step.)

Third step - set up mod_proxy_ajp. This is the simplest way to link apache and tomcat, though some people prefer mod_jk. mod_proxy_ajp is compiled into the debian apache2 package, but is not loaded. The same is true of the other proxy modules, some of which are needed for mod_proxy_ajp to work. To fix this, add symlinks for each proxy module configuration file from /etc/apache2/mods-available to /etc/apache2/mods-enabled:

$ cd /etc/apache2/mods-enabled
$ sudo ln -s ../mods-available/proxy* .
$ cd

Now configure mod_proxy_ajp. There should already be a connector configured at the tomcat end listening on port 8009 (look in /usr/local/tomcat/conf/server.xml to check). Apache will also need to be configured. I decided that access to Sakai should be via the URL /sakai, so my extra configuration looks like this:

  
   AddDefaultCharset Off
   Order deny,allow
   Allow from all

   ProxyPass /sakai ajp://localhost:8009/]
   ProxyPassReverse /sakai ajp://localhost:8009

This needs to go in /etc/apache2/sites-available/default between the last  and the ErrorLog directive.

Finally, restart apache:

$ sudo /etc/init.d/apache2 reload
Reloading web server config: apache2.

and start tomcat:

$ sudo /usr/local/tomcat/bin/startup.sh

The remaining component to the server environment (load balancing being unnecessary in the development context) which needs to be set up is the database. The Sakai 2.8 release notes give a choice of Oracle or MySQL, and in the development environment, MySQL is clearly the right choice. Run

$ sudo apt-get install mysql-server

and all the needed mysql packages will be installed, including the command line client. You will be asked to change the root password for the installation as part of the installation process, and at the end of it the MySQL server will be started.

Thursday, 5 July 2012

Sakai Development Diary: Post One

Today I still don't have a development environment. It's beginning to look as though this will be the issue which holds up the project, as it was due a fortnight ago. It's pretty clear that having an installation of Sakai to work with is absolutely vital, and will give me valuable information about how it works. Without one, this post will have to be short.

One thing I have discovered is that I should be working on the CLE rather than the OAE, meaning that the OAE Widget Library I mentioned yesterday will not be relevant. As far as I can tell, there is no equivalent environment to help developers of add-ons to the CLE. The list of projects in the Sakai jira server is not illuminating, to say the least. What's listed is just the name of each project, the code used to distinguish it in jira, the name of the lead, and an (optional) URL. So there's no description to help a reader know what the projects are. Quite a few don't have a URL listed, and others just link to the list of bugs. And many of the names are not entirely descriptive: Sakora, for example, turns out to be a tool for integration with IMS. All this makes it hard to know what is going to be relevant.

The other thing I realised today is that I will really need to understand the Resources tool in Sakai (a web based file management system for Sakai). That is used in the installation of Sakai for which the work is being done, and it is clearly useful for the selection of files to then deposit through SWORD. I have found some very basic documentation for users, but hopefully I will learn more when I can install Sakai for myself.

My next post will come when I have a development server set up.

Wednesday, 4 July 2012

Sakai Development Diary - Prelude

My next major job will be to write an extension to the Sakai research environment software which enables the deposit of material from Sakai to some SWORD2 compliant repository. (SWORD2 is a protocol for the deposit of digital materials into repositories, so this is a reasonably sensible project to undertake.) This work is funded by JISC through the Research360 project based at the University of Bath, but this is a personal blog and the content does not represent the opinions of either JISC or the University of Bath, and any mistakes are my own.

My Sakai background is negligible, so I will be starting from scratch. I have had a look round the Sakai website, and had a chat to some people who know the system better than I do, and have not been left much wiser than when I started. This is really the reason behind this diary: it does not look easy to pick up the information that is needed to start developing for Sakai, and documenting how I went about it and what worked should therefore be helpful to the Sakai community. With that in mind, I will try not to be too critical, curbing my natural inclination to sarcasm.

First Impressions


The website for Sakai is very corporate-looking for an open source project. Clearly, that is a good thing in many ways - it certainly convinces the reader that the tool is one which has been thought through and which has had a lot of work put into it. The emphasis on the front page is on the community, which is one of the main concerns of open source software projects. So it looks healthy - at least from the point of view of a potential installer.

But the community of researchers who use, or who might be persuaded to use, Sakai are not the only people who will be going to the website. An open source project is likely to attract people who are interested in contribution, as I am. What information does the website hold for developers?

The front page itself tells me that Sakai is not just one tool, but two: the CLE (Community Learning Environment) and the OAE (Open Academic Environment); from the names, it is clear that the latter is what interests me. There is a big difference in what is available for the CLE and the newer OAE; it is possible to try out a hosted installation of the CLE, but not of the OAE. At the moment, I don't have a development environment suitable for setting up a development installation of Sakai, so I tried out the hosted CLE - an interesting experience. The hosted environment comes courtesy of a choice of commercial affiliates to the Sakai project; I chose Unicon, mainly because it is the first in the list. (The other link of interest on the Sakai home page, Getting Started, which leads to a page from which I chose Technical Contributor information, ends up suggesting that trying a hosted version of the CLE is the first step.)


Clearly, Unicon have been generous to support such a free service, so that is to be applauded - but I still felt there were some issues with the trial system, apart from it being the less relevant of the two Sakai tools. At the Unicon site, the potential user needs to create an account. The form for this has quite a lot of required information (at least, I assumed that fields with a red star next to them were required, as the sign up page doesn't actually say so), including some which, as a consultant rather than an academic, were a little difficult to choose how to complete - I don't have an academic department, for example. But I'm only doing this to have a chance to play around on the system for a short while, just to get a feel for the sort of things that Sakai can do. What is more irritating is to receive a confirmation email which contains my password in clear text. (See here for why this is a bad thing for security.) However, the account is temporary, only working for 90 days, so it is not a disaster, even if it is off-putting for a software developer - does this mean that Sakai is going to store user passwords in unencrypted form?


Trying the software without clear goals in mind is less productive than it might be. The main thing about it is that it does leave me with a positive impression of the ease of use and potential for versatility of the software.


What's the second step? Joining the appropriate Sakai mailing list. The only information that is given on the Sakai website is the list of the 50+ mailing lists, with a minimal description of each - the longest of them is just 12 words. I decided to join announcements, the programmers' cafe (I'm not quite sure whether this is a mailing list for informal discussion between developers, or about a specific part of Sakai called the Programmers' Cafe - but I can always unsubscribe later), and oae-dev, and sakai-dev.


The Technical Contributor page now suggests setting up a jira (bug tracker) account. This done, I have a quick look round, and start to find the kind of information I need to get started. That is, I now know that there is a Sakai OAE Widget Library (for example): this sounds relevant, but all I can see here are bug reports - the jira project listing does not give a website, as it does for the majority of projects. Now I know that it exists, I should be able to find out more. It's a bit annoying to have to go to everyclick (the search engine I am currently using, so that every search I do donates to charity) to find the website for the project. A bookmark to go back to later, though I do have time to discover that there isn't single sign on between any of the things I have registered for today, and I'll need a new userid and password to use the library website. If  I had not used jira before, I might have found it quite hard to actually discover the projects, as the tab to click on is not particularly obtrusive.


From this point, the Technical Contributor page starts to get quite CLE specific, so I think that my next task - once I have a development server - will be to download and install the OAE.


SWORD is a smaller scale project, and this is reflected in a far plainer website (and in the geekiness of their logo!). But then, I am a developer, and not so interested in being sold the product as in finding out how to use it. What do I want to know?


I have some idea of what SWORD is already, but not much about the differences between version 1 and version 2. The site has prominent links to the specifications for both versions of the protocol, and I bookmark the version 2 definition for later perusal - it's going to be extremely important when I start working on it, but is not light reading, and I'll probably forget most of the important details between now and when I actually need to know them. Following a link to SWORD2 implementations takes me to a much more immediately important list. There are client toolkits which would help me write my Sakai extension in Java, Ruby, python or PHP, and a list of servers known to support version 2 of the protocol, which will be important when I come to testing it out. I have written code in all four languages, but I have yet to find out what restrictions Sakai will place on what I can use. Not only that, but the different client toolkits all have decent looking documentation. I feel that finding this out is actually my biggest achievement so far: well done Stuart Lewis, the author of the page!

Tuesday, 31 January 2012

Email etiquette for companies

We're currently in the throes of trying to find a new plumber (our old one has been taken over by a large company which seems to have turned it into a bunch of cowboys). Plumbers and builders seem almost ideal users of email for contact, as small businesses where the work means you're rarely in a central location - or at least, they would be if they were able to use it. Ring a plumber's listed number during the day and you probably get a family member who can't help you. Ring their mobile, if they list one, and you either get them in the middle of doing something and unable to concentrate, take down your information, and certainly not knowing when they'd be free to do something. A text would be too short to say what needs to be said (because of allergies, anyone who visits the house, even to quickly look at things before providing an estimate, needs to be a non-smoker, and not wearing aftershave or scented deodorant). Ring in the evening, and they don't want to talk about work and have other things going on. Email doesn't have to be dealt with instantly, and the information provided by the other person is not going to be lost because you haven't got a spare hand to get a pen and paper. The problem is presumably the level of written English and technical know-how needed to work with email. This has meant that we've emailed five or six plumbers over the last ten days, and got no responses whatsoever. This is the reason for my first principle of email etiquette for companies:

If you list an email address as a means of contact, it is important to respond to messages in a timely manner.


When contacting bigger companies, you often get an automated instant(ish) reply, along the lines of "Your message has been received and is important to us. We aim to respond to you within seven working days." followed by a corporate disclaimer, and, quite often, an instruction not to reply to the automailer address. This at least means that the potential customer knows that their email has been received, but is itself not terribly helpful: it is the email equivalent of a call centre's "Your call is important to us. All our operators are busy at the moment, but we will answer your call as soon as someone is available. Please hold." (At least the email doesn't come with muzak to irritate you while you wait.)

My issue with this is that seven days is a long time to wait for a response to what is often a simple query, like being on hold for an hour (something which is thankfully much less common now than it was a decade ago). It does seem to be the time period which is used for this purpose, and is obviously intended to make sure that there is no real likelihood that the response will take longer than the time given (though I have even had this happen to me). It's also a time period which I have consistently seen ever since I first emailed a corporate address of this sort, which must be some time in 1995. Listen: it's 2012 now. Move on. You can do better now, and if you can't, give up: you're never going to make it into the twenty first century. It should surely be possible, when there is more than one person whose job includes monitoring a general query email account, to have a basic response from a human being by the end of the next working day, even if that is just "I can't answer your email fully now, but I am working on it." So here is my second principle of email etiquette for companies:

A timely response to an email  means by the end of the next working day for a company with more than one or two employees. And this response should come from a human being.


A problem which I have often encountered with email is that people do not respond to more than the first paragraph. An email is not a text message, and it can (in case you haven't noticed) contain more than one paragraph, more than one question. It is extremely irritating to have to email back and say "Great answer to the first question, but you don't seem to have noticed the rest of the email". And it's sensible when someone does as we do and give extra conditions such as sending a non-smoking employee to a meeting to indicate that this has been taken in. Thus, my third and final principle:

Read the whole of the message, and make it clear that you have done so in your reply.


The overriding thing to remember is that people who are sending you queries are interested in your company, which makes them much more likely to be future/continuing customers than people you send marketing to or who might happen across your website and then go away again. So they should be important to you, and if you can make their experience with your company better from the start, do so.

Monday, 7 November 2011

What is Mathematics?

This blog post shares its title with one of the great books about mathematics, by Richard Courant and Herbert Robbins (while not in itself making any claims to greatness, naturally!). That book is the idea bridge between school mathematics and university mathematics, and should still be read by anyone who is considering studying the subject at university. While most school mathematics is a question of learning how to solve specific types of problems by rote, higher mathematics is not at all like that: that is both the point of Courant and Robbins' book, and the reason for this post.

The nature of mathematics has been an issue for philosophical discussion ever since the ancient Greeks, particularly where the question is about the relationship between mathematics and the real world. I'm not going to try to summarise, let alone add to, the huge body of literature on the subject. What I want to talk about is how to classify mathematics as a part of human learning. Today, it is usually classified as a "science", at least by educators: it is a science as far as GCSE and A-levels are concerned, though in higher education there is often a separate faculty which contains mathematics and IT.

What is a science? - Inductive Reasoning

To say anything about whether mathematics is a science requires some idea of what a science is. The exact details of this are matters of debate, with interesting contributions from people like David Hume, Karl Popper, Thomas S. KuhnPaul Feyerabend, and Michael Polanyi (whose Personal Knowledge I was reading while working on a second draft of this post, and who inspired a number of revisions). All these authors well worth reading if interested in the subject. I think it would be fair to say that most of those who consider themselves scientists will believe in some version of the "scientific method": a cycle of theory, prediction (i.e. the design of an experiment with an idea of what should happen if the theory is correct), and experiment, leading to a revised theory if the existing one falls short which is the source of new predictions and so on.

The point of this kind of scientific method is that is is supposed to support the use of inductive reasoning, which basically boils down to (OK, is oversimplified to) the idea that it is possible to use the past to predict the future. If something holds for some class of situations in the past, it at least suggests that it will hold similar future situations: every time I have dropped a ball from my hand, it has fallen towards the centre of the Earth; the next time I drop it, it should do the same. This is in fact a statistical argument. The problem with this is that it is not possible to prove that induction will work (as pointed out by Hume), even when the type of statements which it is used to support are restricted.

Mathematics and Deductive Reasoning

But nothing like this is involved in mathematics. There is no experimentation, no expectation that it is possible to prove existing results incorrect (or incomplete), and no inductive reasoning of the kind which is involved in scientific research. Instead, mathematics is the domain of deductive reasoning, and its results are sure and certain (with some possible exceptions, which I will come to later).

In mathematics, results are established using deductive reasoning. The idea is that this consists of a set of rules which can be applied to prove a conclusion from a collection of hypotheses, usually known as "axioms" in this context. Things are rather more complex than this makes it sound. The rules are pretty convincing (for example, one, known as modus ponens from medieval logic textbooks, says that if it's possible to prove one statement A and another statement which has the form "A implies B", then it's possible to prove B too).  But they really work best applied in a very formal way, using symbols which indicate the logical relationship between statements. And then establishing any useful theorem is extremely complex, time-consuming, and hard to follow. So in practice mathematicians tend to use relatively informal arguments to establish results, which could in theory be turned into formal demonstrations in symbolic logic - at least, hopefully they could. Such arguments often use well established proof methods, such as reductio ad absurdam (proof by contradiction - also a medieval term), where the opposite of the theorem's conclusion is assumed, and then this is shown to lead to a contradiction, implying that the result of the theorem must hold. In the end, a proof of a theorem is correct if it convinces the worldwide community of mathematicians, and there have been movements to make this notion different from the then-accepted norm, such as the intuitionists.

As well as the complexities of formalising the idea of proof, another nuance in the brief definition of deductive reasoning is the role of axioms. Basically, mathematicians are free to define any collection of axioms they want, and see if they lead to interesting results. Most mathematicians work with already well established collections of axioms. These often take the form of definitions for convenience - it is much easier to state a theorem "If A is an X, then..." rather than "If A satisfies the axioms X1,X2,X3,X4,...", by using the definition "A is an X if it satisfies the axioms X1,X2,X3,X4,...". The number of axioms is unlimited, and can even be infinite (in which case, there would be a rule used to define the axioms, along the lines of, "For any mathematical property P, if P is true for 0 and, whenever P is true for n it is also true for n+1, then P is true for all numbers" (this is an axiom from number theory known as the principle of induction).

An example would be to work with groups, which are one of the most important mathematical structures; the term "group" has a formal definition, and this is turned into a simple axiom in many theorems: "If G is a group, and ..." as opposed to "If G is a set with a binary operation . with the properties that G has an identity, all members of G have inverses, and . is associative, and ..." - long enough to be cumbersome even without expanding the meanings of the subsidiary definitions of operations, identities, inverses, and associativity. (Another condition, closure, is frequently added to this definition, but this can be, and often is, sensibly subsumed into the meaning of "operation".) And that's without even considering what a set is: set theory is formulated so it defines what can be done with sets rather than what a set is (e.g. it tells you that the union of two sets is a set), and this would hardly fit easily into the statement of a theorem.

Axioms

What determines a mathematician's choice of axioms? There is one basic rule: they should be consistent. The reason for this is that it is possible to prove that from inconsistent axioms any statement can be proved. If it is possible to give a model - basically an example - which satisfies the axioms, then they must be consistent (this is another theorem from logic). For many axioms, particularly those collected into definitions, there are huge numbers of models already known. Where a mathematician is seeking to solve a particular problem, and develops axioms related to this problem, the motivation behind the problem may well give an obvious model for the axioms.

A small warning - where the mathematical objects become really fundamental, it is hard or impossible to prove that they are consistent. There is a circularity about the most fundamental mathematical objects: logic is used to reason about sets, and sets are employed in many aspects of logic, including the definition of "model" which is used in the theorem alluded to in the preceding paragraph. This means, too, that there is no way to prove that mathematics as a whole is consistent, and indeed, that consistency of a set of axioms is only relative to the presumed consistency of more fundamental definitions and axioms such as those of set theory. In fact, the axioms defining set theory (in the form they are normally seen) are the end results of an attempt to restrict the idea of a set to avoid the paradoxes which were first seen at the end of the nineteenth century (for example, the "set which contains all sets which are not members of themselves" - is it a member of itself or not?).

Consistency is the only real requirement, though a mathematician would look for other desirable properties of a new set of axioms with which he or she wishes to work. They should be productive: it should be possible to derive lots of useful (and beautiful, in mathematical terms) theorems. The re-use of ideas in other contexts is important in mathematics, and productivity of axioms is one of the things which makes it possible to do this. The definition of a group is a prime example, as it has been re-used in hundreds if not thousands of contexts, and lies behind many important applications of mathematics in physics. Note the word "useful" - from any collection of consistent axioms, it is possible to derive infinite numbers of trivialities (such as "1=1"), and mathematicians are not interested.

But perhaps even more important to many mathematicians is the idea of beauty. It is hard to explain why some mathematics is elegant or beautiful, but it is certainly a value which is recognised by those who work in the field. Sciences do in fact have a fairly similar concept. Basically, I think beauty is about how smoothly the mathematics seems to flow, so that the truth of what is being proven seems obvious, at least in retrospect.

But What is the Point of Deductive Reasoning?


One philosophical criticism of mathematics is that it never tells you anything which is not effectively included in the axioms involved. But generally working out the implications of a set of axioms is not always easy to do, even if a specific desired endpoint is set: this is illustrated by the time it took for mathematicians to find a proof of Fermat's Last Theorem. In general, it isn't possible to look at a statement and say whether it is provably true, false, or unprovable from a given set of axioms.

What axioms do is to define a certain kind of structure, which can then be investigated with deductive reasoning. If we make a axiom that some aspect of the universe has a particular structural characteristic, then all the mathematics which has been devised which describes that type of structure becomes available to deduce information about the aspect and to predict other properties of the aspect which can (in principle) be tested. Mathematics also includes the study of the absence of structure, that is, randomness: statistics.

Why Does Science Work?


One of the big questions is basically this: why is mathematics as applied in science so good at describing the universe? There isn't necessarily any connection between our thoughts and the behaviour of a black hole thousands of light years away: it is entirely conceivable (and possibly even likely) that our brains will never be capable of understanding the way the universe works at its most fundamental level. The main reason for doubting our ability is that we are insignificant parts of the universe, and therefore indubitably less complex than its whole; it would be even more unlikely that we can understand it than it would be for an amoeba to understand human culture. But this means that the success of science desperately needs an explanation, and I think that defining mathematics as the study of structure provides one.

It is important to realise that we don't directly understand the universe. One of the things that human beings are unbelievably good at is the perception of patterns (it's why we see pictures in the cracks in a wall or in the clouds, for example), and if we can see one in a particular phenomenon, that is a way to find a structure which models that phenomenon. This structure can be investigated using mathematics. Of course, there is no guarantee that the pattern is correct, as is the case with an optical illusion. What mathematics as an analysis of structure makes possible is the use of deductive reasoning to work out what a possible structure in the real world would mean - in effect, it is what enables the design of experiments to check whether the structure is valid or not. When a pattern is false, the mathematical predictions will (in all likelihood) turn out to be false, and the perceived structure will have to be abandoned for another possibility.

One obvious example of how this works is that of symmetry. In mathematics, a symmetry is going to be linked to a kind of group, which describes how objects with that symmetry can be changed (e.g. by reflection) in a way that appears not to change the object. So given an apparent symmetry in the universe, the whole of group theory can be used to understand it better. Such groups and symmetries are used in the theory which underlies particle physics (known as the Standard Model), and which leads to the predictions which are being tested by the Large Hadron Collider.

A second is evolutionary theory. In Darwinian evolution, survival of the fittest is related to probability: an individual which is better fitted for their environment is more likely to survive and produce descendants. And there is a great deal of mathematics about probability and statistics, so this can then be used to look at evolution. This mathematics was used to come up with an evolutionary description of altruism, explaining why it can be better in the long term for individual organisms to act against their personal interests in order to improve the odds for survival of close relatives who will have similar genes.

While mathematics is an important part of science, its processes and methods are different. The differences arise from the need to connect to the real world in scientific work; mathematics can be entirely abstract. And many mathematicians prefer it that way, too, even if it is an attitude which has a less than sympathetic reception from those people who tend to fund research, who want work which can be useful now rather than if and when an application is found for it.

Modern Mathematics and Science

There is a way in which scientific method may creep into mathematics, as I mentioned earlier. Some of the most complex results proved since the mid-seventies rely on computers to look through large numbers of cases and check that a result is valid in each case. This was done, for example, in the proof of the four colour theorem, which states that a map consisting of regions drawn on a flat piece of paper can always be coloured in so that no adjacent regions use the same colour with at most four colours. This is proved by looking at the ways in which a map can be turned into a simpler map which can only be coloured with four colours if the original map can be. The proof can be completed by looking at all the maps which cannot be simplified in this way, and seeing that they can be coloured in; the large but finite number is such that computers were used to check all of them. This means that the proof is basically dependent on the computer software and hardware: all the calculations it carries out must be accurate if the result is to be proved. I don't know what methods were used to establish the accuracy of the software and the hardware involved in this particular case, but to ensure that there isn't a fundamental design flaw in all the hardware available to test the result is hard when computer chips have become as complex as they now are. (There are methods to verify the accuracy of software and hardware: but bugs and manufacturing flaws are still hard to pick up.) This problem has led some to question whether such results can truly be considered proved; and certainly no mathematician is likely to consider the proofs as beautiful.

Polanyi describes mathematics as being physics when it can be applied to models of the real world, and like engineering when it can provide solutions directly applicable to the real world, but that it has more than that in it. I would say that the relationship is not really like that. Mathematics is a method which is immensely important to science, basically forming the whole of a scientist's analytical toolkit. The development of modern science really took off at the point when scientists began to seriously use mathematics for this purpose, rather than basing their thought on non-mathematical philosophical ideas (such as the idea that objects will travel in circular paths if not impeded, as a circle is the perfect shape). But mathematics is not, and can never be, a science.

Art?


So, we have established something which mathematics is not. If it isn't a type of science, maybe it is an art. In some ways, it feels like an art when practised at a high enough level. There is a philosophical question of what type of existence a mathematical object has, and indeed whether it can be said to exist before someone thinks about it, but it is pretty clear that mathematics is not really created from nothing when someone proves a theorem. Mathematicians feel that they discover a result, rather than inventing it, and definitely would not want to believe that it is the act of thinking about it which determines whether a proposed theorem is true or false. Perhaps mathematics is more of a craft than an art. But that is only in the way that most satisfying human activities can be viewed as a craft: there is pleasure to be had from the creation of something beautiful, whether it is a proof of a theorem, or a statue, or a design for an experiment, or a piece of furniture - or even a physical move in a game of football. Similarly, mathematicians may make use of a shared toolkit of techniques, and a shared technical vocabulary, but this is again something shared with huge numbers of other activities which could be labelled a craft. (Indeed, I would go so far as to say that these two properties could be used to define what a craft is.) The technical vocabulary in mathematics is exceptionally highly developed, with symbolic notation and a huge number of words which are given specific technical meanings, as well as an accepted way to add to their number (by creating a definition).

I would say, therefore, that any claim that mathematics is an art or a craft does not capture any of its properties which mark it out from other activities that humans undertake. However, just as with science, mathematics is fundamentally important to many art forms, for similar reasons due to the human appreciation of structure and patterns. Music is perhaps the art form most clearly using mathematics, probably because it is in the main abstract when words are not being sung. It is structured on several levels - form (such as verse/chorus or sonata form), rhythm (both a pulse and patterns such as the "Scotch snap" or the stretching of tempo in waltz time) and pitch (such as the use of a key, or with a twelve note series) for example. Similarly, pictorial art often has structural elements based on perspective (which is all about geometry). This use of patterns is important to our enjoyment of art and, in some cases, to our ability to connect with it in the first place. Of course, art is not just about getting these technicalities right. The spark of creativity which marks art of any quality from the rest needs to be part of any art object as well. Not only that, but great artists will adapt and develop the existing technical ideas, and make something new, which can then act as the ideas which are used by the next generation.

As with science, mathematics may underlie much of the technical side of art. But it is not an art, and this is even clearer than it is to say that it is not a science.

In a Category of Its Own?


My contention, then, is that mathematics is nether science nor art, and only a craft in a sense common many activities of disparate kinds, but that, instead, it is sui generis. In fact, I would go so far as to say that to call it a science or an art is a category error. For mathematics is a part of the theory of every science and every art or craft, but no science, art or craft forms the basis for any mathematics whatsoever. The inspiration, perhaps, but not the basis. To me, pattern recognition and structure are so important parts of what it means to be human that the study of these things deserves to be in a category of its own.

Tuesday, 25 October 2011

Identity and Access Management Blogs etc.

I thought: I could put together a quick blog post linking to some of the blogs which I follow, and spend a little time trying to fill gaps in the list. But while doing a little searching I found the Planet Identity blogroll (which I'd not seen before) and 360tek's list of blogs. Nothing I could post would be anything like as comprehensive. But there's still scope for a post, though...

Planet Identity aggregates over 170 blogs, with about 30 on 360tek's list most of which are on the Planet Identity list). I presume the former is no longer updated (it's on an old Sun server, not moved to Oracle). Blogs tend to be evanescent, and it's no surprise that some of the links in the blogroll are dead, or that others have not been updated in over two years. Many of the corporate bloggers have been amalgamated into a single company blog, which suggests to me some developing maturity in the identity market - these companies are making themselves more "corporate", which unfortunately often makes the blogs less interesting. A few of the blogs listed are inaccessible to me as someone pretty much restricted to English language writing, to my shame. My interests are also pretty much UK centred, and I'm not particularly into the latest marketing release from commercial vendors - mainly because getting identity management right is at least as much about good business processes as it is about technology. I'll just list some of the best of those which seem to be live (and which I didn't already know - or did know, but had just been too lazy to pick up and follow).

Where the blog author (if a single person) is also on twitter, I have listed their twitter ID as well as the blog URL.

Identity Networks: The blog of Ingrid Melve, Federation Manager for Feide - a FAM slant, and well worth reading (one of the blogs I really should have been following already)
Identity Woman: Although recent posts are taken up with the naming policies of Google+ (the spate of discussion over pseudonyms on the network being sparked off because Google would not allow an account in the name of Identity Woman), there is a lot of interesting material on this blog about user-centric identity.
Identity Happens: A great blog which is more technical than most of the others in this list. Not updated all that frequently.
Racingsnake: Robin Wilton's personal blog, focusing mainly on public policy relating to security and IAM. He also blogs at Gartner.
Ian Yip's Security and Identity Thought Stream: Good stuff here, too; interest in why technical security problems arise in the first place from Ian Yip.

I use Akregator to read most of the blogs I follow, and I have a fair number of Identity and Security blogs in there. A lot of security bloggers talk about identity - it has become massively important in IT security now that people have started to realise just how insecure most systems become if identity management is compromised.

eFoundations: Not all IAM, but always interesting blog from Pete Johnston and Andy Powell at Eduserv.
UK Access Management Focus (formerly JISC Access Management Team blog): Essential reading if you want to know what's happening in IAM in UK higher education. Maintained by Nicole Harris, a former LSE colleague of mine.
Kim Cameron's Identity Blog: thoughtful posting about identity (from, unsurprisingly, Kim Cameron), most recently (at the time of writing) about how disintermediation might affect identity.
Light Blue Touchpaper The blog of the security research group at Cambridge University: they often have something interesting, or even controversial to say (particularly if you believe in bank security). Posters here include Steven Murdoch.
Talking Identity, from Nishant Kaushik: He works for Identropy, so some content is cross posted from their corporate blog. Sensible and pretty authoritative stuff here (and, indeed, there).
Stephan's Ramblings: Another former colleague, who blogs about security generally.
Schneier on Security: Bruce Scheier, security guru (author of one of the best technical books on cryptography), describes himself as "head curmudgeon at the table". Fascinating comment, and a weekly squid-related post.
Naked Security, the Sophos blog on IT security, has timely posts on most current security stories. Perhaps less identity content than the ones above, but helps to keep up to date.

Not all essential reading comes in blog form, even in 2011, though these web sites also provide feeds.

The security tag at Slashdot Any Slashdot story tagged as "security" can be seen here, which includes just about any IAM related discussion on the place to go for computer geekery.
Security coverage at The Register Some may not like the jokey tone of "El Reg" (as it calls itself), but they cover a lot of interesting stories in an idiosyncratic way. The Identity stories have a subject feed here.
Electronic Frontier Foundation: Fighting for rights in the digital world, many of which have some connection to identity.

I follow some other relevant people on twitter:

Robert Garskamp, of IDentity.Next
Christopher Brown, of JISC - eResearch Programme Manager responsible for the Access & Identity Management programme
Rhys Smith, of Cardiff University and JANET, who worked on the Identity Project and the Identity Toolkit with me
John Chapman, also at JANET
RL "Bob" Morgan, University of Washington and Shibboleth (most people involved in Shibboleth seem not to tweet or blog)

I hope this list is useful - but I've probably missed some obvious and interesting blogs...