서버 프로그래밍

IOCP 실행순서 보장 번역 오류!...

하늘흐늘 2009. 5. 14. 23:11
반응형

Before continuing, there is one other important aspect about Windows completion ports that needs to be stressed. All overlapped operations are guaranteed to be executed in the order that the application issued them. However, the completion notifications returned from a completion port are not guaranteed to be in that same order. That is, if an application posts two overlapped WSARecv operations, one with a 10 KB buffer and the next with a 12 KB buffer, the 10 KB buffer is filled first, followed by the 12 KB buffer. The application's worker thread may receive notification from GetQueuedCompletionStatus for the 12 KB WSARecv before the completion event for the 10 KB operation. Of course, this is only an issue when multiple operations are posted on a socket.

... "In Network Programming for Microsoft Windows"

찾은곳:

http://www.gpgstudy.com/forum/viewtopic.php?p=14583&sid=5ac64784ef3cfebf3a8ab47fa3fdcf59

번역서: NETWORK PROGRAMMING FOR MICROSOFT WINDOWS
정오표:

http://www.infopub.co.kr/pdspool/common/correct_bug/NetworkProg%EC%A0%95%EC%98%A4%ED%91%9C.hwp

원서의 내용
All overlapped operations are guaranteed to be executed in the order that the application issued them. However, the completion notifications returned from a completion port are not guaranteed to be in that same order.

번역서의 내용
모든 overlapped 작업은 그것을 요청한 순서대로 작업이 완료되는 것을 보장하지 않는다. completion port에서도 마찬가지로 요청한 순서와 같은 순서로 작업이 완료되지 않는다.

정오표 내용으로 수정한 내용
모든 overlapped 작업은 그것을 요청한 순서대로 작업이 완료되는 것을 보장하지만. completion port에서는 요청한 순서와 같은 순서로 작업이 완료되는 것을 보장하지 않는다"

대박 번역 오류군요, 이게 무슨 말이냐 하면 IOCP로 WSARecv(..) 나 WSASend(..)를 할 때의 실행 순서의 보장을 의미하는 겁니다. 즉, 아래와 같은 코드가 있다고 가정할 때... 

WSASend(버퍼1);
WSASend(버퍼2);  

정오표 전의 번역으로 이해하면 (일반 소켓IO와는 다르게) 버퍼1의 내용이 먼저 보내질지, 버퍼2의 내용이 먼저 보내질지를 알 수 없다는 말이됩니다.
반대로 정오표를 적용한 혹은 원서 그대로의 내용으로 이해하면 (일반 소켓IO와 똑같이) 버퍼1이 보내지고 버퍼2가 보내지는 것을 보장하지만 버퍼2 완료에 통지가 버퍼1 완료에 대한 통지보다 먼저 나올 수도 있다라는 의미가 됩니다.

뭔가 이상해서 찾아봤으니 다행이지만, 단 1줄 번역 오류가 설계에 엄청난 영향을 줄 수도 있는 문제인데... 더우기 IOCP면...

물론, 이 책 번역한 분 너무 열정적으로 번역을 해서 굉장히 만족한 번역서 중에 하나였는데...


반응형

'서버 프로그래밍' 카테고리의 다른 글

TCP ECN(Explicit Congestion Notification)  (0) 2009.06.01
IP(Internet Protocol) Note #1  (0) 2009.05.27
Overlapped I/O Note #2 서버개발전략  (0) 2009.05.18
Overlapped I/O Note #1  (0) 2009.05.17
TCP Note #2 Gracefully Close(..)  (0) 2009.05.13
TCP & UDP Note #1  (0) 2009.05.12
TCP관련 문서들  (0) 2009.05.06
TCP/IP에 대한 유용한 글 모음  (0) 2009.04.30