This document discusses several enterprise design patterns including transaction patterns, concurrency patterns, and distributed architecture patterns. It provides details on ACID principles for transactions and concurrency patterns including Active Object, Half-Sync/Half-Async, Leader/Followers, and Thread-Specific Storage. The Active Object pattern decouples method execution from invocation using a proxy, client, and servant. The Half-Sync/Half-Async pattern uses asynchronous and synchronous layers with a queue. Leader/Followers uses a thread pool to share event sources. Thread-Specific Storage allows thread-local objects without locking overhead.
9. Active Object
It decouples method
execution from method
invocation to enhance
concurrency and simplify
synchronized access to
objects that reside in their
own thread of control
Components:
• Proxy
• Client
• Method Request object
• Activation list
• Scheduler
• Servant
11. Half-Sync/Half-Async
This pattern decouples
asynchronous and synchronous
service processing in concurrent
systems without reducing
efficiency.
Decompose services in the system
into two layers (synchronous and
asynchronous) and add a queuing
layer between them to mediate
the communication between
services in the asynchronous and
synchronous layers.
Components:
• Synchronous service layer
• Asynchronous service layer
• Queuing layer
• External event sources
• Asynchronous interrupts
strategy
• Proactive I/O strategy
• Notification strategy
12. Leader/Followers
This pattern provides an efficient
concurrency model where multiple
threads take turns sharing a set of event
sources in order to detect, demultiplex,
dispatch, and process service requests
that occur on the event sources
A pool of threads shares a set of event
sources efficiently by taking turns,
demultiplexing events that arrive on
these event sources and synchronously
dispatching the events to application
services that process them.
Components:
• Handle set
• Event handlers
• Thread pool
• Leader role
• Follower role
• Processing role
14. Thread-Specific Storage
This pattern allows multiple
threads to use one 'logically
global' access point to
retrieve an object that is local
to a thread—called a
'threadspecific object'—
without incurring locking
overhead for each access to
the object.
Components:
• Thread-specific object
• Key factory
• Thread-specific object set
• Thread-specific object proxy
• Application threads