What a conference, what a night!

I recently attended the QCon London conference, and I have to say that there were a number of really interesting and thought-provoking talks.

I very much enjoyed Bart De Smet’s talk on “LINQ, take two”. This talk consisted of some observations on the current state of LINQ. In particular, the speaker pointed out that you don’t need to use interfaces when implementing LINQ as this forces the implementation of error raising methods corresponding to functionality that you don’t provide, which leads to completions in Visual Studio which aren’t really of value.  Instead you can use the way that the compiler uses syntactic transforms and straightforward overloading to make it easier to use statement completion on queries for your own provider. The talk then moved on to IQbservable interface and later on to the scheduling of the execution of the LINQ query as the third dimension of query execution. This was the last talk of the conference and it overran by 15 minutes, but it was well worth attending.

Secure distributed programming on ECMASCRIPT 5 was a talk by Mark Miller which covered how Javascript mash-ups can be secured by using capability based authorisation instead of the usual identity based authorisation. Managed implementations of object systems have a built-in way of implementing capabilities. An object A can only get a reference to an object B if some third party, which already has a pointer B passes it to A via a method call. This is the first step to security. The next version of Javascript allows objects to be frozen, preventing subsequent modification – this means that a base set of objects can be secured against modification by attackers. The author and collaborators have implemented a Javascript library on top of this which implements a number of membranes – a way to manipulate objects as they are passed through to someone else, in such a way that access can be later revoked. When ECMASCRIPT5 is available, it will be possible to use a library to secure the base system by freezing the base objects and patching functions such as eval, and then use these capability mechanisms to allow mash-ups without the danger of a loaded script interacting with another part of the application.

The talk then moved from the local to the remote case, by talking about an implementation of distributed communication using promises. There was an interesting example here of writing a queue in Javascript – the single threadedness of the language makes it necessary to implement many structures using callbacks to avoid the need to block the thread.

“Webmachine: A practical executable model of HTTP” was really interesting from two angles. First it talked about something that was implemented in Erlang. This meant we got to see a small amount of Erlang code, and the implementation had a functional programming flavour with no global state and no mutable shared state. The main point of the talk was that this was a way to do REST correctly. Webmachine is an implementation of the state machine that governs HTTP requests. From this point of view it is interesting in itself, as it highlights some of the corner cases of the specification that are not often seem. The idea behind Webmachine is that this state machine calls out of user defined functions at various points. These functions can change the interaction by returning the appropriate values.

The presenter showed how easy it was to write a simple REST server. The defaults have been chosen to make this easy, and the user defined functions are passed the appropriate arguments, so that if the bodies only depend on the parameters, it is really easy to ensure that the server behaves as it ought.

Webmachine has been ported to a number of languages, and I’m sure it will make its way to other languages in the near future.

“Advanced Reflection” was a talk by JB Evain that highlighted the use of the Cecil library. This is a library for manipulating .NET assemblies. It provides an object model over the assemblies, allowing them to be modified and re-saved. The talk emphasised the use of the library for Aspect Oriented programming – one main example was adding checks to the prologue of functions to check for null parameters.

The current implementation allows a method’s code to be modified at the IL level, and the presenter talked about his future hopes of decompiling the IL into expression trees and allowing the modification at this level.

Cecil (and associated utility libraries) is a really useful tool which we have used at work for reading and adjusting assemblies.

“Node.js: Asynchronous I/O for fun and profit” was an introductory talk on Node.js. Javascript is a really powerful language, and the V8 engine implementation has made it easy to plug in a DOM which can be manipulated using Javascript. Node.js uses event based programming, running a single worker thread (at the user program level) and using the operating system’s select equivalent to find I/O requests that need a response.  Requests are plugged into the user program via callbacks, leading to a CPS (continuation passing) style of programming that is alien to many people, but which has been used for a long time in the functional programming community.

Node.js is very scalable due to its use of the operating system to queue the work. A single thread means that there isn’t the memory overhead of many blocked threads, and performance is good as there is little context switching or scheduling overhead. Load balancing happens at the level of having multiple Node.js instances instead of at the threadpool level.

On the Wednesday, I attended two talks on The Java track. “Java’s youthful maturity” talked about the soon to be released version of Java, emphasising the new VM support for dynamic languages via the invokedynamic bytecode. There was also discussion of some concurrency support via the ForkJoin classes which support the ForkJoin pattern. During this discussion we got to see the new lambda syntax in Java, and a potential mechanism for extending existing classes. This latter facility adds default implementations into existing classes to support backwards compatibility.

“The future of Java EE” was very much about getting Java to work better with the cloud. During the talk the presenter used the glassfish application server to deploy an application into the cloud.

I also attended an “Introduction to iOS development” which was a quick tour of the iOS platform and it’s development tools. The introduction to Objective-C was really good, though as I’m a fan of Smalltalk it was easier to grasp the + and – to denote class and instance methods and the parameter syntax. The presenter gave brief guidelines for when an HTML5 application should be written in preference to a native application.

Both days also had relatively interesting keynote presentations, and the conference was really worthwhile.

This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s