Active Objects and Futures: A Concurrency Abstraction Implemented for C# and .NET

(Note: Although this is primary a C#/.NET thing, this is also posted on DelphiFeeds.com as I think this might be interesting for Delphi developers as well. Maybe this or a similar abstraction is even something to consider for the DPL?)

I did the final presentation for my CS Bachelor thesis at the University of Paderborn today. I thought I would share the thesis here, maybe some of you find it an interesting read. In one sentence, it’s about simplifying concurrent programming with several (new) higher-level abstractions. Here’s the summary:

Although being touted as the next big thing for years now, concurrent programming is still very difficult and error-prone even in modern programming languages and environments. Concurrent and in particular multithreaded programming still requires deep knowledge of low-level techniques like threading or locks and experience with deadlocks, race conditions and other subtle and hard to find concurrency problems. High-level concurrency abstractions and patterns can simplify concurrent programming but are only starting to become available in modern mainstream programming languages.

One of these high-level abstractions is the so called Active Object pattern. The Active Object pattern works, as the name implies, on the object level and not on an object hierarchy like most other design patterns. With an active object, method invocation is decoupled from the actual method execution, i.e. invoked methods of these objects are executed asynchronously and do not block the caller. There are several variants of this pattern known, but all have in common that the concurrency functionality is achieved by running methods in a thread or process context different from that of the caller. Possible results of active methods are encapsulated in so called future objects which can be seen as placeholders or contracts for the real results.

I will post the related code (the active objects runtime library as well as the related code generator/compiler) later this week or maybe early next week. So without further ado, Active Objects and Futures: A Concurrency Abstraction Implemented for C# and .NET.

This entry was posted in DelphiFeeds.com, Programming. Bookmark the permalink. Both comments and trackbacks are currently closed.

9 Comments

  1. Posted January 31, 2008 at 16:52 | Permalink

    Nice work. Thanks for making it available!

  2. Posted February 1, 2008 at 22:20 | Permalink

    Thanks Jody.

  3. Sascha H.
    Posted March 17, 2008 at 06:48 | Permalink

    Schöne Arbeit. Gibt es das Dokument auch in Deutsch?

    Gruß Sascha

  4. Posted March 18, 2008 at 00:16 | Permalink

    Hallo Sascha,

    Freut mich zu lesen, dass dir die Arbeit gefällt. Das Dokument gibt es momentan leider nur auf Englisch. Ich hätte die Arbeit auch auf Deutsch schreiben können, habe mich aber dagegen entschieden. Zum einem kann man dadurch ganz gut sein Englisch verbessern und zum anderen können mehr Leute die Arbeit lesen.

    Bis dann!

  5. CGr
    Posted September 8, 2009 at 14:56 | Permalink

    Sag’mal, hast du dir CCRDSS und/oder Axum angeschaut? Mir scheint das etwas ähnliches in CCR und Axum bereits vorhanden ist.

  6. Posted September 11, 2009 at 16:36 | Permalink

    Hi,

    CCR kannte ich, Axum bisher nicht. CCR ist mit Sicherheit ähnlich (alle Threading Frameworks haben ja im Grunde die gleiche Idee). Das schöne bei Active Objects ist allerdings, dass die Nebenläufigkeit relativ gut versteckt/abstrahiert wird und man somit weiterhin komplett objektorientiert arbeiten kann und sich nicht mit ports/messages/queues oder sonst etwas anfreunden muss.

  7. Corku
    Posted April 10, 2010 at 10:47 | Permalink

    could you please post a link to the active objects runtime library as well as the related code generator/compiler?

    Thanks in advance..

  8. Posted April 12, 2010 at 11:31 | Permalink

    Sorry, but I never got around to clean up the code and to post it on this blog. I’m afraid there is currently no download for the library or the compiler.

  9. swamy
    Posted August 17, 2010 at 09:39 | Permalink

    excellent…good work..

One Trackback

  1. [...] generalized example of Jeremy Miller’s ICommandExecutor, which is even more generalized as the Active Object pattern. I named mine “IAsyncExecutor” because it executes any code asynchronously. The advantage with [...]