eEcho blog

is een halte van de gedachte

Archive for the ‘Design pattern’ Category

Reactor pattern

De reactor design patroon is een concurrent programming patroon voor de behandeling van verzoeken geleverde dienst gelijktijdig aan een dienst handler door een of meer ingangen. De dienst handler dan demultiplexes de inkomende verzoeken en roept hen synchroon aan de bijbehorende verzoek omgaan.
Structure
* Resources: Alle middelen die kunnen dienen als input […]

Thread-local storage

Thread-local storage (TLS) is een computer programmering methode die gebruik maakt van statische of globale lokale geheugen aan een draadje.
Dit is soms nodig omdat alle draden in een proces delen hetzelfde adres ruimte. Met andere woorden, gegevens in een statische of globale variabele is normaal gesproken altijd gevestigd op dezelfde plaats, als bedoeld door de […]

Thread pool pattern

In the thread pool pattern in programming, a number of threads are created to perform a number of tasks, which are usually organized in a queue. Typically, there are many more tasks than threads. As soon as a thread completes its task, it will request the next task from the queue until all tasks have […]

Scheduler pattern

In computer programming, the scheduler pattern is a software design pattern. It is a concurrency pattern used to explicitly control when threads may execute single-threaded code.
The scheduler pattern uses an object that explicitly sequences waiting threads. It provides a mechanism to implement a scheduling policy, but is independent of any specific scheduling policy — the […]

Read/write lock pattern

A read/write lock pattern or simply RWL is a software design pattern that allows concurrent read access to an object but requires exclusive access for write operations.
In this pattern, multiple readers can read the data in parallel but an exclusive lock is needed while writing the data. When a writer is writing the data, readers […]

Monitor (synchronization)

A monitor is an approach to synchronize two or more computer tasks that use a shared resource, usually a hardware device or a set of variables. With monitor-based concurrency, the compiler or interpreter transparently inserts locking and unlocking code to appropriately designated procedures, instead of the programmer having to access concurrency primitives explicitly.
Invented by Per […]

Guarded suspension

In concurrent programming, guarded suspension is a software design pattern for managing operations that require both a lock to be acquired and a precondition to be satisified before the operation can be executed. The guarded suspension pattern is typically applied to method calls in object-oriented programs, and involves suspending the method call, and the calling […]

Double-checked locking

In software engineering, double-checked locking is a software design pattern also known as “double-checked locking optimization”. The pattern is designed to reduce the overhead of acquiring a lock by first testing the locking criterion (the ‘lock hint’) in an unsafe manner; only if that succeeds does the actual lock proceed.
The pattern, when implemented in some […]

Balking pattern

The Balking pattern is a software design pattern that only executes an action on an object when the object is in a particular state. For example, if an object reads ZIP files and a calling method invokes a get method on the object when the ZIP file is not open, the object would “balk” at […]

Active Object

This article is about a multi-threading technique. For the lockstep protocol variant, see Active objects.
The Active Object design pattern decouples method execution from method invocation that reside in their own thread of control. The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests.
The pattern consists of six elements:
[…]

Hierarchical visitor pattern

In software engineering, the hierarchical visitor pattern is one of design patterns that intend to provide a way to visit every node in the hierarchical data structure such as a tree.

Single-serving visitor pattern

In computer programming, the single-serving visitor pattern is a design pattern. Its intent is to optimise the implementation of a visitor that is allocated, used only once, and then deleted (which is the case of most visitors).
Applicability
The single-serving visitor pattern should be used when visitors do not need to remain in memory. This is often […]

Visitor pattern

In object-oriented programming and software engineering, the visitor design pattern is a way of separating an algorithm from an object structure upon which it operates. A practical result of this separation is the ability to add new operations to existing object structures without modifying those structures. Thus, using the visitor pattern helps conformance with the […]

Template method pattern

In software engineering, the template method pattern is a design pattern. It is a so-called behavioral pattern, and is unrelated to C++ templates.
In a template pattern, the model (data such as XML, or a set of APIs) has no inherent knowledge of how it would be utilized. The actual algorithm is delegated to the views, […]

Specification pattern

In computer programming, the specification pattern is a particular software design pattern, whereby business logic can be recombined by chaining the business logic together using boolean logic.
A Specification pattern outlines a unit of business logic that is combinable with other business logic units. In this pattern, a unit of Business Logic inherits its functionality from […]

Strategy pattern

In computer programming, the strategy pattern (also known as the policy pattern) is a particular software design pattern, whereby algorithms can be selected at runtime.
In some programming languages, such as those without polymorphism, the issues addressed by this pattern are handled through forms of reflection, such as the native function pointer or function delegate syntax.
This […]

State pattern

The state pattern is a behavioral software design pattern, also known as the objects for states pattern. This pattern is used in computer programming to represent the state of an object. This is a clean way for an object to partially change its type at runtime.
Take for example, a drawing program, in which there could […]

Observer pattern

The observer pattern (sometimes known as publish/subscribe) is a design pattern used in computer programming to observe the state of an object in a program. It is related to the principle of implicit invocation.
This pattern is mainly used to implement a distributed event handling system. In some programming languages, the issues addressed by this pattern […]

Memento pattern

The memento pattern is a software design pattern that provides the ability to restore an object to its previous state (undo via rollback).
The memento pattern is used by two objects: the originator and a caretaker. The originator is some object that has an internal state. The caretaker is going to do something to the originator, […]

Mediator pattern

The mediator pattern is a software design pattern that provides a unified interface to a set of interfaces in a subsystem. It’s one of the 23 design patterns described by the Gang of Four. This pattern is considered to be a behavioral pattern due to the way it can alter the program’s running behavior.
Usually a […]

 

Home | info@eecho.info | Voorwaarden | Blog