어플 개발자의 서버개발 삽질기

23
어플 개발자의 서버개발 삽질기 2011 ..연말 세미나 발표 : 김연기

Upload: scor7910

Post on 23-Jun-2015

2.072 views

Category:

Education


10 download

TRANSCRIPT

Page 1: 어플 개발자의 서버개발 삽질기

어플 개발자의 서버개발 삽질기

2011 아.꿈.사 연말 세미나

발표 : 김연기

Page 2: 어플 개발자의 서버개발 삽질기

발표자 소개

• 이름 : 김연기 – @scor7910

– http://scor7910.tistory.com

• 2008.10 ~ 2011.10 Microsoft Visual C++ MVP

• 2007~2011/03 : Visual C++ 로 이런저런

어플 개발

• 2011/05 : 네시삼십삼분에서 서버 플랫폼 개발 삽질 시작…

Page 3: 어플 개발자의 서버개발 삽질기

Game4U Platform

Page 4: 어플 개발자의 서버개발 삽질기

Game4U Platform

Page 5: 어플 개발자의 서버개발 삽질기

Game4U Platform

Page 6: 어플 개발자의 서버개발 삽질기

Game4U Platform

Page 7: 어플 개발자의 서버개발 삽질기

Game4U Platform

Page 8: 어플 개발자의 서버개발 삽질기

왜 삽질을 했는가?

• 플랫폼 아키텍처 이해 부족.

• 경험 부족. – Boost::asio

– WEB

– Database

Page 9: 어플 개발자의 서버개발 삽질기

Boost::asio • 멀티쓰레드 I/O 조심!!

– 외부 쓰레드에서 소켓핸들의 close/write는 Io_service::post를 사용.

• template< typename CompletionHandler> void

post( CompletionHandler handler);

• 종료는 우아하게(Graceful closure)

Page 10: 어플 개발자의 서버개발 삽질기

Dead Lock

Page 11: 어플 개발자의 서버개발 삽질기

Dead Lock const BOOL& CAxisOfDevil::DoSomething()

{

EnterCriticalSection(&m_CS);

UINT i=0;

while(1)

{

++i;

if(i==1000)

{

Sleep(10);

return FALSE;

}

}

LeaveCriticalSection(&m_CS);

return TRUE;

}

Page 12: 어플 개발자의 서버개발 삽질기

Dead Lock const BOOL& CAxisOfDevil::DoSomething()

{

EnterCriticalSection(&m_CS);

UINT i=0;

while(1)

{

++i;

if(i==1000)

{

Sleep(10);

return FALSE;

}

}

LeaveCriticalSection(&m_CS);

return TRUE;

}

Page 13: 어플 개발자의 서버개발 삽질기

DUMP Analysis

• !analyze –v –hang

• Kn , .frame, dv, dt

• !for_each_frame dv /i /t /V

03 0532fdc8 00414834 mtgdi!CBallThread::SingleStep+0x147 [c:\downloads\mtgdi\threads.cpp @ 180] prv local 0532fdc4 @ebp-0x04 class CBallThread * this = 0x043349f0 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 04 0532fe20 00414d8c mtgdi!CGDIThread::InitInstance+0x44 [c:\downloads\mtgdi\threads.cpp @ 65] prv local 0532fe1c @ebp-0x04 class CGDIThread * this = 0x043349f0

Page 15: 어플 개발자의 서버개발 삽질기

Googleing

– 내가 격고 있는 문제는 대부분 누군가 격은 문제.

– 단어 조합을 잘 하자 힠~

• 영어와 친하게 지내요~

– Google 미쿡을 기본 검색 페이지로~~

• Error/Exception 코드 + when + …

Page 16: 어플 개발자의 서버개발 삽질기

WEB

• Try / catch 는 무의식적으로…

• Application Log를 보자!

Page 17: 어플 개발자의 서버개발 삽질기

HTML 5

• 안드로이드는 무조건 안된다고 보자.. @,.@

• C++에 Boost가 있다면, 웹엔 Jquery??

• 모바일 플랫폼에서 적용 가능한지 검증이 중요!

Page 18: 어플 개발자의 서버개발 삽질기

Communication

나는 관대하다.

Page 19: 어플 개발자의 서버개발 삽질기

Communication

나의 마음은 바다와 같이 넓고 깊어요.

Page 20: 어플 개발자의 서버개발 삽질기

Communication

문제 해결을 위해서 라면…

Page 21: 어플 개발자의 서버개발 삽질기

참고자료 •http://blogs.msdn.com/b/ntdebugging/archive/2008/06/06/windbg-tip-kn-frame-dv-and-dt-it-s-so-easy.aspx •http://blogs.msdn.com/b/debuggingtoolbox/archive/2009/08/20/special-command-using-for-each-frame-to-run-commands.aspx

Page 22: 어플 개발자의 서버개발 삽질기

2012년엔 꿈과 희망이…

Page 23: 어플 개발자의 서버개발 삽질기

2012년엔 꿈과 희망이…

Q&A