Design Patterns for Complex Multithreading Tasks for Telecommunications Programs

In Martin Fowler's Book of Enterprise Application Architecture Templates, which he writes on page 2: "In a sense, enterprise applications are much simpler than telecommunications software - we do not have very difficult multithreading problems ...".

Does anyone know a summary of these "very complex multithreading issues" and design pattern solutions such as the famous GoF Design Patterns book?

There is a POSA book . But these books may be too general and fundamental. More focused examples are what this question is about.

+5
source share
2 answers

Take Joe Armstrong's dissertation since 2003:

Creation of reliable distributed systems in the presence of software errors .

Armstrong developed software for a high-speed network switching device at one time at Ericsson. It was implemented at Erlang, which was specifically designed to provide highly reliable and highly competitive applications.

In his thesis, he presents the main design solutions for the Erlang language itself and the OTP library (Open Telecom Platform). He also gives some suggestions on how to create application modules for such applications - this part is closest to your β€œdesign pattern”, although not in the details that you are used to after reading GoF design patterns.

This is not a recipe book, but it nevertheless draws some interesting conclusions about how applications should be developed.

+4
source

Actors

actor model - an architectural template in which the system consists of a set of loosely coupled entities that interact through messaging.

An actor is a computational entity that, in response to a received message, can simultaneously:

  • send a finite number of messages to other participants;
  • create a finite number of new members;
  • specify the behavior that will be used for the next message he receives.

One of the properties of such a system is that the spread of failure is reduced, and, as a result, individual entities become more reliable.

Erlang programming language has been specifically designed for telephone switches and supports the actor model.

State machines

A template that is commonly used in real time and with embedded software is government machines. State machines can be implemented on top of actors, but they also provide a mechanism for representing complex states and related behavior.

Finite state machines (FSM) are an opportunity, but they are quickly starting to become large and difficult to maintain due to State Explosion . A more expressive formalism that solves this problem is Hierarchical State Machines (HSM), as originally developed by David Harel .

A later implementation of the same semantics that are suitable for object-oriented design is the UML state machine, see section 15 of the UML specification . This defines the model for the final machines complete with the semantics of their implementation.

+1
source

Source: https://habr.com/ru/post/1233678/


All Articles