2016 NDC - 모바일 게임 서버 엔진 개발 후기

Preview:

Citation preview

모바일게임 서버 엔진개발 후기( 그당시 맞닥뜨린 선택의 문제들 )

아이펀팩토리 문대경dkmoon@ifunfactory.com

About the Speaker✓ 1997: 제주도에서 상경한 컴퓨터공학도✓ 1999-2005: 넥슨 서버팀에서 잡부계의 블루칩 등극

( 입사 당시 서버팀 구성원 : 김정주 , 서민 , 정상원 , 박경국 )

✓ 2005-2010: 외국 생활 해보고 싶다는 이유로 UC Berkeley 석사 /박사(Cisco, MS Research, Google 여름 인턴쉽 )

✓ 2011-2012: Stock 을 포함한 Google 입사 제의 거절 후Nicira Networks 라는 SDN 업체의 senior software engineer( 그 당시 Google 주가 $270. 현재 주가 $780)

✓ 2012-2013: Nicira 의 stock option 포기 후 넥슨 신기술개발실장( 넥슨 온지 몇 달 뒤에 Nicira 는 VMware 에 $1.2B 에 피인수 )

✓ 2013-현재 : 아이펀팩토리에서 iFun Engine 개발 및 서비스

걱정마세요 . 오늘 물건 팔러 나온거 아닙니다 .

Lifetime Lessons✓ Strong implementation skills are necessary.

✓ But, system design is far more important.

✓ Prioritizing goals is the key to system design.

✓ Priority of goals shapes system’s strength and weakness.

Back in July 2012

Goals Recap

✓ Flexibility: must support various genres

✓ Usability: must be easy to use

✓ Scalability: must seamlessly scale out

✓ Availability: must limit the impact of system failure

✓ Efficiency: must run with small resource footprint

Priority is Important

1.Flexibility: must support various genres

2.Usability: must be easy to use

3.Scalability: must seamlessly scale out

4.Availability: must limit the impact of system failure

5.Efficiency: must run with small resource footprint

FlexibilityExample: Nexon DOOMVAS

✓ Goal: share codebase among games

✓ Adopted in Nexon’s classic RPG games

• 바람의나라 , 어둠의전설 , 일랜시아 , 아스가르드 ,테일즈위버 , 제라

FlexibilityExample: Nexon DOOMVAS

✓ Good try, but in practice…

Challenges in Flexibility✓ Unclear boundary between common layer

and game layer

• “Legacy seems useless. I’d write from scratch.”

✓ Loose consensus quickly becomes unmanageable as team grows

• Rookies always try to sabotage

Achieving FlexibilityApproach 1: by inheritance and overloading

• Pros: More transparent.• Cons: Requires developers to know too much.

Hence, prone to error.

Approach 2: by hook registration• Pros: Limits prerequisites.• Cons: More restricted.

Hard to grasp the big picture.

Achieving FlexibilityApproach 1: by function overloading

• Pros: More transparent.• Cons: Requires developers to know too much.

Hence, prone to error.

Approach 2: by hook registration• Pros: Limits prerequisites.• Cons: More restricted.

Hard to grasp the big picture.

2nd-level goal “Usability” as tie-breaker

Wide-spread Misbelief

Game server engine = network engine

Wide-spread Misbelief

Game server engine = network engine

This is completely wrong

What Game Server Does?

What Game Server Does?

What Game Server Does?

What Game Server Does?

What Game Server Does?

What Game Server Does?

Rethinking Usability✓ Must address challenges throughout

development cycle

• Networking is important, but not all• Database handling is annoying• Scaling out architecture is always challenging• Invoking external service is common, but painful• Mgmt interface seems overlooked, but must-have• …

My Usability Set

ProgrammingModel Network DB Scale-out External

Service Mgmt

• Framework• Session-based• TCP/UDP/HTTP• Reliability

• ORM• Caching

• Distributed locking in ORM

• Server discovery

• Unified interface for auth, billing, redis, …

• HTTP client• HTTP server

Wait! No P2P?✓ Mobile network (vs. wired) is omnipresence, and dominant

✓ Mobile (vs. wired) bandwidth is more scarce for frequency

✓ Hence, mobile telcos want more control over networks

✓ Unlikely to allow servers on mobile network. So little chance to have P2P like PC online

✓ Relay can be a workaround, but can cause more network latency

✓ Note this is not only about mobile gaming. Mobile network is becoming a commodity just like broadband did.

✓ And P2P has other very challenging issues like security, handover

Flexibility vs. Usability

✓ Initially, flexibility over usability.

✓ But found that less usability causes high tech support costs

Flexibility Usability

Priority Adjustment

UsabilityFlexibility

Summary✓ System design is important

✓ Prioritizing goals is the key

✓ Game server engine design is subtle

✓ Balancing between flexibility and usability is difficult

Thanks!

Questions?

dkmoon@ifunfactory.com

Recommended