Network Serialization and Routing in World of...
Transcript of Network Serialization and Routing in World of...
![Page 1: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/1.jpg)
Network Serialization and Routing in World of Warcraft
Twitter: @joerumz
![Page 2: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/2.jpg)
What is JAM?
Joe’s
Automated
Messages
![Page 3: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/3.jpg)
The Problem
Game servers need to communicate with each other
![Page 4: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/4.jpg)
void Serialize(stream &msg){ vector<int> values; // ...Fill in some values... msg << values.size(); for(int i = values.size(); --i;) { msg << values[i]; }}
void Deserialize(stream &msg){ vector<int> values; int size; msg >> size; values.resize(size); for(int i = size; i--;) { msg >> values[i]; }}
Manual serialization is error-prone
![Page 5: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/5.jpg)
void Deserialize(stream &msg){ vector<int> values; int size; msg >> size; values.resize(size); for(int i = size; i--;) { msg >> values[i]; }}
Manual serialization is error-prone
void Serialize(stream &msg){ vector<int> values; // ...Fill in some values... msg << values.size(); for(int i = values.size(); --i;) { msg << values[i]; }}
![Page 6: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/6.jpg)
Manual serialization doesn’t scale
![Page 7: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/7.jpg)
Manual serialization doesn’t scaleWorld Of Checkers
![Page 8: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/8.jpg)
Manual serialization doesn’t scaleWorld Of Checkers
![Page 9: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/9.jpg)
Manual serialization doesn’t scale
--server boundary--
World Of Checkers
![Page 10: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/10.jpg)
Manual serialization doesn’t scaleWorld Of Checkers
![Page 11: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/11.jpg)
Manual serialization doesn’t scaleWorld Of Checkers
![Page 12: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/12.jpg)
Goals
![Page 13: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/13.jpg)
Goals
•DRY - Don’t Repeat Yourself
![Page 14: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/14.jpg)
Goals
•DRY - Don’t Repeat Yourself•Eliminate boilerplate to reduce bugs
![Page 15: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/15.jpg)
Goals
•DRY - Don’t Repeat Yourself•Eliminate boilerplate to reduce bugs•No more hand-coded serialize/deserialize
![Page 16: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/16.jpg)
Goals
•DRY - Don’t Repeat Yourself•Eliminate boilerplate to reduce bugs•No more hand-coded serialize/deserialize•Spend more time on the game, not the protocol
![Page 17: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/17.jpg)
Goals
•DRY - Don’t Repeat Yourself•Eliminate boilerplate to reduce bugs•No more hand-coded serialize/deserialize•Spend more time on the game, not the protocol•Build a helpful robot that writes our code for us
![Page 18: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/18.jpg)
Goal: Human readable codestruct CheckerCaptured { CheckerID id; CheckerID capturedBy; u8 jumpType;};
void Capture(CheckerID id, CheckerID by, JUMP_TYPE jumpType){ CheckerCaptured msg; msg.id = id; msg.capturedBy = by; msg.jumpType = jumpType; Send(&msg);}
![Page 19: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/19.jpg)
Goal: Human readable codestruct CheckerCaptured { CheckerID id; CheckerID capturedBy; u8 jumpType;};
void Capture(CheckerID id, CheckerID by, JUMP_TYPE jumpType){ CheckerCaptured msg; msg.id = id; msg.capturedBy = by; msg.jumpType = jumpType; Send(&msg);}
![Page 20: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/20.jpg)
Goal: Human readable codestruct CheckerCaptured { CheckerID id; CheckerID capturedBy; u8 jumpType;};
void Capture(CheckerID id, CheckerID by, JUMP_TYPE jumpType){ CheckerCaptured msg; msg.id = id; msg.capturedBy = by; msg.jumpType = jumpType; Send(&msg);}
![Page 21: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/21.jpg)
Goal: Human readable codestruct CheckerCaptured { CheckerID id; CheckerID capturedBy; u8 jumpType;};
void Capture(CheckerID id, CheckerID by, JUMP_TYPE jumpType){ CheckerCaptured msg; msg.id = id; msg.capturedBy = by; msg.jumpType = jumpType; Send(&msg);}
![Page 22: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/22.jpg)
Goal: Human readable codestruct CheckerCaptured { CheckerID id; CheckerID capturedBy; u8 jumpType;};
void Capture(CheckerID id, CheckerID by, JUMP_TYPE jumpType){ CheckerCaptured msg; msg.id = id; msg.capturedBy = by; msg.jumpType = jumpType; Send(&msg);}
![Page 23: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/23.jpg)
Goal: Human readable codestruct CheckerCaptured { CheckerID id; CheckerID capturedBy; u8 jumpType;};
void Capture(CheckerID id, CheckerID by, JUMP_TYPE jumpType){ CheckerCaptured msg; msg.id = id; msg.capturedBy = by; msg.jumpType = jumpType; Send(&msg);}
![Page 24: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/24.jpg)
Implementation Details
![Page 25: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/25.jpg)
Development Cycle
•Describe the protocol•Generate serialization and dispatch•Send messages•Receive messages•Configure routing info
![Page 26: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/26.jpg)
1-to-1 mapping of .jam messages to C++ classes
// From Checkers.jammessage CheckerCaptureCredit { CheckerID capturedCheckerID; CheckerID capturedBy; u8 jumpType;};
![Page 27: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/27.jpg)
1-to-1 mapping of .jam messages to C++ classes
// From Checkers.jammessage CheckerCaptureCredit { CheckerID capturedCheckerID; CheckerID capturedBy; u8 jumpType;};
// 100% Generated code in JamCheckers.cppclass CheckerCaptureCredit : public JamMessage {public: // Message decoders BOOL Get(BinaryDecoder &decoder); BOOL Get(JSONDecoder &decoder); // Message encoders BOOL Put(BinaryEncoder &encoder) const; BOOL Put(JSONEncoder &encoder) const; /**** DATA START ****/ CheckerID capturedCheckerID; CheckerID capturedBy; u8 jumpType; /**** DATA STOP ****/ // Lots more stuff...};
![Page 28: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/28.jpg)
Development Cycle
•Describe the protocol•Generate serialization and dispatch•Send messages•Receive messages•Configure routing info
![Page 29: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/29.jpg)
Auto-generated serialization code
//NOTICE: This is generated code. DO NOT EDIT!BOOL CheckerCaptureCredit::Put(BinaryEncoder &_encoder) const{ _encoder.BeginMessage(CODE, NAME); _encoder.Put("capturedCheckerID", capturedCheckerID); _encoder.Put("capturedBy", capturedBy); _encoder.Put("jumpType", jumpType); _encoder.EndMessage(CODE, NAME); return TRUE;}
![Page 30: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/30.jpg)
Flex and Bison make writing parsers easy
Flex & Bison - parser generators
Other tools•ANTLR•GOLD•PLY (Python Lex & Yacc)•Boost.Spirit
![Page 31: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/31.jpg)
JAM File syntax is described to Bison
part of jam.y
![Page 32: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/32.jpg)
From .jam to .cpp
2004 2013
![Page 33: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/33.jpg)
TRL Turns .jam into C++
TRL to generate a message class definition
{@ define OutputMessage(msg, encoders, decoders) @} // // NOTICE: This is generated code. DO NOT EDIT! // class {{ msg.structName }} : public JamMessage { public: static u32 CRC; static u16 CODE; static cchar *NAME; // No argument constructor: {{ msg.structName }}() {
{@ foreach f in msg.fields @} {@ if f.hasDefault @} {{ f.name }} = {{ f.defValue }}; {@ end if @} {@ end foreach @}
}
![Page 34: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/34.jpg)
TRL Turns .jam into C++
TRL to generate a message class definition
See Also•CTemplate•ngTemplate•Django (HTML focused)•Jinja (Python)
{@ define OutputMessage(msg, encoders, decoders) @} // // NOTICE: This is generated code. DO NOT EDIT! // class {{ msg.structName }} : public JamMessage { public: static u32 CRC; static u16 CODE; static cchar *NAME; // No argument constructor: {{ msg.structName }}() {
{@ foreach f in msg.fields @} {@ if f.hasDefault @} {{ f.name }} = {{ f.defValue }}; {@ end if @} {@ end foreach @}
}
![Page 35: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/35.jpg)
Fill out a dictionary and feed it to TRL
![Page 36: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/36.jpg)
Fill out a dictionary and feed it to TRL
{@ foreach f in msg.fields @} {@ if f.hasDefault @} {{ f.name }} = {{ f.defValue }}; {@ end if @} {@ end foreach @}
![Page 37: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/37.jpg)
Fill out a dictionary and feed it to TRL
{@ foreach f in msg.fields @} {@ if f.hasDefault @} {{ f.name }} = {{ f.defValue }}; {@ end if @} {@ end foreach @}
![Page 38: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/38.jpg)
Fill out a dictionary and feed it to TRL
{@ foreach f in msg.fields @} {@ if f.hasDefault @} {{ f.name }} = {{ f.defValue }}; {@ end if @} {@ end foreach @}
![Page 39: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/39.jpg)
Global Feature addition using TRL
TODO: Figure out how to illustrate this. Looking through history of our TRL files and jamgen would be useful.
In fact, a screenshot of a diff of one of those changes would work well here.
![Page 40: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/40.jpg)
Development Cycle
•Describe the protocol•Generate serialization and dispatch•Send messages•Receive messages•Configure routing info
![Page 41: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/41.jpg)
Create a message, fill in data, call send
void Checker::OnCaptured(CheckerID capturedBy, JUMP_TYPE how){ CheckerCapturedCredit msg; msg.capturedCheckerID = GetID(); msg.capturedBy = capturedBy; msg.jumpType = how; JamID destination = GetRouter()->GetCreditManagerID(); GetRouter()->Send(destination, &msg);}
![Page 42: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/42.jpg)
Create a message, fill in data, call send
void Checker::OnCaptured(CheckerID capturedBy, JUMP_TYPE how){ CheckerCapturedCredit msg; msg.capturedCheckerID = GetID(); msg.capturedBy = capturedBy; msg.jumpType = how; JamID destination = GetRouter()->GetCreditManagerID(); GetRouter()->Send(destination, &msg);}
![Page 43: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/43.jpg)
Create a message, fill in data, call send
void Checker::OnCaptured(CheckerID capturedBy, JUMP_TYPE how){ CheckerCapturedCredit msg; msg.capturedCheckerID = GetID(); msg.capturedBy = capturedBy; msg.jumpType = how; JamID destination = GetRouter()->GetCreditManagerID(); GetRouter()->Send(destination, &msg);}
![Page 44: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/44.jpg)
Create a message, fill in data, call send
void Checker::OnCaptured(CheckerID capturedBy, JUMP_TYPE how){ CheckerCapturedCredit msg; msg.capturedCheckerID = GetID(); msg.capturedBy = capturedBy; msg.jumpType = how; JamID destination = GetRouter()->GetCreditManagerID(); GetRouter()->Send(destination, &msg);}
![Page 45: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/45.jpg)
Create a message, fill in data, call send
void Checker::OnCaptured(CheckerID capturedBy, JUMP_TYPE how){ CheckerCapturedCredit msg; msg.capturedCheckerID = GetID(); msg.capturedBy = capturedBy; msg.jumpType = how; JamID destination = GetRouter()->GetCreditManagerID(); GetRouter()->Send(destination, &msg);}
![Page 46: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/46.jpg)
Create a message, fill in data, call send
void Checker::OnCaptured(CheckerID capturedBy, JUMP_TYPE how){ CheckerCapturedCredit msg; msg.capturedCheckerID = GetID(); msg.capturedBy = capturedBy; msg.jumpType = how; JamID destination = GetRouter()->GetCreditManagerID(); GetRouter()->Send(destination, &msg);}
![Page 47: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/47.jpg)
Structs and arrays in messagesmessage GroupUpdate{ GroupID group; array<.CheckerID> checkers;};
/*** DATA START ***/ GroupID group; vector<CheckerID> checkers; /*** DATA STOP ***/
void GroupService::SendUpdate(GroupID id){ GroupUpdate msg; msg.group = id; msg.checkers.resize(MAX_GROUP_SIZE); // ...}
![Page 48: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/48.jpg)
Structs and arrays in messagesmessage GroupUpdate{ GroupID group; array<.CheckerID> checkers;};
/*** DATA START ***/ GroupID group; vector<CheckerID> checkers; /*** DATA STOP ***/
void GroupService::SendUpdate(GroupID id){ GroupUpdate msg; msg.group = id; msg.checkers.resize(MAX_GROUP_SIZE); // ...}
![Page 49: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/49.jpg)
Structs and arrays in messagesmessage GroupUpdate{ GroupID group; array<.CheckerID> checkers;};
/*** DATA START ***/ GroupID group; vector<CheckerID> checkers; /*** DATA STOP ***/
void GroupService::SendUpdate(GroupID id){ GroupUpdate msg; msg.group = id; msg.checkers.resize(MAX_GROUP_SIZE); // ...}
![Page 50: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/50.jpg)
Structs and arrays in messagesmessage GroupUpdate{ GroupID group; array<.CheckerID> checkers;};
/*** DATA START ***/ GroupID group; vector<CheckerID> checkers; /*** DATA STOP ***/
void GroupService::SendUpdate(GroupID id){ GroupUpdate msg; msg.group = id; msg.checkers.resize(MAX_GROUP_SIZE); // ...}
![Page 51: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/51.jpg)
Structs and arrays in messagesmessage GroupUpdate{ GroupID group; array<.CheckerID> checkers;};
/*** DATA START ***/ GroupID group; vector<CheckerID> checkers; /*** DATA STOP ***/
void GroupService::SendUpdate(GroupID id){ GroupUpdate msg; msg.group = id; msg.checkers.resize(MAX_GROUP_SIZE); // ...}
![Page 52: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/52.jpg)
Definitions
![Page 53: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/53.jpg)
Definitions
•Message - serialized structure defined in a .jam file
![Page 54: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/54.jpg)
Definitions
•Message - serialized structure defined in a .jam file•Protocol - a collection of messages
![Page 55: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/55.jpg)
Definitions
•Message - serialized structure defined in a .jam file•Protocol - a collection of messages•Service - a module of code that implements message handlers
for one or more protocols
![Page 56: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/56.jpg)
Definitions
•Message - serialized structure defined in a .jam file•Protocol - a collection of messages•Service - a module of code that implements message handlers
for one or more protocols•Program - can be composed of multiple services
![Page 57: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/57.jpg)
Message Destinations
![Page 58: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/58.jpg)
Message Destinationsvoid MatchService::CreateBoard(u64 width, u64 height) { BoardID = GenerateBoard(); // Send to a known, connected, service m_pServer->Send(m_boardServerID, &msg);}
![Page 59: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/59.jpg)
void MatchService::GameOver(u32 gameID, u64 winnerID) { msg.gameID = gameID; msg.winner = winnerID(); // Send to a service type, non-specified ID m_pServer->Send(JAM_SERVER_STATS_TRACKER, &msg);}
Message Destinationsvoid MatchService::CreateBoard(u64 width, u64 height) { BoardID = GenerateBoard(); // Send to a known, connected, service m_pServer->Send(m_boardServerID, &msg);}
![Page 60: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/60.jpg)
void MatchService::GameOver(u32 gameID, u64 winnerID) { msg.gameID = gameID; msg.winner = winnerID(); // Send to a service type, non-specified ID m_pServer->Broadcast(JAM_SERVER_STATS_TRACKER, &msg);}
Message Destinationsvoid MatchService::CreateBoard(u64 width, u64 height) { BoardID = GenerateBoard(); // Send to a known, connected, service m_pServer->Send(m_boardServerID, &msg);}
![Page 61: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/61.jpg)
void MatchService::GameOver(u32 gameID, u64 winnerID) { msg.gameID = gameID; msg.winner = winnerID(); // Send to a service type, non-specified ID m_pServer->Broadcast(JAM_SERVER_STATS_TRACKER, &msg);}
Message Destinationsvoid MatchService::CreateBoard(u64 width, u64 height) { BoardID = GenerateBoard(); // Send to a known, connected, service m_pServer->Send(m_boardServerID, &msg);}
void Checker::HealChecker(CheckerID toHeal, u32 amount) { CheckerHeal msg; msg.healedBy = GetID(); msg.amount = amount; // Send a message to a specific object m_pServer->Send(toHeal, &msg);}
![Page 62: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/62.jpg)
Message routing by type
MatchmakerAddPlayer addMsg; addMsg.player = GetPlayerID(); addMsg.rank = GetRank();
// No JamID needed, send to any Matchmaker // May be queued until a Matchmaker is available m_pService->Send(JAM_SERVER_MATCHMAKER, &addMsg);
![Page 63: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/63.jpg)
Send a message and expect a response MatchmakerAddPlayer addMsg; addMsg.player = GetPlayerID(); addMsg.level = GetLevel();
// Send to any Matchmaker, PlayerAddedHandler // will be called with response when complete m_pService->SendRegistered<PlayerAdded>( JAM_SERVER_MATCHMAKER, &addMsg );
![Page 64: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/64.jpg)
Send a message and expect a response MatchmakerAddPlayer addMsg; addMsg.player = GetPlayerID(); addMsg.level = GetLevel();
// Send to any Matchmaker, PlayerAddedHandler // will be called with response when complete m_pService->SendRegistered<PlayerAdded>( JAM_SERVER_MATCHMAKER, &addMsg );
![Page 65: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/65.jpg)
Send a message to an object
void CheckerGroup::ChangeBoards(u32 newBoard){ CheckerChangeBoard msg; msg.boardID = newBoard; for(int i = 0; i < m_checkers.size(); i++) { m_pServer->Send(m_checkers[i]->GetID(), &msg); }}
![Page 66: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/66.jpg)
Each object is owned by one serverclass Checker { //... CheckerID m_id; JamID m_serverID; JamID GetServer() { return m_serverID; }
CheckerID GetID() { return m_id; } //...};
![Page 67: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/67.jpg)
Each object is owned by one serverclass Checker { //... CheckerID m_id; JamID m_serverID; JamID GetServer() { return m_serverID; }
CheckerID GetID() { return m_id; } //...};
![Page 68: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/68.jpg)
Each object is owned by one serverclass Checker { //... CheckerID m_id; JamID m_serverID; JamID GetServer() { return m_serverID; }
CheckerID GetID() { return m_id; } //...};
![Page 69: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/69.jpg)
How messages get routed
void BoardServer::Send(Checker *pChecker, JamMessage *pMessage){ m_pJamServer->Send(pChecker->GetServer(), pChecker->GetID(), pMessage);}
![Page 70: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/70.jpg)
Development Cycle
•Describe the protocol•Generate serialization and dispatch•Send messages•Receive messages•Configure routing info
![Page 71: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/71.jpg)
On receipt, look up and dispatch// static callback registered with JAM by protocol ID// called for each incoming messagevoid BoardServer::CheckerDispatch(JamLink &link, JamMessage *pMessage){ CheckerID destID = pMessage->GetDestination(); Checker *pChecker = GetCheckerObject(destID); pChecker->QueueMessage(pMessage); switch(pMessage->GetProtocolCRC()) { case JAMCheckerProtocol_CRC: JamCheckerProtocol::Dispatch<Checker>(pMessage, pChecker); }}
![Page 72: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/72.jpg)
On receipt, look up and dispatch// static callback registered with JAM by protocol ID// called for each incoming messagevoid BoardServer::CheckerDispatch(JamLink &link, JamMessage *pMessage){ CheckerID destID = pMessage->GetDestination(); Checker *pChecker = GetCheckerObject(destID); pChecker->QueueMessage(pMessage); switch(pMessage->GetProtocolCRC()) { case JAMCheckerProtocol_CRC: JamCheckerProtocol::Dispatch<Checker>(pMessage, pChecker); }}
![Page 73: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/73.jpg)
On receipt, look up and dispatch// static callback registered with JAM by protocol ID// called for each incoming messagevoid BoardServer::CheckerDispatch(JamLink &link, JamMessage *pMessage){ CheckerID destID = pMessage->GetDestination(); Checker *pChecker = GetCheckerObject(destID); pChecker->QueueMessage(pMessage); switch(pMessage->GetProtocolCRC()) { case JAMCheckerProtocol_CRC: JamCheckerProtocol::Dispatch<Checker>(pMessage, pChecker); }}
![Page 74: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/74.jpg)
JamLink
void BoardServer::CheckerDispatch(JamLink &link, JamMessage *pMessage){
![Page 75: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/75.jpg)
Generated Dispatch methods //NOTICE: This is generated code. DO NOT EDIT! template<typename HANDLER_T> static JAM_RESULT Dispatch(JamMessage *pMessage, HANDLER_T *pHandler) { switch(pMessage->GetCode()) { case JAM_MSG_CheckerHeal: result = pHandler->CheckerHealHandler(link, (CheckerHeal *)pMessage); break; // cases for rest of protocol's messages...
![Page 76: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/76.jpg)
Generated Dispatch methods //NOTICE: This is generated code. DO NOT EDIT! template<typename HANDLER_T> static JAM_RESULT Dispatch(JamMessage *pMessage, HANDLER_T *pHandler) { switch(pMessage->GetCode()) { case JAM_MSG_CheckerHeal: result = pHandler->CheckerHealHandler(link, (CheckerHeal *)pMessage); break; // cases for rest of protocol's messages...
![Page 77: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/77.jpg)
Generated Dispatch methods //NOTICE: This is generated code. DO NOT EDIT! template<typename HANDLER_T> static JAM_RESULT Dispatch(JamMessage *pMessage, HANDLER_T *pHandler) { switch(pMessage->GetCode()) { case JAM_MSG_CheckerHeal: result = pHandler->CheckerHealHandler(link, (CheckerHeal *)pMessage); break; // cases for rest of protocol's messages...
![Page 78: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/78.jpg)
Generated message handler prototypes
#include this in the middle of a class
// A message handler prototype is auto-generated for each message// in the protocol. #include these declarations in the middle// of your hand constructed class.JAM_RESULT CheckerHealHandler(JamLink &link, CheckerHeal *msg);JAM_RESULT CheckerDamageHandler(JamLink &link, CheckerDamage *msg);JAM_RESULT CheckerPowerupHandler(JamLink &link, CheckerPowerup *msg);JAM_RESULT CheckerKingHandler(JamLink &link, CheckerKing *msg);
![Page 79: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/79.jpg)
Message handler methods
JAM_RESULT Checker::CheckerHealHandler(CheckerHeal *pMessage){ m_health += pMessage->amount; LOG("Checker %d was healed for %d by checker %d", GetID(), pMessage->amount, pMessage->healedBy); return JAM_OK;}
![Page 80: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/80.jpg)
Send and Receivevoid Checker::HealChecker(CheckerID toHeal, u32 amount) { CheckerHeal msg; msg.healedBy = GetID(); msg.amount = amount; // Send a message to a specific object m_pServer->Send(toHeal, &msg);}
JAM_RESULT Checker::CheckerHealHandler(CheckerHeal *pMessage){ m_health += pMessage->amount; LOG("Checker %d was healed for %d by checker %d", GetID(), pMessage->amount, pMessage->healedBy); return JAM_OK;}
![Page 81: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/81.jpg)
Development Cycle
•Describe the protocol•Generate serialization and dispatch•Send messages•Receive messages•Configure routing info
![Page 82: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/82.jpg)
Define services
Configure protocols the Matchmaker service sends and receives
void Matchmaker::Configure(JamServer *pServer){ JamRouteConfig &routeConfig = pServer->GetRouteConfig(); routeConfig.ConfigureInbound<MatchmakerProtocol>( this, Matchmaker::DispatchMessage); routeConfig.ConfigureOutbound<MatchmakerResponseProtocol>();}
![Page 83: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/83.jpg)
Define services
Configure protocols the Matchmaker service sends and receives
void Matchmaker::Configure(JamServer *pServer){ JamRouteConfig &routeConfig = pServer->GetRouteConfig(); routeConfig.ConfigureInbound<MatchmakerProtocol>( this, Matchmaker::DispatchMessage); routeConfig.ConfigureOutbound<MatchmakerResponseProtocol>();}
![Page 84: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/84.jpg)
RouteConfig maintains a protocol to handler mapping
![Page 85: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/85.jpg)
Handlers have access to sender and other metadata about received messages
JAM_RESULT BoardServer::AddPlayerHandler(JamLink &link, AddPlayer *msg)
{ LOG("Adding player %s from server %s", IDSTR(msg->playerID), link.Describe().c_str()); // Do stuff return JAM_OK;}
![Page 86: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/86.jpg)
Handlers have access to sender and other metadata about received messages
JAM_RESULT BoardServer::AddPlayerHandler(JamLink &link, AddPlayer *msg)
{ LOG("Adding player %s from server %s", IDSTR(msg->playerID), link.Describe().c_str()); // Do stuff return JAM_OK;}
![Page 87: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/87.jpg)
Coarse and fine-grained queueing and
Race Condition
![Page 88: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/88.jpg)
Receiving via Message Queue
void Matchmaker::Configure(){ // Messages received at any time are placed into a queue routeConfig.ConfigureInbound<MatchmakerProtocol>( this, &m_messageQueue);}
void Matchmaker::Idle(){ // Queue is processed in one thread at a known time pServer->ProcessQueue(&m_messageQueue, this);}
![Page 89: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/89.jpg)
Receiving via Message Queue
void Matchmaker::Configure(){ // Messages received at any time are placed into a queue routeConfig.ConfigureInbound<MatchmakerProtocol>( this, &m_messageQueue);}
void Matchmaker::Idle(){ // Queue is processed in one thread at a known time pServer->ProcessQueue(&m_messageQueue, this);}
![Page 90: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/90.jpg)
Receiving via Message Queue
void Matchmaker::Configure(){ // Messages received at any time are placed into a queue routeConfig.ConfigureInbound<MatchmakerProtocol>( this, &m_messageQueue);}
void Matchmaker::Idle(){ // Queue is processed in one thread at a known time pServer->ProcessQueue(&m_messageQueue, this);}
![Page 91: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/91.jpg)
Receiving via Message Queue
void Matchmaker::Configure(){ // Messages received at any time are placed into a queue routeConfig.ConfigureInbound<MatchmakerProtocol>( this, &m_messageQueue);}
void Matchmaker::Idle(){ // Queue is processed in one thread at a known time pServer->ProcessQueue(&m_messageQueue, this);}
![Page 92: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/92.jpg)
Global lock dispatching
![Page 93: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/93.jpg)
Raw concurrent handlers
![Page 94: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/94.jpg)
Raw concurrent handlers
![Page 95: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/95.jpg)
Lock Policiesclass MatchmakerLockPolicy{ Matchmaker *m_owner; void Lock(JamMessage *msg, JamMessageQueue **ppQueue) { // Adding a player requires a write lock if(msg->GetCode() == JAM_MSG_MatchmakerAddPlayer) { m_owner->AcquireWriteLock(); } else { m_owner->AcquireReadLock(); } } void Unlock(JamMessage *msg) { /* Same logic, release lock */ }}
![Page 96: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/96.jpg)
Lock Policiesclass MatchmakerLockPolicy{ Matchmaker *m_owner; void Lock(JamMessage *msg, JamMessageQueue **ppQueue) { // Adding a player requires a write lock if(msg->GetCode() == JAM_MSG_MatchmakerAddPlayer) { m_owner->AcquireWriteLock(); } else { m_owner->AcquireReadLock(); } } void Unlock(JamMessage *msg) { /* Same logic, release lock */ }}
![Page 97: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/97.jpg)
Incoming messages are refcounted
![Page 98: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/98.jpg)
Incoming messages are refcounted
•Message passed to handler is a refcounted object
![Page 99: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/99.jpg)
Incoming messages are refcounted
•Message passed to handler is a refcounted object•Possible to retain a message pointer until later
![Page 100: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/100.jpg)
Incoming messages are refcounted
•Message passed to handler is a refcounted object•Possible to retain a message pointer until later•Smart pointers are available
![Page 101: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/101.jpg)
Incoming messages are refcounted
•Message passed to handler is a refcounted object•Possible to retain a message pointer until later•Smart pointers are available•Messages contain no pointers to any other objects
![Page 102: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/102.jpg)
Incoming messages are refcounted
•Message passed to handler is a refcounted object•Possible to retain a message pointer until later•Smart pointers are available•Messages contain no pointers to any other objects•No circular references are possible
![Page 103: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/103.jpg)
CPU And Bandwidth Efficiency
![Page 104: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/104.jpg)
JAM is either efficient or backwards compatible
2004 - Assumed binary compatibility
![Page 105: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/105.jpg)
Negotiation means dead-simple binary serialization most of the time
![Page 106: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/106.jpg)
In some cases, can just memcpy it onto the wire
// This message could easily be memcpy'ed onto the wireclass CreateChecker : public JamMessage { /**** DATA START ****/ u32 checkerType; u32 owner; /**** DATA STOP ****/ // Code...};
![Page 107: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/107.jpg)
Generated code means easy optimizations
![Page 108: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/108.jpg)
Generated code means easy optimizations
_encoder.Put("capturedCheckerID", capturedCheckerID); _encoder.Put("capturedBy", capturedBy); _encoder.Put("jumpType", jumpType);
![Page 109: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/109.jpg)
Fallback to JSON Serialization
![Page 110: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/110.jpg)
Fallback to JSON Serialization
•Switch to JSON serialization when binary CRC check fails
![Page 111: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/111.jpg)
Fallback to JSON Serialization
•Switch to JSON serialization when binary CRC check fails•Great for programmers
![Page 112: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/112.jpg)
Fallback to JSON Serialization
•Switch to JSON serialization when binary CRC check fails•Great for programmers•Way more expensive (CPU and Bandwidth)
![Page 113: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/113.jpg)
Fallback to JSON Serialization
•Switch to JSON serialization when binary CRC check fails•Great for programmers•Way more expensive (CPU and Bandwidth)•Never allowed on public facing protocols
![Page 114: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/114.jpg)
Fallback to JSON Serialization
•Switch to JSON serialization when binary CRC check fails•Great for programmers•Way more expensive (CPU and Bandwidth)•Never allowed on public facing protocols•Even internally it’s sometimes unreasonable
![Page 115: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/115.jpg)
Fallback to JSON Serialization
•Switch to JSON serialization when binary CRC check fails•Great for programmers•Way more expensive (CPU and Bandwidth)•Never allowed on public facing protocols•Even internally it’s sometimes unreasonable
![Page 116: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/116.jpg)
JSON{ "_msgID":10, "type":6, "error":0, "desc":{ "m_id":"T2R00S40.00E14815726P10987H127.0.0.1:14001", "m_host":"127.0.0.1", "m_partitionID":0, "m_configID":0, "m_buildNum":0, "m_type":40, "m_subType":0 }}
![Page 117: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/117.jpg)
Protocol Negotiation
![Page 118: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/118.jpg)
Message overhead
![Page 119: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/119.jpg)
JSON vs. Binary performance
0
40
80
Two 32-bit ints u32+vec3
75
49
2113
Wir
e si
ze in
clud
ing
over
head
Binary JSON
![Page 120: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/120.jpg)
Still highly successful - some network tools run on old versions frequently
![Page 121: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/121.jpg)
Google's Protocol Buffers and
![Page 122: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/122.jpg)
For both speed AND inter-version compatibility, there are better choices
![Page 123: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/123.jpg)
protobufs sometimes wins on bandwidth, but JAM is faster
ConstructRequest
SerializeOpenDirToString
SerializeOpenDirToArray
DeserializeOpenDirRequest
SerializeDirContents
0 10000 20000 30000 40000
Time in ms
Protobufs JAM
SmallStatFS
LargeStatFS
0 25 50 75 100
Size in Bytes
![Page 124: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/124.jpg)
Writing our own gives us ultimate control over everything
![Page 125: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/125.jpg)
Writing our own gives us ultimate control over everything
•Automated serialization
![Page 126: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/126.jpg)
Writing our own gives us ultimate control over everything
•Automated serialization•Easy yet flexible message dispatching
![Page 127: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/127.jpg)
Writing our own gives us ultimate control over everything
•Automated serialization•Easy yet flexible message dispatching•High performance
![Page 128: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/128.jpg)
Writing our own gives us ultimate control over everything
•Automated serialization•Easy yet flexible message dispatching•High performance•Inter-version compatibility
![Page 129: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/129.jpg)
Writing our own gives us ultimate control over everything
•Automated serialization•Easy yet flexible message dispatching•High performance•Inter-version compatibility•Less tedium = more awesome
![Page 130: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/130.jpg)
Thanks! Questions?
Twitter: @joerumz
![Page 131: Network Serialization and Routing in World of Warcrafttwvideo01.ubm-us.net/o1/vault/gdc2013/slides...Network Serialization and Routing in World of Warcraft Joe Rumsey jrumsey@blizzard.com](https://reader033.fdocuments.in/reader033/viewer/2022050507/5f98a6a9bf6015120506f4bb/html5/thumbnails/131.jpg)
Thanks! Questions?
Twitter: @joerumz
Disclaimer: Blizzard is not really making World of Checkers