E D R , A S I H C RSS

Pattern Oriented Software Architecture

NoSmok:OpeningStatement

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


1. ����

  • 3 ���� ����(������� ����,���� ������, idioms)�������� 패��� ����하�� �� �� ���히 �� ����. ����한 통합���� �� ���� ���������� ������, ���� 12���� 패� ������ �������� ���� ���� ���� ��.

  • ���한 ������ ���� ����트 ���� 하�� ��������.
  • ���� ���� ���� 하���� ��������.
  • �� ���� 해�� ������ ���� ���� ����한 ���� ����해���� ���� 하��������. ^^;


2. Volume1

2.1. 1. Patterns

  • 패��� ���� ���� ���� ���� ������ ������.

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 �� ���� ���� ��������.
    • ������ �������� ���� ����� ������� ���� ��� ������ �� ����������.
  • ���(Solution) : ������ ����템 �������� �������� ���� �� ������ ������ ���� ���� ������
  • ����(Structure) : �������� ���� �� ���� ���� �� ����.
    • Class : ������ J
    • ����(responsibility)
      • ������ J+1�� ��해������ �� ����한��.
      • ���� ������ J-1���� ����.(��)
    • ����(collaborator) : ������ J-1
    • ������ 패��� ����한 �������� ��� ������ J�� ���� ������ J+1�� ��해�� ������ �� ������ ������. (��택���� ��파 ��할 �� ����)
  • 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 �������� �� ����.

  • ��행(implementation) - �� �� ���� application�� ������ �� �� �������� 할 ���� ����. ���� bottom-up���� yo-yo ������ �������� �� �� ������. ������ application�� ���하�� �� �� ����� 하�� ����.
    • task(��,) �� �������� ���하�� �������� �� ���� 하��. �������� ������� ������������ ���� �������� ������ � ����한��. ������� 하���������� ���� ���� �������� ���� ��하��, �������� ������ �� ���� ���� ��한��.
    • ���� �������� ���� ������ �������� �� ��하��. trade-off ����해���������� 통합하�� ��해. �� �� �������� ��������� ��한 ���� ����, �� �� �������� �������� �� ���� ����.
    • ���������� �� ��하�� �� �������� tasks(��) ��해 ��. ���� �������� tasks�� ���� ���� �� ������ ��.
    • services �� ��확히 하��. �� ����한 ��� �� ���������� ��하�� ���� �� �������� ������. �������� ������ �������� ���� ��한 layering ��하�� 한��. ������ �� ���������� �� �������� �� �� service ������ �� ����.
    • Refine layering. �� 1~4�� �� ���� 하��.

~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�� 할 �� ����.
  • �� 패��� ���� ������ (Known Uses)
    • Virtual Muchines
    • APIs
    • Information System(IS)
    • Windows NT
  • ����
    • ����
      • �������� ��활�� - ������������� ����하�� ������ ������ ������ �� �������� �������� ������ 하�������� ���� ���� ���� ����. ������ ��� ����하�� ������ ������(black-box reuse)하�� �� ������ ���� ������������ ������ ���� ���� ��킬 �� ����.
      • �� ��한��.
      • Dependescies are kept local : ������ ��� ���� �� ���� ������ ������ ����. ������템�� portability하�� ����.
      • Exchangeability : ��� ������ ���� �� �� ����. ���� ���� ������ ���� ������ ����. ������ �� ��히 �� �� �� �������� ����페�������� ������� ���� ��������.
    • ����한 ��(liability)
      • cascades of changing behavior : ������ ������������ �� �� ����페���� �������� ���� ����해������ �� ����.
      • lower efficiency : �������� ������ �������� �� ���� �� ��할 ����.
      • Unnecessary work : ������� �� ���� ����.
      • ������ ��확히 ����하������ ������ ����.
  • ���� : �� layer 패� ��회���� �� ��������하�� ���� ��하���� ����한��. ���� ��하��, ������ ����, ������ �� ���� ���� ����하��. �� 패��� ����하�� �������� ����������해�� 패� ����하�� �� ������ 하��� ����한 ������ ����하������했��.

2.2.2. Pipes and Filters

  • ���� : ������ ��������� ���� ���� ������했��.
  • �� : ������ 흐�� ����
  • ����해����
    • ����� ����템 향���� �������� ��해����, ���� ��(step)�� ������ ����합 하��������해��.
    • �� ���� �� 큰 components ���� ����한 환���� ������ 하�� ����.
    • ����하 �� ���� ���� ����하 ������.
    • �� �����트��크 �������� �� ���� ����하�� ���� ����한 ���� ����� source ����한��.
    • ���� �� ����한 ������ ��하�� ������� ���� ��해��.
    • ����..
  • �� 패� : 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�� ������ ���� �� ����한��. ����한 표��� ����한 ���� ������ ���� ���� ������ 한��.
    • -
  • ���(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 �� ���� ��해�� �택�� ����������.
  • ���(implementation) : blackboard pattern ������� ���� �� �� ��행하��.
    • 1.����(problem) ���� 하��
      • ������ ���� knowledge�� ������ ������ ��확히 하�� �����(solution) ����하���� ���하��.
      • ����템�� 한 input ���� ����하��.
      • ����템�� output ����하��
      • ������ ����템 ������ �� ����하�� ���히 ��하��.
    • 2.�� ������ 한 solution space(해�� ��) ����하��.

~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 ���� ������.(��������?ㅡㅡ;)




2.3. Thread

������� 키텍�� 패��� ���� ���� ���������� ���� ����합����. 1, 2�� ���� ���� 힘������ �� 1������ ������ ���� �� ��������. --JuNe

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:24:00
Processing time 0.0664 sec