InfoQ

News

Programming for Parrallelism: The Parallel Hierarchies Pattern

Posted by Sadek Drobi on Aug 29, 2007 05:00 AM

Community
Architecture
Topics
Design ,
Programming
Tags
Parallel Programming ,
Multi-threading ,
Concurrency
The advent of multi-core processors offers new performance opportunities. However, according to Ina Fried, this hardware trend is a big challenge for the software industry, since “most of today's software isn't built to handle that kind of advance”. Intel fellow Shekhar Borkar argues as well that “large software makers […] have not moved fast enough” and that time has come for the software to follow Moore's law, i.e. to double “the amount of parallelism that it can support every two years." (The notion of Moore’s law refers to the fact that the performance of chips is roughly doubled every two years). Borkar believes that software development practices have to be retooled in order to leverage potential performance improvement. 

In this vein, a new architectural pattern for parallel programming has been introduced (pdf) by Prof. Jorge L. Ortega-Arjona from the Mathematics Department of the National Autonomous University of Mexico.  The pattern attempts to increase performance of execution when:
It is necessary to perform an computation repeatedly, composed of a series of ordered operations on a set of ordered data.  Consider a program whose output may be the result of just a single complex computation as a series of conceptually ordered simple operations, executed not for value but for effect, at different levels. An operation at a high level requires the execution of one or more operations at lower levels. If this program is carried out serially, it could be viewed as a chain of subroutine calls, evaluated one after another.
His Parallel Hierarchies pattern is “an extension of the Layers pattern”, which partitions the problem into layers components responsible to “provide operations or functions to more complex level layers, and to delegate more simple subtasks to layers in less complex levels.” Elements of functional parallelism are “introduced by allowing “two or more components of a layer […] to simultaneously exist, normally performing the same operation”:
During the execution of operations in each layer, usually the higher layers have to wait for a result from lower layers. However, if each layer is represented by more than one component, they can be executed in parallel and service new requests. Therefore, at the same time, several ordered sets of operations can be carried out by the same system. Several computations can be overlapped in time.
Among the known uses of the pattern suggested by Prof Ortega are “Tree structure operations like search trees, where a search process is created for each node.”  Among the listed limitations are that “not every system computation can be efficiently structured as layers,” the pattern doesn’t work well when upper layers have too many dependencies on lower layers (eg: typical web based apps), and that desiging the right level of layers can be quite complex.

If you agree with Jon Erickson, who believes that “concurrency […] should be in the forefront of all developer's and architect's field of vision”, then it’s good to keep an eye on emerging research in this space. 

4 comments

Reply

how much does this apply to server-based applications? by Tom Nichols Posted Aug 29, 2007 8:37 AM
Re: how much does this apply to server-based applications? by Michael Nygard Posted Aug 29, 2007 10:42 AM
Re: how much does this apply to server-based applications? by emrah okay Posted Nov 24, 2008 12:38 PM
Re: how much does this apply to server-based applications? by deneme deneme Posted Dec 2, 2008 10:10 AM
  1. If your application is server-based (i.e. a web application) then it is already a highly concurrent system. Assuming at any given time you will have multiple requests to the app, wouldn't it be safe to assume all of your parallelism is being used up anyway? I can see this benefiting desktop applications (since a desktop is more often doing a single operation) but what about servers?

  2. It mainly applies to numerical applications, not to request-processors.

    The main thrust here seems to be eliminating synchronization by creating multiple instances of key system objects, where those instances "live" close to the thread that will use them.

  3. With twenty-four members plus two spec leads, Java EE 6 -- or JSR-316 -- is officially underway, Roberto Chinnici presents a summary from the first meetings between the group sohbet oyun indirindir program chatanyone try to appropriate the IP and patent it without OpenID's consent.

  4. The project's official name is "JVM Language Runtime",


    rather than "Java Language Runtime", and it's intended to target *all* varieties


    of languages for the JVM. And yes, the name is a direct nod to the DLR (Dynamic


    Language Runtime) for the CLR, which is both a good idea and a good name. But


    we'd like to be all-inclusive, providing tools and frameworks for all varieties


    of languages. And rather than starting right away building a common base all

    languges must conform to, we'll generalize existing solutions to common JVM

    language implementation challenges, drawing from the large existing base of

    already-implemented languages for the JVM.



    diyet
    astroloji
    magazin

    cinsellik
    liseli kızlar
    arkadaş
    bebek resimleri




    etek alti video
     
    kadınlar
     
    uzmanlar
    itiraf

Exclusive Content

Book Except and Interview : Aptana RadRails, An IDE for Rails Development

Aptana RadRails: An IDE for Rails Development by Javier Ramírez discusses the latest Aptana RadRails IDE, a development environment for creating Ruby on Rails applications.

Fast Bytecodes for Funny Languages

Cliff Click discusses how to optimize generated bytecode for running on the JVM. Click analyzes and reports on several JVM languages and shows several places where they could increase performance.

Scott Ambler On Agile’s Present and Future

Scott Ambler, Practice Lead for Agile Development at IBM, speaks on the current status of the Agile community and practices having a look at the perspective of the Agile’s future.

Manager's Introduction to Test-Driven Development

Dave Nicolette and Karl Scotland try to introduce non-technical managers to one of the most popular Agile development techniques: Test-Driven Development (TDD).

Structured Event Streaming with Smooks

Smooks is best known for its transformation capabilities, but in this article Tom Fennelly describes how you can also use it for structured event streaming.

How to Work With Business Leaders to Manage Architectural Change

Successful architectures evolve over time to meet changing business requirements. Luke Hohmann presents how to collaborate with key members of your business to manage architectural changes.

Colors and the UI

In this article, Dr. Tobias Komischke explains how colors used in a GUI can influence our interaction with a computer and offers advice on using the appropriate colors for the interface.

Building your next service with the Atom Publishing Protocol

In his presentation, recorded at QCon San Francisco, MuleSource architect Dan Diephouse explores ways to use the Atom Publishing Protocol (AtomPub) when building services in a RESTful way.