Professional Documents
Culture Documents
rein01@gmail.com
C# MMORPG
.Net JVM
1 8
PvE
Jinuk Kim (rein01@gmail.com)
2 / 40
3 / 40
4 / 40
6=
6=
C++ C#
5 / 40
()
C#/C++
Jinuk Kim (rein01@gmail.com)
6 / 40
, (operation)
, .
7 / 40
1 : +
C# 2.0
Lightweight code generation (.NET IL )
C# 4.0 ExpressionTree
C++
VislauStudio
8 / 40
1 : +
9 / 40
1 : +
9 / 40
1 : +
Client
var op = new Operation();
op.onComplete += () => {...};
op.onFail += () => {...};
RequestOperation(op);
Server
IEnumerable<Object> Run() {
yield return info.ID;
yield return info.Name;
}
10 / 40
1 : +
11 / 40
1 : +
11 / 40
2 : delegate
delegate
C# delegate IDL
Client C++ , Service CIL
HindelyMilner . ref,
out, return ,
in
Jinuk Kim (rein01@gmail.com)
12 / 40
2 : delegate
13 / 40
2 : delegate
13 / 40
3 : interface
C# interface
1
C++ CIL
serialize C++
http://msdn.microsoft.com/en-us/library/ms228969.aspx
14 / 40
3 : interface
15 / 40
3 : interface
15 / 40
Issues I
RPC
16 / 40
Issues II
C# enumerator ?
Enumerator .
?
Operation delegate
C++0x lambda closure
2 C#
Jinuk Kim (rein01@gmail.com)
17 / 40
Issues III
C# IDL ?
C#
(Property )
C++ boost::spirit
...
18 / 40
19 / 40
?
MMORPG
2
+
MMO
20 / 40
Goal
(horizontal scaling)
,
21 / 40
Architecture
Operation: /
Jinuk Kim (rein01@gmail.com)
22 / 40
23 / 40
TCP
23 / 40
TCP
Operation
23 / 40
TCP
Operation
23 / 40
24 / 40
24 / 40
24 / 40
I
operation
II
, ,
DB
5
DB log insert
I
:
: Dangling reference
(GC ) GC ?
29 / 40
II
1
2
30 / 40
III
1
2
? () DoS
31 / 40
IV
32 / 40
V
(
X)
33 / 40
VI
,
I/O CPU
( 1
)
34 / 40
35 / 40
I
IPC
,
IPC
II
IPC :
(I/O, CPU)
:
37 / 40
III
Fault Tolerance
p N ,
(1 p)N
1 p = 0.01, N = 32 ,
72%
.NET Garbage collector:
GC
DB
10 , 20
?
Jinuk Kim (rein01@gmail.com)
39 / 40
Q&A
Q&A
40 / 40