Showing posts with label Erlang. Show all posts
Showing posts with label Erlang. Show all posts

Wednesday, April 2, 2008

SPA2008 - some final thoughts


It is now 2 weeks since the end of the SPA 2008 Conference and I have finally finished writing my notes. (Yippee!) So what are my final thoughts and what I am going to take away for exploring in the next few weeks and months?

I thought the conference was excellently run with a good mix of software practitioners attending. I was spoilt for choice in selecting the sessions to attend but there are some good notes appearing which summarise the sessions I didn't attend. There are also a number of articles appearing on various blogs. The dialogue during and between sessions was also stimulating and I hope to continue this when time permits.

Technically, I am particularly interested in following up the following topics:

I also learnt a lot about me. The conference confirmed that generally, the work I do is pretty well in line with what the rest of the software world in the UK is currently doing (or tyring to do!). There are differences but these appeared to be related to the domains, size of developments and team dynamics.

Friday, March 28, 2008

Hello World in another language

The SPA 2008 Conference provided me with an opportunity to see the functional language Erlang for the first time. This isn't a new language (see panel session) having been in use for over 20 years in Ericson for applications such as PABX systems.

As with all programming languages, the Erlang version of 'Hello World!' was demonstrated but the more interesting examples were those which highlighted some of the features of Erlang that make it standout from the other languages. It is clearly particularly well suited to massively concurrent applications as it supports 'cheap' thread creation with data being shared by messages. A simple demonstration in calculating Fibonanci numbers showed. It also showed how crucial the implementation of a multi-threaded, parallel application is. Ensuring that the implementation was tail recursive created an application that returned a result in a few seconds; not doing this resulted in the result taking much longer.

With the move to multi-core architectures, efficient use of the cores through parallel applications becomes much more important. In the classic article, The Free Lunch is Over, Herb Sutter outlined that concurrency is the biggest change to impact software development since the adoption of OO. There is a fundamental change required in how programs are written, impacting good principles such as modularity, to ensure that the applications can take full advantage of the available processing resource. Erlang's approach has been to support parallel processing from the start and to make concurrency easy through the use of the Actor Model (contrast this with the approach taken by Haskell which uses Software Transactional Memory). Erlang's approach is extremely efficient and lightweight, and performs asynchronous processing; there is no guarantee on the ordering of messages.

Erlang clearly has a very different approach to any concurrent programming I have done in other languages such as C, C++, Ada, Java etc. In the short session I couldn't see many other benefits other than this but maybe this is just encouraging me to go away and experiment. I would be particularly interested in seeing how Erlang could be used in a mixed-language application, say Erlang , C++ and Java - I have already found an example which discussed the use of Erlang and Java.

Erlang also got me thinking. Many years ago, shortly after I graduated from university, one of my friends enrolled for a PhD in which he was to develop mathematical algorithms (specifically ordinary differential equations) to run efficiently in a multi-processor environment. His language was FORTRAN (there were other languages around at the time but FORTRAN was the dominant scientific language at the time) and he managed to get a number of the algorithms operating efficiently in multi-processor configurations. I wonder if Erlang had been around at the time, if it could have been used and would have made his job any easier?