'마샬링'에 해당되는 글 1건

  1. 2008/01/18 COM Architecture : Interface Marshaling, IDispatch interface
참고:
본 글은 COM(Component Object Model)의 개념을 재정리하기 위해 스터디용으로 작성되었습니다.
Interface Marshaling

1. marshaling의 개념

- COM 서버는 위치 투명성을 지원한다. 즉 COM 클라이언트와 동일 프로세스 내에 있던(in-process server), 동일 머신 타 프로세스로 존재하던지(out-of-process server), remote 머신에 있건(remote server) 상관하지 않는다. 이는 각기 다른 매커니즘을 통한 데이터 통신을 동일한 인터페이스로 이룰 수 있도록 해야한다는 이야기. marshaling은 위의 세 경우 중 프로세스 경계를 넘어 데이터를 전송하는 out-of-process server, remote server를 위한 데이터 전송 매커니즘이다.

2. marshaling의 종류
- standard marshaling, Automation marshaling, custom marshaling의 세 가지가 존재하며, automation marshaling은 프로그래밍 언어간 교차지원을 위한 것이다.
- standard marshaling : MIDL 컴파일러는 IDL(Interface Definition Language) 코드를 컴파일하여 proxy와 stub를 구현한 C 코드를 생성한다. proxy는 COM client에, stub은 COM server에 각각 붙는 양자간 데이터 전송을 위한 메커니즘이다.
- Automation marshaling : automation은 C++ 이외의 언어(주로 Visual Basic 또는 VBScript)로 작성된 클라이언트가 COM 컴포넌트에 접근 가능하도록 하는 기술이다. IDispatch interface를 구현함으로 Automation marshaling을 이룬다. 성능이 standard marshaling에 비해 떨어지는 단점이 존재한다.
- Custom marshaling : Standard marshaling이 적합하지 않은 경우에 사용한다. IMarshal interface 구현을 통해 이루며, 메모리 공유, (참조가 아닌) 값에 의한 marshaling, (비동기 호출 등의 기법을 통해 성능 향상을 위한) Smart proxy, COM threading model 무시 등을 위해 custom marshaling을 사용한다.

more..

2008/01/18 15:51 2008/01/18 15:51

트랙백 주소 :: http://anyflow.net/trackback/332

댓글을 달아 주세요