Steve: Developing on the Edge - Coming soon: Programming Erlang
Steve: Developing on the Edge
Thoughts on development, Web-services, technology and mountains.
3Mar
Sat2007
Coming soon: Programming Erlang

well well.

I'm going to be honest, I've never really got into Ruby. Yes, it has some nice features (good list and hash table syntax; tuples), and of the trinity of perl, python and ruby its certainly the prettiest to read. But its just, well, so single-cpu, single-thread centric. Now, Ruby+Rails does meet that ubuqituous use case: code behind web servers, but that's it. I'm still not sure about its scalability or ease of distribution. Because once you start depending on remote things, from S3 storage to adword services, even if you are in rest-land, you are talking to slow servers where delays are inevitable, and things that look like in-process invocations are wrong.

Erlang has an interesting mix: a bit of functional programming, a bit of message passing. Admittedly, it does seem biased towards CORBA for distribution, but let's spend a moment to think of some nice aspects of CORBA:

  1. There are stable standards for the various bits of the CORBA specs
  2. Built in support in Gnome.
  3. Vinoski and Henning provide a nice book on the topic
  4. Integrates with Java, C++, other systems, with interop that works.
  5. No need to go near WSDL or XSD when coding

I'd be curious about how well it would integrate with ICE for sure.

One selling point for Erlang is that it scales out to highly parallel 16-way and later CPUs. Now, in the past, languages that have focused on that have failed. And of course there was the Alice Graph Reduction Machine. I worked with someone who didnt finish his PhD on that...I think he was too embarrased by the end, that Imperial Colleges distributed Lambda Calculus engine was slower than the client 68K-based SunOS workstation by the time they had finished it.

But that was the past, where improvements in scalar processing meant that single CPU parts retained an edge, and Intel's x86 revenues let them invest in the fabs for the next generations of CPU; using capital investment to give them an edge over competing CPUs. Nowadays everyone is making multiway CPUs.

Which means eventually, all developers have to deal with it. I wonder if the increase in bugreps related to Ant's <parallel> task are a sign of this in Ant. SmartFrog is concurrent from the ground up, but once you bring RMI into the mix it is very hard to be 100% sure you will never have race conditions or deadlocks. You can't blindly use synchronized(this) {} everywhere, if every method call to an other object could trigger an RMI call, then and RMI callback on a separate thread. Concurrency in a distributed object framework is hard -and that goes for stuff that use SOAP but retain the RPC/RMI metaphor.

So, maybe this is Erlang's big day. I shall certainly place an order. I wonder what Erlang's REST facilities are?

Comments

On 4 March 2007 at 02: 00 J Aaron Farr commented:
If you haven't already, you might want to look at Yarv's blog [1]. He's got a lot of info on Erlang and web programming.
On 7 March 2007 at 23: 23 Andrew commented:
You are right that "all developers have to deal with it". I agree. But I don't class Occam as a failed past attempt at parallelism (your link to wikipedia). As someone who programmed in Occam for three years, I can tell you that it worked beautifully: we built massively parallel systems and deployed them to multiple cores. We harnessed parallel design very effectively because CSP, the theoretical basis from which Occam is derived, is a powerful syntax for describing concurrent processes in any environment. I'd recommend Occam and CSP as good background reading today for anyone who wants to use parallel metaphors for designing systems. Thanks for your post.
On 8 March 2007 at 00: 38 Steve Loughran commented:
Maybe I should rephrase it to say transputer was the failure, killed by performance single core systems.
Which is a shame, as there were some nice aspects to the design, and Inmos were based a few miles north of my house. Ironically, ClearSpeed are now based at Aztec West instead.
Occam & Transputerreply to this thread
On 23 April 2007 at 04: 25 Jim G commented:
I think the failure of the transputer was due more to market timing than anything; as you might recall, there was a delay in releasing their next generation product, which allowed Intel to capitalize on low cost chips and traditional networking.
I was a presenter at the 3rd Conference on Hypercube Concurrent Computers and Applications in 1988. At the time, a single board with 4 transputers (414s, I think) easily outperformed the 16 node Intel Scientific Hypercube that I had access to (based on simple benchmarks and direct observation). Within two years or so that was no longer true.
I agree with Andrew's comments regarding CSP and Occam as essential background material.