concurrency

Concurrency and Message Passing in Erlang

November 5th, 2012  |  Published in concurrency, erlang, languages, message passing, performance  |  Bookmark on Pinboard.in

In July 2011 I received an email asking if I would write an article about Erlang for the IEEE Computers in Science and Engineering (CiSE) magazine. The email said they had first invited Joe Armstrong but Joe had recommended me instead — how could I refuse a request like that? :)

It took awhile, but my resulting article “Concurrency and Message Passing in Erlang” is now published in the Nov/Dec 2012 issue of CiSE. Here’s the abstract:

Developers use the open source Erlang programming language in domains such as telecommunications, database systems, and the Web due to its superior support for concurrency and reliability. Erlang applications comprise numerous processes—lightweight user-space threads—that communicate via message passing. This article focuses on Erlang’s concurrency support and details an example 1D Poisson solver program.

Due to IEEE copyright rules I’m allowed to post only the final draft (PDF) sent to the magazine’s layout folks, but that’s OK since its text and figures are identical to the final published version. I haven’t yet received my hard copy of the magazine, but it looks like an interesting issue; it’s a special one covering concurrency in modern programming languages, and it also contains articles about Haskell and Clojure. The guest editors’ introduction explains the issue in more detail.

If you’re interested, you can purchase the full final article from the IEEE here. And now for some obligatory legalese: My article linked above is © 2012 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. This material is presented to ensure timely dissemination of scholarly and technical work. Copyright and all rights therein are retained by authors or by other copyright holders. All persons copying this information are expected to adhere to the terms and constraints invoked by each author’s copyright. In most cases, these works may not be reposted without the explicit permission of the copyright holder.

LaME’12 Second Call for Contributions

May 7th, 2012  |  Published in call for papers, concurrency  |  Bookmark on Pinboard.in


2012 International Workshop on Languages for the Multi-core Era
June 13 2012, at ECOOP 2012, Beijing China
(also colocated with PLDI, ISMM, and LCTES)

LaME is an interactive venue for exposing, evaluating, and developing programming language support for concurrency. This workshop provides a forum for the proposal and discussion of creative ideas that spur the development of innovative or improved concurrency models, languages, run-time systems, libraries and tools for multicore programming.

Space at the workshop is limited. We can ensure admission only to those submitting accepted position papers, programming challenge solutions, or other presentations.

The full paper deadline is now past, but we still solicit contributions of the following two forms, by May 20, 2012, at EasyChair:

  1. Position papers (of up to 2 pages) describing ongoing work of attendees. Position papers will be reviewed for scope and relevance, and distributed to all attendees before the workshop. Attendees submitting position papers relevant to the workshop sessions on open issues in LaME may be invited to present brief (two-slide) synopses of their ideas and work on the following. (Authors should indicate which if any session their position papers address.)

    • Type Systems, including those for isolation, state, and effects
    • Intermediate program representations, including those supporting optimizations across tasks, memory locality
    • Extensible Libraries, including DSL support, coordination frameworks
    • Asynchronous programming, including IO, events, reactive programing
    • Heterogeneous systems, including integrated GPU and FPGA support, NUMA-awareness
  2. Solutions to the LaME’12 programming challenge, described below. A session at the workshop will be devoted to brief presentations of solutions and their implications for the design and implementation of programming languages and parallel program development.

Programming Challenge

We solicit solutions to all or part of the following challenge, designed to showcase the expressiveness of different parallel language abstractions. The challenge is in two parts, one algorithmic and one engineering parallelism into a real-world context. Solutions may target either or both parts.

Solutions should include source code (ideally complete, but this is not required) as well as a short paper discussing the benefits and drawbacks of the approach. Comparisons to alternative approaches are welcome.

While the primary focus of this challenge is on expressiveness of the language, library or other abstractions used in the solution, evaluations showing the scalability and performance of the proposed approach are encouraged to show the performance that can be achieved with the approach.

The paper should be at most 4 pages. Code and papers will not be formally published, but will be archived on the LaME website. Solutions to the challenge problem will be presented and discussed at a workshop session.

Part A: Parallel Algorithms

The first challenge involves expressing algorithms cleanly. Prospective solutions will implement one or more of the benchmarks from the Problem Based Benchmark Suite. This open source suite describes a number of common real-world problems in terms of the function they implement and not the particular algorithm or code they use, and are thus a useful way to compare different programming languages, methodologies, and algorithm designs.

A description of the problems in the benchmark suite, together with sample implementations and sample inputs, is available at:

http://www.cs.cmu.edu/~guyb/pbbs/

Part B: Parallelism in Context

The second challenge involves putting parallelism into a real-world context. While expressing the core of an algorithm is important, equally important is getting the data from the world, into an algorithm, and back out into the world. Desirable characteristics include code that is short, clear, and efficient.

Prospective solutions will show how to get parallel data from some public source, process it in parallel, and display the output in some meaningful way. The processing itself may be a solution to Part A or it may be any other parallel algorithm. Data sources to consider include Tim Bray’s Wide Finder and Wide Finder 2 benchmarks or one of the research-quality data sets described here:

https://bitly.com/bundles/hmason/1

However, any public data source may be used.

Organizing Committee

Program Chair: Doug Lea (State University of New York at Oswego)

Program Committee

LaME’12 Call for Papers

March 22nd, 2012  |  Published in call for papers, concurrency  |  Bookmark on Pinboard.in


2012 International Workshop on Languages for the Multi-core Era
June 13 2012, at ECOOP 2012, Beijing China
(also colocated with PLDI, ISMM, LCTES, the X10 workshop, and other events)

LaME is an interactive venue for exposing, evaluating, and developing programming language support for concurrency. This workshop provides a forum for the proposal and discussion of creative ideas that spur the development of innovative or improved concurrency models, languages, run-time systems, libraries and tools for multicore programming.

We solicit contributions in any of three forms, at EasyChair:

  1. Regular papers (of up to 8 pages) reporting mature or ongoing work in relevant foundational and theoretical aspects of concurrent programming, languages, tools, frameworks, case studies, and practical experience. Selected papers peer reviewed by the Program Committee will be presented at the workshop and included in the ACM Digital Library.

  2. Position papers (of up to 2 pages) describing ongoing work of attendees. Position papers will be reviewed for scope and relevance, and distributed to all attendees before the workshop.

  3. Solutions to the LaME’12 programming challenge (to be issued April 15, 2012). A session at the workshop will be devoted to brief presentations of solutions and their implications for the design and implementation of programming languages and parallel program development.

Important dates

Regular paper submission April 15, 2012
Regular paper notification May 13, 2012
Regular paper final copy May 25, 2012
Position paper submission May 20, 2012
Programming challenge submission May 20, 2012
Workshop June 13, 2012

Organizing Committee

Program Chair

  • Doug Lea (State University of New York at Oswego)

Program Committee

QCon London: The Best One Yet

March 18th, 2009  |  Published in concurrency, conferences, erlang, functional, functional programming, RPC, standards  |  Bookmark on Pinboard.in

QCon is always very, very good, but QCon London 2009 last week was the best one yet. Highlights:

  • Ola Bini‘s “Emerging Languages in the Enterprise” track on Wednesday had some great talks, especially Rich Hickey’s Clojure talk. Ola’s deep knowledge and love of programming languages made him the perfect host for this track, and he put together a brilliant lineup.
  • Speaking of Rich, I consider myself very lucky to have gotten to meet and spend a fair amount of time with him. He’s very bright, talented, knowledgeable, and experienced, and both of his talks were outstanding.
  • I introduced Rich to Joe Armstrong at the conference party Wednesday evening and they spent the next few hours talking at length about functional programming, their respective languages, VM implementation issues, concurrency issues, etc. Ola jumped in as well. They also continued the conversation the next day. I just sat back, listened, and learned.
  • Getting to spend time again with Joe was excellent. He always has incredibly useful analyses and opinions to express, and in general is fun to be around and easy to learn from.
  • I also finally got to meet Ulf Wiger, Erlang developer extraordinaire, in person. He’s a laid back guy, quite well-informed and a deep thinker who can cover a wide variety of topics in amazingly useful detail. His talk on multicore programming in Erlang covered cutting edge Erlang development and presented some very difficult concurrency issues.
  • Ulf’s talk, as well as Rich’s second talk, which was on persistent data structures and managed references, were part of Francesco Cesarini‘s “Functional and Concurrent Programming Languages Applied” track on Thursday. I met Francesco, who like Ulf is one of the world’s top Erlang developers, at QCon London last year. He assembled a great track for this conference, with Rich’s and Ulf’s back-to-back talks being way more than enough to sober up any developer who thinks that multicore is not an issue and that today’s methods for dealing with concurrency will continue to work just fine. Best of luck with that!
  • Sir Tony Hoare‘s talk about the null reference being his “billion dollar mistake” was great because of all the detail he recounted from some of the early days of computing. He was both informative and entertaining. I was also impressed with Ulf during this talk, whom Professor Sir Hoare invited to come up to the front and present what turned out to be a pretty convincing argument in favor of the null reference.
  • Paul Downey‘s talk on the downsides of standardization was by far the most humorous talk I heard, perfect to close out the track, but it also presented a number of hard-won useful lessons about the perils of standardization efforts.

As with all QCon conferences, there were a bunch of interesting tracks running in parallel, and unfortunately I still haven’t figured out how to be in multiple places at once. I had to miss Michael Nygard‘s talk, for example, because my own talk got moved to the same time slot as his.

My talk (PDF) covered the history of RPC, why it got to be the way it was, and why the forces that created it really aren’t all that viable anymore.

The final conference panel was by far the most inventive panel I’ve ever been on. Modeled after the British game show “It’s a Bullseye!” and hosted by none other than Jim Webber, it had contestants from the audience throwing darts to become eligible for a prize. Once a contestant became eligible, Jim would ask the panel — Michael Nygard, Ian Robinson, Martin Fowler, and me — to answer a question submitted by conference attendees either earlier during the conference or live via Twitter. Based on our answers, audience members held up either a green card if they liked the answers or a red one if they didn’t, and if the majority was green, the contestant would win a book. The questions were hard! We had only two minutes each to answer, which for some questions seemed like an eternity but for most was way too short. Anyway, it was great fun, and given how many there were in the audience after three grueling conference days and how much they seemed to be enjoying themselves, it worked very, very well.

If you have any interest at all in leading edge software and computing topics being presented by the world’s most knowledgeable speakers in a fun atmosphere, go to QCon. I guarantee you won’t be disappointed.

Wiger on Erlang-style Concurrency

February 7th, 2008  |  Published in concurrency, erlang, HTTP, messaging  |  Bookmark on Pinboard.in

Since a number of people seem to be experimenting with adding Erlang-style concurrency to other languages, Ulf Wiger has written a nice explanation of what Erlang-style concurrency actually is. Definitely informative.

On a related note, I chuckled when I saw this posting from Robert Virding, who helped create Erlang, in the erlang-questions list about a month ago:

After reading the blogs about how good Erlang’s concurrency model is and how we just just made a super implementation of it in XXX I have been led to formulate Virding’s First Rule of Programming:

Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang.

This is, of course, a mild travesty of Greenspun but I think it is fundamental enough to be my first rule, not the tenth.

I can understand where he’s coming from. When I see the kind of blog postings he’s referring to, I always wonder why they don’t just use Erlang itself instead of trying to reinvent it in another system whose design trade-offs are unlikely to be able to support it. Well, I guess it would make sense in the case where they’re specifically studying various implementations of concurrency, but other than that, I don’t get it.

On another related note, I found the comment below in another blog. It refers specifically to my own use of Erlang:

it’s [sic] be interesting to see how Steve mix [sic] Erlang and HTTP, since Erlang is asynchronous in nature and does not have any “resource” concept and HTTP’s sweet spots are just the opposite

That’s easy. If you want to experience HTTP as implemented in Erlang, just go to the Yaws website, which of course is powered by Yaws itself. As Ulf’s blog posting explains, Erlang message passing is asynchronous, but that really has nothing to do with Erlang’s ability to support protocols like HTTP. For example, when I was learning Erlang, given my CORBA background I wrote a subset of IIOP, and it was really quite easy. Furthermore, Erlang doesn’t need a “resource” concept to support HTTP. A resource in that context is, after all, ultimately just a chunk of code that processes incoming requests, and of course Erlang can do that.

If you want to know more, go pick up Joe Armstrong’s Erlang book — it’s quite excellent.