Article Discussion
Concurrency as an Externalized Aspect
Summary: In today's episode of Artima's JavaOne interviews, RogueWave's Patrick Leonard discusses the challenges of scaling an application on multicore CPUs, automatically applying concurrency to a business application, software pipelines, and why good design dictates the separation of an application's concurrency model from the rest of an application's code.
5 posts.
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: May 30, 2007 8:27 AM by Patrick
    Frank
     
    Posts: 135 / Nickname: fsommers / Registered: January 19, 2002 7:24 AM
    Concurrency as an Externalized Aspect
    May 25, 2007 2:00 PM      
    Patrick Leonard discusses the challenges of scaling an application on multicore CPUs, automatically applying concurrency to a business application, software pipelines, and why good design dictates the separation of an application's concurrency model from the rest of an application's code.

    http://www.artima.com/lejava/articles/javaone_2007_patrick_leonard.html

    What do you think about Patrick Leonard's views on externalizing concurrency?
    • Achilleas
       
      Posts: 98 / Nickname: achilleas / Registered: February 3, 2005 2:57 AM
      Re: Concurrency as an Externalized Aspect
      May 28, 2007 4:25 AM      
      > What do you think about Patrick Leonard's views on
      > externalizing concurrency?

      I think that he needs to look at the Actor model and spend some time with Erlang.

      The concurrency model of threads and mutexes should be abandoned, because it does not scale well with program complexity. The Actor model is a vastly better approach that allows for highly complex concurrency models with minimal effort.
      • Morgan
         
        Posts: 37 / Nickname: miata71 / Registered: March 29, 2006 6:09 AM
        Re: Concurrency as an Externalized Aspect
        May 28, 2007 9:26 AM      
        Having listened to the MP3, I somewhat agree with Achilleas. If you use threading & synchronization etc. it requires precision, thought, mini design reviews, and a programmer who knows what they are doing, not somebody else writing XML configuration files, should handle that.

        I can imagine configuration working for higher lever concurrency aspects. Today we make things Runnable and run them and let the JVM try to figure it all out to make things fast. But error handling, events / progress / cancel, etc. get very very messy. Achilleas - do Actors help there?
      • Patrick
         
        Posts: 2 / Nickname: pleonard / Registered: May 30, 2007 3:20 AM
        Re: Concurrency as an Externalized Aspect
        May 30, 2007 8:26 AM      
        > I think that he needs to look at the Actor model and spend
        > some time with Erlang.
        >
        > The concurrency model of threads and mutexes should be
        > abandoned, because it does not scale well with program
        > complexity. The Actor model is a vastly better approach
        > that allows for highly complex concurrency models with
        > minimal effort.

        The Actor model is interesting, and can be instructive to this conversation. I think that you will find some conceptual similarities between the Actor model and Software Pipelines. In Software Pipelines, the Distributor (actor) manages messages across Pipelines (addresses).
    • Morgan
       
      Posts: 37 / Nickname: miata71 / Registered: March 29, 2006 6:09 AM
      Re: Concurrency as an Externalized Aspect
      May 25, 2007 4:47 PM      
      "Thirty years ago, it was very common to embed the data model in application logic. Then we figured out that it was a good idea to have a database that was outside the application. That way, you separate the data model from the application logic"

      Not sure I understand. If you are saying that the data persistance should be outside of the application logic, I can accept that. If you are saying that the domain model of the data should be separated from the logic, then you are saying that Object Oriented Programming is wrong and we should go back to COBOL, and you'll get a lot of disagreement.

      Next, I need to listen to the MP3...
      • Patrick
         
        Posts: 2 / Nickname: pleonard / Registered: May 30, 2007 3:20 AM
        Re: Concurrency as an Externalized Aspect
        May 30, 2007 8:27 AM      
        > "Thirty years ago, it was very common to embed the data
        > model in application logic. Then we figured out that it
        > was a good idea to have a database that was outside the
        > application. That way, you separate the data model from
        > the application logic"
        >
        > Not sure I understand. If you are saying that the data
        > persistance should be outside of the application
        > logic, I can accept that. If you are saying that the
        > domain model of the data should be separated from the
        > logic, then you are saying that Object Oriented
        > Programming is wrong and we should go back to COBOL, and
        > you'll get a lot of disagreement.
        >
        > Next, I need to listen to the MP3...

        I do certainly agree that externalizing the data model from the application is primarily focused on persistence, and that object oriented programming principles are sound. However, with SOA we now have a new take on abstraction of data model from business logic with the Schema/WSDL interface to services.