http://images.amazon.com/images/P/0471958697.01.PE_PIm.arrow,TopLeft,-2,-19_SCMZZZZZZZ_.jpg
0471958697 http://images.amazon.com/images/P/0471606952.01.PE_PIm.arrow,TopLeft,-2,-19_SCMZZZZZZZ_.jpg
0471606952


1. ������ ¶
- 3������ ������ ������(�����트������ ������,������ ���������, idioms)������ ��������� 패������ ������하������ ��� ������ ������히 ������ ������. ������한 통합������ ������ ������ ��������������� ������ ������������, ��������� 12������ 패������ ��������� ������������ ��������� ������ ������ ������.
- ������한 ��������� ��������� ������트��� ������ 하��� ������������.
- ��������� ������ ������ 하������ ������ ��� 환������������.
- ������ ��������� 해������ ��������� ������������ ������ ������한 ������ ��������� ������해��������� ������ 하������������. ^^;
2.2. 2. Architectual Patterns ¶
- �����트������ ������������ ������������ ������������ 패��������� ���������.
- 크��� ��������� ������������ ������ ��� ������.
������ | ������ 패��� | ������ |
From Mud to Structure | Layer, Blackboard Pattern | ������������ ������템��� ���호 협���하��� 하��� ������������ ������������ ������ 힌���. |
Distributed Systems | Broken Patterns | use in distributed application |
Interactive Systems | Model-View-Controlled, Presentation-Abstraction-Control Pattern | - |
Adaptable Systems | Microkernel pattern | - |
2.2.1. Layers ¶
- ������(Example) : ��� 패������ ��������� ������������ 흔히 ������ ��� ��� ������ 패���������. TCP/IP��� ��� ���표������ ������ ���������.
- 환���(Context) : ���해��� �����한 큰 ������템
- ������ 해���할 ������(Problem - balance in following forces)
- ��������� ������������ ��������� ��������� ���한 component������ ���향��� ������������ ������ component��������� ���향��� ������������ ���������.
- interface��� ������������������ 한���.
- ������템��� ��� ��������� ���환 ������해��� 한���. (Design for change in general is a major facilitator of graceful system evolution - ��������������� ���화��� ������한 ������������ 하��������� ������한 ������템 ��������� ������한 ���������������.)
- It may be necessary to build other systems at a later date with the same low-level issues as the system you are currently designing ( ���확한 ��������� ������������, ������ 해������....)
- ���해하��� ������ ��������������� 하��� ������ 하��� ���해��� ������한 �����한 ������(responsibilities)��� ������화 한���.
- ��������� ������ component ��������� ������.
- component ��������� ������ 하��������� ��������� ���하��� ������한���. ������ ������ ������ ������ ������������ ������������ ��������� ���한 ������ ������ ������하��� component ��������� ��������� ������ ������������.
- ��������� ������������ ��������� ������������ �������������� ������ �������� ��������� 할��� ������ ���������������.
- ��������� ������������ ��������� ��������� ���한 component������ ���향��� ������������ ������ component��������� ���향��� ������������ ���������.
- 해������(Solution) : ��������� ������템��� ������한 ��������� ������������ ��������� ��� ������������ ��������� ��������� ������ ���������
- ������(Structure) : ������������ ��������� ������ ������ ��������� ��������� ������.
- Class : ��������� J
- 해���할 ������(responsibility)
- ��������� J+1��� ���해��� ��������� ������������ ������한���.
- 하��� ��������� ��������� J-1������ ���������.(������한���)
- ��������� J+1��� ���해��� ��������� ������������ ������한���.
- 협������(collaborator) : ��������� J-1
- ��������� 패������ ������한 ������������ �������� ��������� J��� ������ ��������� J+1��� ���해������ ��������� ��� ��������� ���������. (���택������ ���파��� ������할 ��� ������)
- Class : ��������� J
- Dynamics
- Scenario1 - top-down communication, ������ ��� ������������������. 클���������트��� ��������� N������ ��������� 한���. ��������� ��������� N��� ����� ������ ��������� 할 ��� ������ ��������� 하��� ��������� ��������� N-1������ ���������. ��������� ��������� N-1��� ��������� ������ 하��� ��������� N-2������ 하��� ��������� ���������, ������������ ��������� ��������� 1��� ������할��������� ��������� ������. ��������� ������ ������ ��������� ������������ ���행������. ������ �����하������ ������한 ��������� ���한 ������������ ��������� 1������ ��������� 2, ��������������� ��������� N��� ������할��������� ���������������. ������한 top-down ���통��� �������� ��������� J��� ������ ��������� J+1��������� ��� 하������ ��������� ������������ ������������ ��������� ��������� J-1������ ���한���. ������ ��������� J��� ��������� J-1������ ��� ��������������� ������������. ��� ������������������ ��������� ��������� ��� ������������������ ������ ������ ������해������ ���해��� ������������.(������ ������ ������한 ������ ����������������� ��������������� ������한 ������������ ������ 한���.)
- Scenario2 - bottom-up communication, ��������� 1������ ������하��� ������������ ���������������. top-down communicatin��� 헷������ ������ ��������� top-down communication��� ������(requests)��� ���해��� ������하������, bottom-up communication��� 통���(notifications)��� ���해��� ������한���. ������ ��������� ��������� 키������ ���판��� ������, ������1 키������������ ��������� ������ N��� ��������� ������������ 통������ 한���. bottom-up communicatin��������� top-down communication������ ��������� ������������ bottom-up 통������(notifications)��� 하������ 통������ ��������������� ������ ������������ ��������������� ��������� ������������.
- Scenario3 - ��������� N-1��� cache��� ������하������, ��������� N��� ��������� ��������� N-1��������� ������������ ��������� 하��� ������������ ������������ ���������. ��������� ������������ 하��� ��������������� ���태��� ������(stateless) ��������� ������한 cache ������������ ���태 ��������� ������한���. ���태��� ������ ��������������� �������������� ������하��� 한������ ��������� ������.
- Scenario4 - ��������� 1������ event��� ������������������ ��������� 3��������� ������ ��������� ������ ������ ��������� ������ ������, ������ ��������� ������ ���한 클���������트��� ������������ ������하���, ��� ������������ ������ ������ ������하��� ��������� ��������� ������������ ������ ������������ ��������� ��������� ��������� ������������ ������하��� ������. ������ ��������� ��������� ��������� ��������� ������ ������������ ������ ��� ��������� ��������� ������ ������ 한���.
- Scenario 5 - N������ ��������������� ������������ 2������ stack ������ ������ ���통 하��� ������������. 통��� �����토������ ���표������ ���������. 한������ ��������� N������ ��������� ��������� ������ 하��� ��������� 1(하��������� ������)��� 통해��� ������편 하��� ���������1��� ���해������, ��������� ��� N ������������ ��� ������������.
- Scenario1 - top-down communication, ������ ��� ������������������. 클���������트��� ��������� N������ ��������� 한���. ��������� ��������� N��� ����� ������ ��������� 할 ��� ������ ��������� 하��� ��������� ��������� N-1������ ���������. ��������� ��������� N-1��� ��������� ������ 하��� ��������� N-2������ 하��� ��������� ���������, ������������ ��������� ��������� 1��� ������할��������� ��������� ������. ��������� ������ ������ ��������� ������������ ���행������. ������ �����하������ ������한 ��������� ���한 ������������ ��������� 1������ ��������� 2, ��������������� ��������� N��� ������할��������� ���������������. ������한 top-down ���통��� �������� ��������� J��� ������ ��������� J+1��������� ��� 하������ ��������� ������������ ������������ ��������� ��������� J-1������ ���한���. ������ ��������� J��� ��������� J-1������ ��� ��������������� ������������. ��� ������������������ ��������� ��������� ��� ������������������ ������ ������ ������해������ ���해��� ������������.(������ ������ ������한 ������ ����������������� ��������������� ������한 ������������ ������ 한���.)
- ���행(implementation) - ������ ��������� ������ application��� ��������� ������ ������ ��������������� 할 ������ ������. ������ bottom-up������ yo-yo ������������ ������하��������� ��� ������������ ���������. ��������� application��� �����하��� ������ ��������� ��������� 하��� ������.
- task(������,���) ������ ������������ ������하��� ���한 ������������ ��������� ������ 하������. ������������ �����트������ ������������ ��������� ������ ������������ ������������ ��합��� ������한���. ��������������� 하��������������� ������������ ��� ��������� ������������ ��������� ���하���, ������������ ��������������� ��� ��������� ��������� ���한���.
- ��������� ������������ ��������� ��������� ������ ������������ ��������� ���하������. trade-off��� ������해��������� ������������ 통합하������ ������해���. ������ ������ ������������ �������������� ������한 ��������� ������, ������ ������ ������������ ��������������� ������ ������ ������.
- ��������������� ��������� ���하��� ��� ������������ tasks(������)��� ���해 ���������. ������ ������������ tasks��� ������ ������ ������ ������������ ��������� 한���.
- services ������ ���확히 하������. ������ ������한 ����� ��������� ��������������� ������하��� ������ ������ ��������� 한������ ���������. ������������ ��������� ������������ ��������� ������한 layering ���하��� 한���. ��������� ������ ��������������� ������ ������������ ��� ������ service��� ������������ ��� ������.
- Refine layering. ������ 1~4��� ��������� ������ 하������.
- task(������,���) ������ ������������ ������하��� ���한 ������������ ��������� ������ 하������. ������������ �����트������ ������������ ��������� ������ ������������ ������������ ��합��� ������한���. ��������������� 하��������������� ������������ ��� ��������� ������������ ��������� ���하���, ������������ ��������������� ��� ��������� ��������� ���한���.
~cpp ���포���트��� ������������ ������������ ������ | ������������ |=> ������������ ������ 하��������� define components and service ��������������� ��������� | ��� ��������� ��������� ������ ��������� ������������.
- ��� ������������ ���한 ������페��������� ���확히 해��� (������한한 black-box ��������� ������하��� ������ ������, ��������� ������템 ��������� ������������ ������������. 효��������� ������ ������������ ��������� ������할 �������� ������������ ������������.)
- ��� ������������ ������화 하������. ������ ������������ ������하��� component������ ��������� ������ 한���.
- ������한 ������������ ��������� ���통��� ���확히 하������.
- Decouple adjacent layers
- ���형(variants)
- Relaxed Layered System : ���������템��� 통해��� ������ ������������ ��������� 향������ ������������ ��������� ���하��� ������������. application �����트������ ������ infrastructure(������������) ������템������ ������ ������. UNIX, X Window System��� ������������.
- Layering Through Inheritance : ������ ��������� ��������� 패������ �����. ����� ������ OOP��� 할 ��� ������.
- Relaxed Layered System : ���������템��� 통해��� ������ ������������ ��������� 향������ ������������ ��������� ���하��� ������������. application �����트������ ������ infrastructure(������������) ������템������ ������ ������. UNIX, X Window System��� ������������.
- ��� 패������ ��������� ��������� (Known Uses)
- Virtual Muchines
- APIs
- Information System(IS)
- Windows NT
- Virtual Muchines
- ������
- ������
- ������������ ���활��� - �������������������� ����� ������하��� ������������ ��������� ��������� ������ ������������ ������ ������������ ��������� 하������������ ������ ������ ��������� ������. ��������� ����� ������하��� ������������ ���������(black-box reuse)하��� ������ ��������� ������ ��������� �������������� ������������ ������������ ������ ���킬 ��� ������.
- ��������� ������한���.
- Dependescies are kept local : ������������ ����� ������������ ������ ������ ��������� ��������� ������. ��������� ������템��� portability하��� ������.
- Exchangeability : ����� ������������ ������ ������ ��� ������. ��������� ��������� ��������������� ������ ��������� ������������ ������. ��������� ������ ������히 ��� ������ ������ ������������ ������페������������ ����������� ������ ������������ 한���.
- ������������ ���활��� - �������������������� ����� ������하��� ������������ ��������� ��������� ������ ������������ ������ ������������ ��������� 하������������ ������ ������ ��������� ������. ��������� ����� ������하��� ������������ ���������(black-box reuse)하��� ������ ��������� ������ ��������� �������������� ������������ ������������ ������ ���킬 ��� ������.
- ������한 ���(liability)
- cascades of changing behavior : ������������ ������������������ ��������� ��� ������페��������� ��������������� ������ ������������ ������해������ 한������ ��� ������.
- lower efficiency : ������������ ������������ ��������� 하������ ��������� ��� ��������� ������ ������할 ���������.
- Unnecessary work : ����������� ������ 하��� ��������� ������.
- ������������ ���확히 ������하��������� ��������� ���������.
- cascades of changing behavior : ������������ ������������������ ��������� ��� ������페��������� ��������������� ������ ������������ ������해������ 한������ ��� ������.
- ������
- ������ : ��� layer 패������ ���회������ ������ ��������������� ������하��� ������������ ������하������ ������한���. ������ ������하���, ��������������� ������������, ������������ ��� ������������ ������ ������하���. ��� 패������ ������하��� ������������ ��������������� ������해��� ��� 패������ ������하��� ������ ��������������� 하����� ������한 ������������ ������하������ ������했���.
2.2.2. Pipes and Filters ¶
- ������ : ������������ �������������� ��������� ������ ��������� ������했���.
- 환��� : ��������� 흐������ ������
- ������해���할 ������
- �������� ������템 향������ ������������ ���해��� ������, ������ ������(step)������ ������������ ������합 하��������������� ������해��� 한���.
- ������ ������ ��������� 큰 components ������ ������한 환������ ��������� 하��� ������.
- ������하��� ������ ��������� ��������� ������하��� ���������.
- ������ ��������� ���트���크 ������������ ������ ��������� ������하��� ��������� ������ ������한 ������ �������� source ��� ������한���.
- ������ ��������� ������한 ������������ ������하������ ����������� ������ ������해��� 한���.
- ��� ������������..
- �������� ������템 향������ ������������ ���해��� ������, ������ ������(step)������ ������������ ������합 하��������������� ������해��� 한���.
- ��� 패������ : data source - filter - pipes - filter - data sink, ��� ��������� ������ ������, ��� �������������� ������������ ������하��� 함������ ������ ��� ������. ��������� 패������ ������한 ������ ������������, ��� 패������ �������� ������ ������합��� ������������������. ��������� ������하��� ��������� ������템��� ������������ ��������� ������������ ��� ������.
- ������ : ��� 패������ ������������ ������해 ���������. ㅡㅡ;,
2.2.3. BlackBoard ¶
- ������ : ������������ ������������ ������템��� ������ ���������. ������������ �������������� ������ 하������ ��������� ������������ ������ ��������� ��������� ��������� �����한 application��� �����한 ��������� ������������ ������ ��������� ���한��� ������ ��������� ������ ���������. ���하��� output��� ��� ������ ������한������ ������ ������������ 표�������� ��������� ��������� ��� ���환 ������������ ��������� ���파��������� ������하��� ������, ������학������ ��������� ������하���������, 통��������� ��������������� ������하��� ������ �����하���.
- 환��� : ������한 solution��� ������ ������ ������하��� ������ ������
- ������해���할 ������ : ��������� ��������� ���한 해��������� ������ 표�������� paradigms ��� �����하���. ������ ��������� ��������� '������������ ������������ ����������� 해������'��� ��������� ���합��������� 하��������� ���해��� ������ ��������� ��������� ������. ��������� ��������� ������ ��������� ��������� 푸������ ���향��� ������������ force(��� 패������ ������������ ������?)���������.
- ������한 ��������� ������한 해��������� ������ ������ ��������� 하��� - 10������ ������(1000������ 하���)��� ���합하��� ������한 ��������� ���=>(1000)��� 10��� ��� ������ ���
- ��� ��������� ���������해���, ������ 하��� task��� ������������ ��������������� ������한���.
- ��� ��������� ��������� ����� ������한 ��������������� ������한���.
- input��� intermediate ��� ��������� result��� ��������������� ������한 표����� ������. ������������������ ������한 paradigm������ ���해��� ���행������.
- 하������ ��������������� ���통 ������ ��������������� ������ ��������� ������한���.
- ������확한 ������������ ������������ 해������(solution)������ 포함������.
- ������ ��������� ��������������� ������하��� ������하��� ������ ������������ 평형 ��������� ������한���.
- ������ ������������ ������������ ������ knowledge 표����� ������하��� 해���������. ��������� input������ ������한 표����� ��� ��� ������.
- ������������ ������템 ��������� application of knowledge��� ���해��� ������ 하������ ������ ��������� ������한���. ������한 표����� ���한 ������한 ������������ ������������ ��������� ������ ��������� �������� 한���.
- -
- ������한 ��������� ������한 해��������� ������ ������ ��������� 하��� - 10������ ������(1000������ 하���)��� ���합하��� ������한 ��������� ���=>(1000)��� 10��� ��� ������ ���
- 해������(solution) : Blackboard ��������� ���탕��� ������ ��������� ��������� ��������� ��������� ���해��� 협������������ ������하��� ��������� ����������������� ���합������. ��� ������������ ����������������� ������ ������ �������������� 호���하��� ������ ���한 ��������� 행������ ���해 ������ ��������� ��������� ������. ��������� ������템��� ���향��� ������ �������� ���태��� ���행(progress)��� ���해 ������������. ���������-������ ������ ������(data-directed control regime)��� opportunistic problem solving ������������ ���������. moderator(���������) component��� ������ 하��� ��������� component��� contribution��� ��������� ��������� ����������������� ���행������ ��������� ������한���.
- ������ : ��������� ������템��� blackboard(knowledge source������ ���합, control components)������ ������������ component��� ������������. blackboard��� ������ ��������� ���������������. solution space��� control data������ ������������ ��������� ������������. 하������ hypothesis��� ���통 ������������ ��������� ������. ��� ������������ ������ ��������� ������������ ��������� ������ ������ ������ ��� ��������� ������ ������(��������� ��������� ���하������ ������.)������. 'part-of'������'in-support of'��� ������ ��������� ��������� ��������� ���확��� 하��� ������ ���통 ������하���. blackboard ��� 3������ ������ ������������ ��� ������ ������. X��� - time, Y��� - abstraction, Z��� - alternative solution. knowledge source������ ��������������� ���통��� 하��� ���������. ��������� ������ blackboard������ ������ ������������. ������������ knowledge source ������ blackboard ��� vocabulary������ ���해해��� 한���. ��� knowledge source������ condition��������� action������������ ������ ��� ������. condition ��������� knowledge source��� ��������� 할��� ��������� ������하��� ���해��� blackboard��� ������������ ����� solution process ��� ���태��� ������한���. action ��������� blackboard��� ��������� ������ ��� ������ ���화��� ������킨���. control component ��� �������� ��������� blackboard��� ����������� ���화��� ������하��� ��������� ������ action��� ���할��� ������한���. blackboard component��� inspect��� update��� ��������� procedure��� ��������� ������.
~cpp Class : BlackBoard Responsibility : Manages central data Collaborators : - Class : Knowledge Source Responsibility : Evaluates its own applicability, Computes a result, Updates Black board Collaborators : Blackboard Class : Control Responsibility : Monitors Blackboard, Schedules Knowledge Source activations Collaborator : Blackboard, Knowledge Source
- Dynamices(������)
- ������ ��������� ������������ blackboard ��������� 행������ ���한 ������������.
- control component��� main loof��� ������������.
- nextSource() ������ blackboard��� ������함��������� ������ knowledge source��� ��������������� ���헌��������� ������한���.
- nextSource() ��� ����� knowledge source��� condition ��������� ������������.
- control component��� ��������� knowledge source��� ������������ ��������� ��������� 하������ hypothesis��� hypothesis ���합��� ���택한���. ��������������� condition ��������� ��������� ���해��� ��� ���택��� ���������������.
- control component��� main loof��� ������������.
- ������ ��������� ������������ blackboard ��������� 행������ ���한 ������������.
- �����(implementation) : blackboard pattern��� �����하������ ��������� ������ ��������� ���행하������.
- 1.������(problem)��� ������ 하������
- ��������� ��������� knowledge��� ������������ ������������ ���확히 하��� ������ 해������(solution)��� ������하������ �����하���.
- ������템��� ���한 input��� ������하��� ������하������.
- ������템��� output��� ������하������
- ������������ ������템��� ��������� ������ ������하������ ������히 ���하������.
- ��������� ��������� knowledge��� ������������ ������������ ���확히 하��� ������ 해������(solution)��� ������하������ �����하���.
- 2.��� ��������� ���한 solution space(해��� ������)��� ������하������.
- 1.������(problem)��� ������ 하������
~cpp top-level solution - highest abstraction level imtermediate solution - other level(except highest abstraction level) complete solution - solution which solve whole problem partial solution - solution which solve part of the problem complete solution��� intermediate ��������� ���할��� ������, partial solution��� ��������� top ��������� ���������.(���������������?ㅡㅡ;)