I decided that I had to go back to the MongoDB part as, although I was now conversant with Riak, I didn't know enough about MongoDB to tackle the assignments. In the process, I installed on my Mac (using Brew) and found, to my surprise, that it worked first time! I was then able to play with the code in the "Definitive Guide" book. I then went back to the Notebooks and got confused - again - as it appears that this uses its own MongoDB database. I was expecting it to use the one I installed if it was there listening on the right port. I forgot that the Notebook is running inside Vagrant so couldn't see the other instance. Having messed about like this, I decided to finish off the ICMA - which contains questions that require coding to answer!
I answered all of the usual questions and got 29% - I need 30% in 5 ICMAs so if I could get a few more marks, I could put this to bed and stop worrying about ICMAs for the rest of the course. I went through the coding questions and came to one where they were looking for the month with the least accidents. I guessed a month and found that it was right! 10 marks! I ended up with 51.66% so quickly submitted it and now I am ICMA free.
I have now completed Question 1 of TMA 02 so I have plenty of headroom for the rest of the assignment as it isn't due until 16th June.
To bore you with more of my Riak activity, I have been using my son-in-law's expertise to play with the interface from my Smalltalk code into the database. Riak has an HTTP interface, which is what I am using. It also has a direct socket access which requires converting all the data into hex and so on. It has one advantage in that, once connected, Riak keeps the socket open. This should, in theory, provide a much faster interface. However, I must be doing something wrong because, as we now have the GET operation coded using both HTTP and the Protocol Buffers, I did some timings and found that my HTTP interface was almost twice as fast as the direct socket version. I think that we have to examine what our socket stuff is doing as it should be the other way round.
Lastly, I was having problems using JSON as the data format - the JSON interface that I was using comes from the Squeak world and I had to recode it to run under my VisualAge Smalltalk. In the end, I decided that the idea that Riak is a JSON database is a bit of a misnomer as it will accept anything that you give it. I decided to rework the data formats and save all of my objects in CSV format. I already had all the code to do this as it was CSV based before I started with Riak. Anyway, it is all converted and my software is running perfectly! I can now put the Riak stuff to bed for now and, hopefully, pick it up again when I propose my project at the end of the degree (12 months away).