5

In Martin Fowler's book Patterns of Enterprise Application Architecture he writes on page 2: "In some ways enterprise applications are much easier than telecoms software -- we don't have very hard multithreading problems ...".

Is anybody aware of a summary of those "very hard multithreading problems" and solutions, in the form of design patterns, like the famous GoF Design Patterns book?

There is the POSA book. But those books might be too general and fundamental. More domain focused examples would be what this question is after.

minghua
  • 5,981
  • 6
  • 45
  • 71
  • Can the down-voters give a reason about why you think the question is not suitable? This question is very specific, with references to the specific relevant background information, and will benefit many developers like me in the field. If you think you are an expert in the area, what's you opinion on the subject? If you are not an expert in the area, why you think you should vote down? – minghua Oct 15 '15 at 05:20
  • And I know some people know good answers to the question. They just need some time to see the question when they are surfing around. – minghua Oct 15 '15 at 05:22
  • 2
    Check out http://www.erlang.org/. Erlang was written by Ericsson to build very robust, concurrent switching software. You might find some examples there to help answer your questions. – Keith Holloway Oct 19 '15 at 18:36
  • 1
    A shame you get downvoted. Some people get to the letter because your question is ([arguable](http://stackoverflow.com/help/on-topic)) subjective or asking for a book or reference. Unfortunately people don't realize the main paramenter to consider is if the question is [construtive](http://stackoverflow.com/help/dont-ask) – jean Oct 26 '15 at 10:31
  • Thanks Jean for explaining it. I did not think the question is arguable, and did not expect the answers to be arguable either. I have seen so many good questions being closed by voters who have no expertise in the subject area, e.g. web developers voting down core C questions. I'm thinking it could be a problem of the stackoverflow rules, not that much a problem of the voters. – minghua Oct 29 '15 at 15:29

2 Answers2

4

Check out Joe Armstrong's thesis from 2003:

Making reliable distributed systems in the presence of software errors.

Armstrong designed the software for a high-speed network switching device during his time at Ericsson. It was implemented in Erlang, which was specifically designed to provide highly reliable and highly concurrent applications.

In his thesis, he presents the underlying design decisions for the Erlang language itself and the OTP (Open Telecom Platform) library. He also makes some suggestions about how to design application modules for such applications -- this part comes closest to your 'design pattern', although not in the detail you're accustomed to after reading GoF's Design Patterns.

It's not a recipe book, but he nevertheless draws a few interesting conclusions about how applications should be designed.

blubb
  • 9,510
  • 3
  • 40
  • 82
1

Actors

The actor model an architectural pattern where a system is made up of a set of loosely-coupled actors that interact through message passing.

An actor is a computational entity that, in response to a message it receives, can concurrently:

  • send a finite number of messages to other actors;
  • create a finite number of new actors;
  • designate the behavior to be used for the next message it receives.

One of the properties of such a system is that failure propagation is reduced, and as a consequence individual actors become more robust.

The programming language Erlang was specifically designed for telephony switches and supports the actor model.

State Machines

A pattern that is common in real-time & embedded software engineering are state machines. State machines can be implemented on top of actors, but also provide a mechanism to represent complex states and associated behavior.

Finite state machines (FSM) are a possibility, but they quickly start to get large and difficult to maintain because of State Explosion. A more expressive formalism that solves this problem are Hierarchical State Machines (HSM) as originally developed by David Harel.

A more recent implementation of the same semantics that fits object-oriented design is the UML State Machine, see Section 15 of the UML specification. This defines a model for state machines complete with their execution semantics.

Community
  • 1
  • 1
theDmi
  • 17,546
  • 6
  • 71
  • 138