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

27
모모모 모모 모모 모모 모모 모모 ( 모 모모 모모모모 모모모 모모모 ) 아아아아아아 아아아 [email protected]

Upload: ifunfactory-inc

Post on 17-Jan-2017

682 views

Category:

Technology


8 download

TRANSCRIPT

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

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

아이펀팩토리 문대경[email protected]

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

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 개발 및 서비스

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

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

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

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.

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

Back in July 2012

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

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

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

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

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

FlexibilityExample: Nexon DOOMVAS

✓ Goal: share codebase among games

✓ Adopted in Nexon’s classic RPG games

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

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

FlexibilityExample: Nexon DOOMVAS

✓ Good try, but in practice…

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

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

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

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.

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

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

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

Wide-spread Misbelief

Game server engine = network engine

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

Wide-spread Misbelief

Game server engine = network engine

This is completely wrong

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

What Game Server Does?

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

What Game Server Does?

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

What Game Server Does?

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

What Game Server Does?

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

What Game Server Does?

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

What Game Server Does?

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

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• …

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

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

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

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

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

Flexibility vs. Usability

✓ Initially, flexibility over usability.

✓ But found that less usability causes high tech support costs

Flexibility Usability

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

Priority Adjustment

UsabilityFlexibility

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

Summary✓ System design is important

✓ Prioritizing goals is the key

✓ Game server engine design is subtle

✓ Balancing between flexibility and usability is difficult

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

Thanks!

Questions?

[email protected]