You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[Proxy](proxy.go)|an object funnels operations to something else|
32
+
|[Facade](facade.go)|Uses one class as an API to a number of others |
33
+
|[Flyweight](flyweight.go)|Reuses existing instances of objects with similar/identical state to minimize resource usage|
34
+
|[Model View Controller](mvc.go)|Divides an app into three interconnected parts to separate internal representation from presentation to user|
35
+
|[Proxy](proxy.go)|Provides a surrogate for an object to control it's actions|
39
36
40
37
__Behavioral Patterns__:
41
38
42
39
| Pattern | Description |
43
40
|:-------:| ----------- |
44
-
|[Chain](chain.go)| apply a chain of successive handlers to try and process the data |
45
-
|[Catalog](catalog.go)| general methods will call different specialized methods based on construction parameter |
46
-
|[Chaining Method](chaining_method.go)| continue callback next object method |
47
-
|[Command](command.go)| bundle a command and arguments to call later |
48
-
|[Mediator](mediator.go)| an object that knows how to connect other objects and act as a proxy |
49
-
|[Memento](memento.go)| generate an opaque token that can be used to go back to a previous state |
50
-
|[Observer](observer.go)| provide a callback for notification of events/changes to data |
51
-
|[Registry](registry.go)| keep track of all subclasses of a given class |
52
-
|[Specification](specification.go)| business rules can be recombined by chaining the business rules together using boolean logic |
53
-
|[State](state.go)| logic is organized into a discrete number of potential states and the next state that can be transitioned to |
54
-
|[Strategy](strategy/strategy.go)| Encapsulates an algorithm inside a struct |
55
-
|[Template](template.go)| an object imposes a structure but takes pluggable components |
56
-
|[Visitor](visitor.go)| invoke a callback for all items of a collection |
41
+
|[Chain of Responsibility](chain_of_responsibility.go)| Avoids coupling a sender to receiver by giving more than object a chance to handle the request |
42
+
|[Command](command.go)| Bundles a command and arguments to call later |
43
+
|[Mediator](mediator.go)| Connects objects and acts as a proxy |
44
+
|[Memento](memento.go)| Generate an opaque token that can be used to go back to a previous state |
45
+
|[Observer](observer.go)| Provide a callback for notification of events/changes to data |
46
+
|[Registry](registry.go)| Keep track of all subclasses of a given class |
47
+
|[State](state.go)| Encapsulates varying behavior for the same object based on its internal state |
48
+
|[Strategy](strategy/strategy.go)| Enables an algorithm's behavior to be selected at runtime |
49
+
|[Template](template.go)| Defines a skeleton class which defers some methods to subclasses |
50
+
|[Visitor](visitor.go)| Separates an algorithm from an object on which it operates |
57
51
58
52
__Synchronization Patterns__:
59
53
60
54
| Pattern | Description |
61
55
|:-------:| ----------- |
62
-
|[Lock/Mutex](mutex/mutex.go)| Enforces mutual exclusion limit on accessing a resource |
63
-
|[Read-Write Lock](read_write_lock.go)||
64
-
|[Condition Variable](condition_variable.go)||
56
+
|[Condition Variable](condition_variable.go)| Provides a mechanism for threads to temporarily give up access in order to wait for some condition |
57
+
|[Lock/Mutex](mutex/mutex.go)| Enforces mutual exclusion limit on a resource to gain exclusive access |
65
58
|[Monitor](monitor.go)| Combination of mutex and condition variable patterns |
59
+
|[Read-Write Lock](read_write_lock.go)| Allows parallel read access, but only exclusive access on write operations to a resource |
66
60
|[Semaphore](semaphore/semaphore.go)| Allows controlling access to a common resource |
67
61
68
62
__Concurrency Patterns__:
69
63
70
64
| Pattern | Description |
71
65
|:-------:| ----------- |
72
-
|[Scheduler](scheduler.go)||
73
-
|[Barrier](barrier.go)||
74
-
|[Producer Consumer](producer_consumer.go)||
75
-
|[Futures](future.go)||
76
-
|[Broadcast](broadcast.go)||
77
-
|[Multiplex](multiplex.go)||
78
-
|[Generators](generator.go)||
79
-
|[Coroutines](coroutine/coroutine.go)||
80
-
|[Parallelism](parallelism/md5.go)| Completes large number of indenpendent tasks |
66
+
|[N-Barrier](barrier.go)| Prevents a process from proceeding until all N processes reach to the barrier |
81
67
|[Bounded Parallelism](bounded_parallelism/md5.go)| Completes large number of indenpendent tasks with resource limits |
68
+
|[Broadcast](broadcast.go)| Transfers a message to all recipients simultaneously |
69
+
|[Coroutines](coroutine/coroutine.go)| Subroutines that allow suspending and resuming execution at certain locations |
70
+
|[Generators](generator.go)| Yields a sequence of values one at a time |
71
+
|[Reactor](reactor.go)| Demultiplexes service requests delivered concurrently to a service handler and dispatches them syncronously to the associated request handlers |
72
+
|[Parallelism](parallelism/md5.go)| Completes large number of indenpendent tasks |
73
+
|[Producer Consumer](producer_consumer.go)| Separates tasks from task executions |
74
+
|[Scheduler](scheduler.go)| Orchestrates steps to be performed as part of a task |
82
75
83
76
__Messaging Patterns__:
77
+
78
+
| Pattern | Description |
79
+
|:-------:| ----------- |
84
80
|[Fan-In](fan/fan_in.go)| Funnels tasks to a work sink (e.g. server) |
|[Futures & Promises](futures_promises.go)| Acts as a place-holder of a result that is initally unknown for synchronization purposes |
86
83
|[Publish/Subscribe](publish_subscribe.go)| Passes information to a collection of recipients who subscribed to a topic |
87
-
|[Request & Reply](fan)||
88
-
|[Push & Pull](fan)||
84
+
|[Push & Pull](push_pull.go)| Distributes messages to multiple workers, arranged in a pipeline |
89
85
90
86
91
87
__Stability Patterns__:
92
88
93
89
| Pattern | Description |
94
90
|:-------:| ----------- |
95
-
|[Bulkheads](bulkhead.go)||
96
-
|[CircuitBreaker](circuitbreaker/circuit_breaker.go)| Stops the flow of the requests when requests are likely to fail |
97
-
|[Deadline](deadline.go)||
98
-
|[FailFast](fail_fast.go)||
99
-
|[Handshaking](handshaking.go)||
100
-
|[SteadyState](steady_state.go)||
91
+
|[Bulkheads](bulkhead.go)| Enforces a principle of failure containment (i.e. prevents cascading failures)|
92
+
|[Circuit-Breaker](circuitbreaker/circuit_breaker.go)| Stops the flow of the requests when requests are likely to fail |
93
+
|[Deadline](deadline.go)|Allows clients to stop waiting for a response once the probability of response becomes low (e.g. after waiting 10 seconds for a page refresh)|
94
+
|[Fail-Fast](fail_fast.go)| Checks the availability of required resources at the start of a request and fails if the requirements are not satisfied|
95
+
|[Handshaking](handshaking.go)|Asks a component if it can take any more load, if it can't the request is declined |
96
+
|[Steady-State](steady_state.go)| For every service that accumulates a resource, some other service must recycle that resource|
101
97
102
98
__Profiling Patterns__:
103
99
@@ -115,7 +111,7 @@ __Anti-Patterns__:
115
111
116
112
| Pattern | Description |
117
113
|:-------:| ----------- |
118
-
|[Cascading Failures]()||
114
+
|[Cascading Failures]()|A failure in a system of interconnected parts in which the failure of a part causes a domino effect |
0 commit comments