1 / 5

Server Side Idea

Server Side Idea. Communicate Work Sequence. Client. Worker Thread. Iocp. Parser. 1. Request. 2. Acquire Packet. 3. Parse Packet. 4. Authenticate Packet. 5. Process Packet. 6. Push Packet. 7. Send Ack. Server Process. Communicate Work Sequence.

Download Presentation

Server Side Idea

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Server Side Idea

  2. Communicate Work Sequence Client Worker Thread Iocp Parser 1. Request 2. Acquire Packet 3. Parse Packet 4. Authenticate Packet 5. Process Packet 6. Push Packet 7. Send Ack Server Process

  3. Communicate Work Sequence Worker Thread들은 클라이언트에서 요청하는 Packet을 계속 기다리며, Packet이 도착할 경우에 Parser의 도움을 받아서 처리하도록 한다. Worker Thread는 IOCP를 이용해서 클라이언트와 통신을 하게 된다. Parser는 넘겨 받은 RAW데이터의 Header를 분석하여서 이에 맞는 Packet 구조를 찾는다. RAW 데이터를 변환한 이후에 이 Packet을 처리할 수 있는 적절한 Handler에게 처리를 넘긴다.

  4. Log Work Sequence Worker Thread Log Queue Log Thread DB 1. Write Log 2. Acquire Log 3. Write DB 4. Ack DB 1. Write Log 2. Acquire Log 3. Write DB 4. Ack DB

  5. Log Work Sequence Worker Thread는 필요한 로그 데이터를 Log Queue에게 넘겨주고 이 처리에는 더 이상 관여하지 않는다. Log Queue는 Singleton으로 전역에서 접근이 가능하며, 데이터가 추가되면 Log Thread에게 Signal을 보내서 휴면중인 상태를 깨워 데이터를 처리하도록 한다. Log Thread는 Database와 연결된 Session을 계속 유지하고 있으며, Log Queue로부터 넘겨받은 데이터를 적절하게 변환하여 Database에 기록한다.

More Related