Fixed grammar and spelling
This commit is contained in:
parent
8b95b63b2e
commit
9a8b6963f6
1 changed files with 90 additions and 76 deletions
164
report.lyx
164
report.lyx
|
@ -364,13 +364,13 @@ Today users of network games often experience failures of the servers while
|
||||||
playing or downtime due to maintenance.
|
playing or downtime due to maintenance.
|
||||||
Additionally game developers often perform the difficult task of reinventing
|
Additionally game developers often perform the difficult task of reinventing
|
||||||
a game server to meet their needs.
|
a game server to meet their needs.
|
||||||
The purpose of this thesis is to to design a reliable game server which
|
The purpose of this thesis is to design a reliable game server which can
|
||||||
can power different types of games simultanously.
|
power different types of games simultaneously.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Abstract
|
\begin_layout Abstract
|
||||||
It is investigated if the techniques and tools used in the telecom industry,
|
It is investigated if the techniques and tools used in the telecom industry,
|
||||||
specifically Erlang and the OTP, can be used to create a highly reliable
|
specifically Erlang and the OTP can be used to create a highly reliable
|
||||||
game server.
|
game server.
|
||||||
To make the server generic, it is investigated if virtual machines can
|
To make the server generic, it is investigated if virtual machines can
|
||||||
be used to run the actual games, thereby allowing the games to be developed
|
be used to run the actual games, thereby allowing the games to be developed
|
||||||
|
@ -507,12 +507,12 @@ Introduction
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Online gaming, and computer gaming in general has become an important part
|
Online gaming and computer gaming in general has become an important part
|
||||||
in the day-to-day lives of many people.
|
in the day-to-day lives of many people.
|
||||||
A few years ago, computer games were not at all as popular as they are
|
A few years ago, computer games were not at all as popular as they are
|
||||||
today.
|
today.
|
||||||
With the advances in computer graphics and computer hardware today's games
|
With the advances in computer graphics and computer hardware today's games
|
||||||
are much more sophisticated then they were in the days of
|
are much more sophisticated than they were in the days of
|
||||||
\emph on
|
\emph on
|
||||||
NetHack
|
NetHack
|
||||||
\emph default
|
\emph default
|
||||||
|
@ -560,7 +560,7 @@ textbf{NetHack}}{An early computer game developed by the NetHack team, arguably
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The early computer games featured simple, or no graphics at all
|
The early computer games featured simple or no graphics at all
|
||||||
\begin_inset CommandInset citation
|
\begin_inset CommandInset citation
|
||||||
LatexCommand citep
|
LatexCommand citep
|
||||||
key "nethack:website"
|
key "nethack:website"
|
||||||
|
@ -575,11 +575,11 @@ key "nethack:website"
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Since these early games, the gaming industry have become much more influential
|
Since these early games, the gaming industry has become much more influential
|
||||||
in many ways.
|
in many ways.
|
||||||
Many advances in computer hardware are thought to come from pressure from
|
Many advances in computer hardware are thought to come from pressure from
|
||||||
the computer game industry.
|
the computer game industry.
|
||||||
More powerful games require more powerful, and more easily available hardware
|
More powerful games require more powerful and more easily available hardware
|
||||||
\begin_inset Note Note
|
\begin_inset Note Note
|
||||||
status collapsed
|
status collapsed
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ The idea of game servers is not new, network games have been played for
|
||||||
\emph on
|
\emph on
|
||||||
Quake
|
Quake
|
||||||
\emph default
|
\emph default
|
||||||
series, or the
|
series, and the
|
||||||
\emph on
|
\emph on
|
||||||
Doom
|
Doom
|
||||||
\begin_inset Note Note
|
\begin_inset Note Note
|
||||||
|
@ -789,8 +789,9 @@ status open
|
||||||
\backslash
|
\backslash
|
||||||
nomenclature{
|
nomenclature{
|
||||||
\backslash
|
\backslash
|
||||||
textbf{Hardware failiure}}{A failiure in hardware (hard drive, memory, processor
|
textbf{Hardware failure}}{A failure in hardware (hard drive, memory, processor,
|
||||||
, etc) which causes a system to stop functioning}
|
etc.) which causes a system to function in a different way than originally
|
||||||
|
intended, or crash}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
\begin_layout Plain Layout
|
||||||
|
@ -799,8 +800,9 @@ textbf{Hardware failiure}}{A failiure in hardware (hard drive, memory, processor
|
||||||
\backslash
|
\backslash
|
||||||
nomenclature{
|
nomenclature{
|
||||||
\backslash
|
\backslash
|
||||||
textbf{Software failiure}}{A failiure in software (the GGS, the operating
|
textbf{Software failure}}{A failure in software (the GGS, the operating
|
||||||
system, etc) which causes a system to stop functioning}
|
system, etc.) which causes a system to function in a different way than
|
||||||
|
what was originally intended, or crash}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -825,7 +827,7 @@ The game industry is a quickly growing industry with high revenues and many
|
||||||
Strangely enough gamers often experience long downtimes due to maintaining
|
Strangely enough gamers often experience long downtimes due to maintaining
|
||||||
or because of problems with the servers
|
or because of problems with the servers
|
||||||
\begin_inset CommandInset citation
|
\begin_inset CommandInset citation
|
||||||
LatexCommand citet
|
LatexCommand citep
|
||||||
key "news/cnet/com/WoWProblems"
|
key "news/cnet/com/WoWProblems"
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -882,7 +884,7 @@ the nine nines
|
||||||
|
|
||||||
of availability
|
of availability
|
||||||
\begin_inset CommandInset citation
|
\begin_inset CommandInset citation
|
||||||
LatexCommand citet
|
LatexCommand citep
|
||||||
key "Armstrong03"
|
key "Armstrong03"
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -905,7 +907,7 @@ s, leaving the public unable to contact emergency services.
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Moving back to the gaming industry.
|
Moving back to the gaming industry.
|
||||||
The main reason to develop reliable servers is a higher revenue for game
|
The main reason to develop reliable servers is higher revenue for game
|
||||||
companies, to achieve this it is important for game companies to expand
|
companies, to achieve this it is important for game companies to expand
|
||||||
their customer base.
|
their customer base.
|
||||||
Reliable game servers will create a good image of the company.
|
Reliable game servers will create a good image of the company.
|
||||||
|
@ -969,10 +971,11 @@ key "Bondi:2000:CSI:350391.350432"
|
||||||
|
|
||||||
.
|
.
|
||||||
These two issues are addressed in this thesis.
|
These two issues are addressed in this thesis.
|
||||||
Structural scalability means expanding an architecture, e.g.
|
Structural scalability means expanding architecture, e.g.
|
||||||
adding nodes to a system without requiring modification of the system.
|
adding nodes to a system without requiring modification of the system.
|
||||||
Load scalability means using the available resources in a way which allows
|
Load scalability means using the available resources in a way which allows
|
||||||
handling increasing load, e.g more users, gracefully.
|
handling increasing load, e.g.
|
||||||
|
more users, gracefully.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
|
@ -1023,8 +1026,8 @@ reference "sec:Generic"
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The server behaves in a way similar to an application server, but is designed
|
The server behaves in a way similar to an application server, but is designed
|
||||||
to help running games instead pf typical applications.
|
to help running games instead of typical applications.
|
||||||
An application server provides processing ability and time, therefore it
|
An application server provides processing ability and time; therefore it
|
||||||
is different from a file- or print-server, which only serves resources
|
is different from a file- or print-server, which only serves resources
|
||||||
to the clients.
|
to the clients.
|
||||||
In order to more easily understand the purpose of the GGS, it can be of
|
In order to more easily understand the purpose of the GGS, it can be of
|
||||||
|
@ -1046,11 +1049,21 @@ Glassfish
|
||||||
\emph on
|
\emph on
|
||||||
Google App Engine
|
Google App Engine
|
||||||
\emph default
|
\emph default
|
||||||
where you can run applications written in Python or some language which
|
where you can run applications written in Python or any language which
|
||||||
runs in the
|
runs in the
|
||||||
\emph on
|
\emph on
|
||||||
Java Virtual Machine
|
Java Virtual Machine
|
||||||
\emph default
|
\emph default
|
||||||
|
|
||||||
|
\begin_inset Note Note
|
||||||
|
status open
|
||||||
|
|
||||||
|
\begin_layout Plain Layout
|
||||||
|
Reference to app engine
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
.
|
.
|
||||||
An example of an application server not powering web applications, but
|
An example of an application server not powering web applications, but
|
||||||
instead regular business logic, is Oracle’s
|
instead regular business logic, is Oracle’s
|
||||||
|
@ -1314,7 +1327,7 @@ Internally the GDL VM needs to interface with the GGS to make use of the
|
||||||
helpers and tools that the GGS provides.
|
helpers and tools that the GGS provides.
|
||||||
Thus an internal API has to be designed to make the GDL VM be able to interact
|
Thus an internal API has to be designed to make the GDL VM be able to interact
|
||||||
with the GGS.
|
with the GGS.
|
||||||
This API is ideally completely independent of the GDL, and reusable for
|
This API is ideally completely independent of the GDL and reusable for
|
||||||
any GDL.
|
any GDL.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -1340,7 +1353,7 @@ reliable
|
||||||
In order to facilitate scalability the GGS needs a storage platform which
|
In order to facilitate scalability the GGS needs a storage platform which
|
||||||
is accessible and consistent.
|
is accessible and consistent.
|
||||||
The scalability aspects of the GGS are discussed from a theoretical point
|
The scalability aspects of the GGS are discussed from a theoretical point
|
||||||
of view, however no practical implementation of the scalability aspects
|
of view, however no practical implementations of the scalability aspects
|
||||||
are found in the prototype.
|
are found in the prototype.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -1386,7 +1399,7 @@ The UDP protocol is not supported for communication between client and server.
|
||||||
ation process using TCP was faster and easier than if UDP would have been
|
ation process using TCP was faster and easier than if UDP would have been
|
||||||
used.
|
used.
|
||||||
UDP is generally considered to be faster than TCP for the transfer of game
|
UDP is generally considered to be faster than TCP for the transfer of game
|
||||||
(and other) related data, this is discussed in more depth in
|
(and other) related data; this is discussed in more depth in
|
||||||
\begin_inset CommandInset ref
|
\begin_inset CommandInset ref
|
||||||
LatexCommand vref
|
LatexCommand vref
|
||||||
reference "sec:Choice-of-network"
|
reference "sec:Choice-of-network"
|
||||||
|
@ -1394,7 +1407,7 @@ reference "sec:Choice-of-network"
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
.
|
.
|
||||||
In short, the decision of using TCP means that games that requires a high
|
In short, the decision of using TCP means that games that require a high
|
||||||
speed protocol will not be supported by the GGS prototype.
|
speed protocol will not be supported by the GGS prototype.
|
||||||
Another limitation necessary to set on the system is the possibility to
|
Another limitation necessary to set on the system is the possibility to
|
||||||
have huge game worlds due to the implementation of the scaling mechanism
|
have huge game worlds due to the implementation of the scaling mechanism
|
||||||
|
@ -1455,7 +1468,7 @@ World of Warcraft
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
In turn based games each player has to wait for their turn.
|
In turn based games each player has to wait for their turn.
|
||||||
Latency is not a problem since the gameplay does not require fast interactions
|
Latency is not a problem since the gameplay does not require fast interactions
|
||||||
among the players, long round trip times will not be noticed.
|
among the players; long round trip times will not be noticed.
|
||||||
Examples of turn based games include board and card games, as well as multiplay
|
Examples of turn based games include board and card games, as well as multiplay
|
||||||
er games like
|
er games like
|
||||||
\emph on
|
\emph on
|
||||||
|
@ -1508,11 +1521,11 @@ textbf{Module}}{A part of a larger system}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The first prototype of the GGS consisted of simple modules, however, due
|
The first prototype of the GGS consisted of simple modules; however, due
|
||||||
to the separation of concerns among the modules, they were easily independently
|
to the separation of concerns among the modules, they were easily independently
|
||||||
modified and improved.
|
modified and improved.
|
||||||
Once the basic structure of the GGS had been established, the first prototype
|
Once the basic structure of the GGS had been established, the first prototype
|
||||||
was removed, remaining was the structure of the modules and the internal
|
was removed; remaining was the structure of the modules and the internal
|
||||||
flow of the application.
|
flow of the application.
|
||||||
This could be seen as an iterative workflow, with the first prototype being
|
This could be seen as an iterative workflow, with the first prototype being
|
||||||
the first iteration.
|
the first iteration.
|
||||||
|
@ -1551,7 +1564,7 @@ name "cha:Theory"
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
In this chapter, the theory behind the techniques used in the GGS are discussed.
|
In this chapter, the theory behind the techniques used in the GGS are discussed.
|
||||||
Performance issues and the measuring of performance is discussed.
|
Performance issues and the measuring of performance are discussed.
|
||||||
Benchmarking techniques are discussed.
|
Benchmarking techniques are discussed.
|
||||||
The options when choosing network protocols are given, along with a discussion
|
The options when choosing network protocols are given, along with a discussion
|
||||||
of each alternative.
|
of each alternative.
|
||||||
|
@ -1601,7 +1614,7 @@ Chess club
|
||||||
- a building where chess players can meet and play chess.
|
- a building where chess players can meet and play chess.
|
||||||
In the following text the choice of using a chess club for modeling the
|
In the following text the choice of using a chess club for modeling the
|
||||||
GGS is discussed.
|
GGS is discussed.
|
||||||
The chess club is described in greater detail, furthermore the corresponding
|
The chess club is described in greater detail; furthermore the corresponding
|
||||||
parts of the chess club in the GGS are described.
|
parts of the chess club in the GGS are described.
|
||||||
Since a real-world scenario is readily available, and to such a large extent
|
Since a real-world scenario is readily available, and to such a large extent
|
||||||
resembles the computer software required for the GGS, the next step in
|
resembles the computer software required for the GGS, the next step in
|
||||||
|
@ -2376,7 +2389,7 @@ name "sec:Choice-of-network"
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
There are two main types of protocols with help of which computer communication
|
There are two main types of protocols with help of which computer communication
|
||||||
over the Internet usually takes place; TCP and UDP which are known as the
|
over the Internet usually takes place, TCP and UDP which are known as the
|
||||||
network layer protocols and HTTP which is the most prominent application
|
network layer protocols and HTTP which is the most prominent application
|
||||||
layer protocol.
|
layer protocol.
|
||||||
The transport layer protocols are commonly used to transport application
|
The transport layer protocols are commonly used to transport application
|
||||||
|
@ -2534,11 +2547,12 @@ name "sec:Generic"
|
||||||
The GGS is a game server.
|
The GGS is a game server.
|
||||||
It was made with a desire to be suitable for many kinds of games.
|
It was made with a desire to be suitable for many kinds of games.
|
||||||
A game should not only be able to vary in terms of genre, graphics, gameplay
|
A game should not only be able to vary in terms of genre, graphics, gameplay
|
||||||
etc, but also in the way the game is implemented for example in different
|
etc.
|
||||||
programming languages.
|
but also in the way the game is implemented for example in different programmin
|
||||||
|
g languages.
|
||||||
The GGS should be OS independent and run on Windows, OS X and Linux.
|
The GGS should be OS independent and run on Windows, OS X and Linux.
|
||||||
The GGS can be run as a listen server on the players computer and host
|
The GGS can be run as a listen server on the computers of the players and
|
||||||
games locally.
|
host games locally.
|
||||||
It could also be a dedicated server running on dedicated independent hardware.
|
It could also be a dedicated server running on dedicated independent hardware.
|
||||||
It is meant to run any game in any environment in any way desired, therefore
|
It is meant to run any game in any environment in any way desired, therefore
|
||||||
being as generic as possible.
|
being as generic as possible.
|
||||||
|
@ -2547,7 +2561,7 @@ The GGS is a game server.
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Clients upload the source code of the game it would like to play on the
|
Clients upload the source code of the game it would like to play on the
|
||||||
GGS, this way any client can connect to the server and install the game
|
GGS, this way any client can connect to the server and install the game
|
||||||
through a API without the need of installation through the server provider
|
through an API without the need of installation through the server provider
|
||||||
or maintainer.
|
or maintainer.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -2667,14 +2681,14 @@ name "sec:Availability"
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
One important factor of any server is the availability.
|
One important factor of any server is the availability.
|
||||||
A server which is unreachable is an useless server.
|
A server which is unreachable is a useless server.
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Within the telecom sector high availability has been achieved
|
Within the telecom sector high availability has been achieved
|
||||||
\begin_inset CommandInset citation
|
\begin_inset CommandInset citation
|
||||||
LatexCommand citet
|
LatexCommand citep
|
||||||
key "armstrong2011"
|
key "armstrong2011"
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -2688,7 +2702,7 @@ key "armstrong2011"
|
||||||
There are several good papers (e.g.
|
There are several good papers (e.g.
|
||||||
|
|
||||||
\begin_inset CommandInset citation
|
\begin_inset CommandInset citation
|
||||||
LatexCommand citet
|
LatexCommand citep
|
||||||
key "VM:Jin2010,VM:Polze"
|
key "VM:Jin2010,VM:Polze"
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -2696,7 +2710,7 @@ key "VM:Jin2010,VM:Polze"
|
||||||
) on how to migrate whole virtual machines among nodes to replicate them
|
) on how to migrate whole virtual machines among nodes to replicate them
|
||||||
but for the GGS a different approach has been chosen.
|
but for the GGS a different approach has been chosen.
|
||||||
Instead of duplicating a virtual machine, an attempt to lift the state
|
Instead of duplicating a virtual machine, an attempt to lift the state
|
||||||
of the VM to a storage external to the VM is made.
|
of the VM to storage external to the VM is made.
|
||||||
The state is stored in a fast, fault tolerant data store instead of inside
|
The state is stored in a fast, fault tolerant data store instead of inside
|
||||||
the VM.
|
the VM.
|
||||||
In addition to migrating the state of the game VM, the GGS uses tools from
|
In addition to migrating the state of the game VM, the GGS uses tools from
|
||||||
|
@ -2728,7 +2742,8 @@ status open
|
||||||
\backslash
|
\backslash
|
||||||
nomenclature{
|
nomenclature{
|
||||||
\backslash
|
\backslash
|
||||||
textbf{Supervisor}}{A process monitoring and hadning crashes in other processes}
|
textbf{Supervisor}}{A process monitoring and handling crashes in other processes
|
||||||
|
}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -3227,7 +3242,7 @@ status open
|
||||||
nomenclature{
|
nomenclature{
|
||||||
\backslash
|
\backslash
|
||||||
textbf{Network split}}{Separation of two networks, occurs when two networks
|
textbf{Network split}}{Separation of two networks, occurs when two networks
|
||||||
cannot communicate, commonly because of a hardware or software failiure}
|
cannot communicate, commonly because of a hardware or software failure}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -3375,7 +3390,7 @@ JavaScript is a prime GDL candidate for the GGS.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
JavaScript, as a interpreted script language, has gained a lot of popularity
|
JavaScript, as an interpreted script language, has gained a lot of popularity
|
||||||
in other fields of computer science lately.
|
in other fields of computer science lately.
|
||||||
It is used as a server side language in large projects such as
|
It is used as a server side language in large projects such as
|
||||||
\emph on
|
\emph on
|
||||||
|
@ -3598,7 +3613,7 @@ Pong
|
||||||
\emph default
|
\emph default
|
||||||
, a game in which two players play a game involving a ball and two paddles.
|
, a game in which two players play a game involving a ball and two paddles.
|
||||||
The goal for each player is to shoot beside the other players paddle while
|
The goal for each player is to shoot beside the other players paddle while
|
||||||
not allowing the ball to pass by her own paddle.
|
not allowing the ball to pass by player's own paddle.
|
||||||
The game requires real time updates and is demanding when played in several
|
The game requires real time updates and is demanding when played in several
|
||||||
instances concurrently.
|
instances concurrently.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
@ -3643,7 +3658,7 @@ reference "chap:Results-and-discussion"
|
||||||
for each player.
|
for each player.
|
||||||
Due to lack of hardware, not enough player processes could be started in
|
Due to lack of hardware, not enough player processes could be started in
|
||||||
this way.
|
this way.
|
||||||
The bots were rewritten in Erlang, and due to Erlang's light weigh threads,
|
The bots were rewritten in Erlang, and due to Erlang's light weight threads,
|
||||||
enough processes could have been created to test the server successfully.
|
enough processes could have been created to test the server successfully.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -3699,7 +3714,7 @@ Overview of the prototype
|
||||||
The prototype of the GGS was developed using the Erlang language.
|
The prototype of the GGS was developed using the Erlang language.
|
||||||
In Erlang, most things are processes.
|
In Erlang, most things are processes.
|
||||||
The software running the Erlang code is known as the Erlang machine, or
|
The software running the Erlang code is known as the Erlang machine, or
|
||||||
a Erlang node.
|
an Erlang node.
|
||||||
Each Erlang node is capable of running several
|
Each Erlang node is capable of running several
|
||||||
\emph on
|
\emph on
|
||||||
threads
|
threads
|
||||||
|
@ -3751,7 +3766,7 @@ nomenclature{
|
||||||
\backslash
|
\backslash
|
||||||
textbf{Context switch}}{The act of switching from one context, commonly
|
textbf{Context switch}}{The act of switching from one context, commonly
|
||||||
a process, to another.
|
a process, to another.
|
||||||
Used by operating systems to achieve multi tasking}
|
Used by operating systems to achieve multi-tasking}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -3896,8 +3911,8 @@ reference "fig:The-layout-of"
|
||||||
|
|
||||||
the entire GGS system is represented graphically.
|
the entire GGS system is represented graphically.
|
||||||
The circles marked with 'C' topmost in the picture represent game clients.
|
The circles marked with 'C' topmost in the picture represent game clients.
|
||||||
These circles represent processes running on gamers computers, and not
|
These circles represent processes running on the computers of the gamers,
|
||||||
on the GGS machine.
|
and not on the GGS machine.
|
||||||
If a game of chess is to be played on the server, the clients on the machines
|
If a game of chess is to be played on the server, the clients on the machines
|
||||||
of the gamers will be chess game clients.
|
of the gamers will be chess game clients.
|
||||||
Clients connect through a network, pictured as a cloud, to the dispatcher
|
Clients connect through a network, pictured as a cloud, to the dispatcher
|
||||||
|
@ -4744,14 +4759,14 @@ The GGS protocol is modeled after the HTTP protocol.
|
||||||
with HTTP due to its presence in internet software.
|
with HTTP due to its presence in internet software.
|
||||||
Each GGS protocol packet contains a headers section.
|
Each GGS protocol packet contains a headers section.
|
||||||
The headers section is followed by a data section.
|
The headers section is followed by a data section.
|
||||||
In the headers section, parameters concerning the packet is placed.
|
In the headers section, parameters concerning the packet are placed.
|
||||||
In the data section, the actual data payload of the packet is placed.
|
In the data section, the actual data payload of the packet is placed.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
There is no requirement of any specific order of the parameters in the headers
|
There is no requirement of any specific order of the parameters in the headers
|
||||||
section, however the data section must always follow directly after the
|
section, however the data section must always follow directly after the
|
||||||
headers section separated by a empty new line.
|
headers section separated by an empty new line.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
|
@ -4785,7 +4800,7 @@ The parser of the GGS protocol implemented in the GGS prototype is designed
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Line 4 is a empty line which is, like in the HTTP protocol, the separator
|
Line 4 is an empty line which is, like in the HTTP protocol, the separator
|
||||||
between the head and body or payload section.
|
between the head and body or payload section.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -5149,12 +5164,12 @@ Game data from all games on the GGS is stored in the database backend of
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
In the GGS prototype the database module is using a database management
|
In the GGS prototype the database module is using a database management
|
||||||
system called Mnesia .
|
system called Mnesia.
|
||||||
Mnesia ships with the standard Erlang distribution and is a key-value store
|
Mnesia ships with the standard Erlang distribution and is a key-value store
|
||||||
type of database.
|
type of database.
|
||||||
Mnesia is designed to handle the stress of telecoms systems
|
Mnesia is designed to handle the stress of telecoms systems
|
||||||
\begin_inset CommandInset citation
|
\begin_inset CommandInset citation
|
||||||
LatexCommand citet
|
LatexCommand citep
|
||||||
key "667766"
|
key "667766"
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -5240,9 +5255,9 @@ localStorage
|
||||||
localStorage
|
localStorage
|
||||||
\noun default
|
\noun default
|
||||||
.
|
.
|
||||||
To store a value within the database, not only is the table token and the
|
To store a value within the database, not only are the table token and
|
||||||
name of the namespace required, but a unique key so that the value can
|
the name of the namespace required, but a unique key so that the value
|
||||||
be successfully retrieved or modified later.
|
can be successfully retrieved or modified later.
|
||||||
The key is decidable by the game developer.
|
The key is decidable by the game developer.
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
@ -5261,7 +5276,7 @@ key "webstorage:website"
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
.
|
.
|
||||||
Usage of the web storage standard in the GGS provides a well documented
|
Usage of the web storage standard in the GGS provides a well-documented
|
||||||
interface to the database backend.
|
interface to the database backend.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -6098,8 +6113,8 @@ key "Savor:1997:HSA:851010.856089"
|
||||||
There are several approaches to a supervisor design in general (when not
|
There are several approaches to a supervisor design in general (when not
|
||||||
just considering how they work in Erlang).
|
just considering how they work in Erlang).
|
||||||
One common approach is to have the supervisor look in to the state of the
|
One common approach is to have the supervisor look in to the state of the
|
||||||
process(es) it supervises, and let the supervisor makes decisions based
|
process or processes it supervises, and let the supervisor makes decisions
|
||||||
on this state.
|
based on this state.
|
||||||
The supervisor has a specification of how the process it supervises should
|
The supervisor has a specification of how the process it supervises should
|
||||||
function, this is how it makes decisions.
|
function, this is how it makes decisions.
|
||||||
|
|
||||||
|
@ -6425,16 +6440,16 @@ The entire GGS was not tested using QuickCheck, nor was the entire client
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
QuickCheck has features to generate very large and complex tests, the results
|
QuickCheck has features to generate very large and complex tests, the results
|
||||||
of which can be hard to analyze.
|
of which can be hard to analyze.
|
||||||
The solution to reading these complex test is to extract a
|
The solution to reading these complex tests is to extract a
|
||||||
\emph on
|
\emph on
|
||||||
minimal failing test case
|
minimal failing test case
|
||||||
\emph default
|
\emph default
|
||||||
which contains the smallest failing test sequence.
|
which contains the smallest failing test sequence.
|
||||||
By applying a very large test and gradually simplifying the test to find
|
By applying a very large test and gradually simplifying the test to find
|
||||||
the smallest failing sequence, many bugs which would other wise have been
|
the smallest failing sequence, many bugs which would otherwise have been
|
||||||
hard to catch can be caught
|
hard to catch can be caught
|
||||||
\begin_inset CommandInset citation
|
\begin_inset CommandInset citation
|
||||||
LatexCommand citet
|
LatexCommand citep
|
||||||
key "Arts:2006:TTS:1159789.1159792"
|
key "Arts:2006:TTS:1159789.1159792"
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
@ -6444,7 +6459,7 @@ key "Arts:2006:TTS:1159789.1159792"
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
QuickCheck was originally made for the programming language Haskell.
|
QuickCheck was originally made for the programming language Haskell.
|
||||||
There is a lot of reimplementations of QuickCheck in various programming
|
There are a lot of implementations of QuickCheck in various programming
|
||||||
languages.
|
languages.
|
||||||
Erlang QuickCheck (EQC) and Triq are two variants of QuickCheck for Erlang.
|
Erlang QuickCheck (EQC) and Triq are two variants of QuickCheck for Erlang.
|
||||||
EQC was chosen for testing the GGS.
|
EQC was chosen for testing the GGS.
|
||||||
|
@ -6480,7 +6495,7 @@ Pong
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Pong is a classic video game released by atari.
|
Pong is a classic video game released by Atari.
|
||||||
Being a real-time based game, the game state will be constantly broadcasted
|
Being a real-time based game, the game state will be constantly broadcasted
|
||||||
to all the players of a started Pong game in the GGS.
|
to all the players of a started Pong game in the GGS.
|
||||||
Each time a Pong game has been started and two bots has joined to play,
|
Each time a Pong game has been started and two bots has joined to play,
|
||||||
|
@ -6591,12 +6606,11 @@ ed Erlang tuple.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
The protocol parser sends this Erlang touple back to the player process.
|
The protocol parser sends this Erlang tuple back to the player process.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Enumerate
|
\begin_layout Enumerate
|
||||||
The player process checks if the command is is a Server-Command or a Game-Comman
|
The player process checks if the command is a Server-Command or a Game-Command.
|
||||||
d.
|
|
||||||
In our example it is a Game-Command and it sends the message to the table
|
In our example it is a Game-Command and it sends the message to the table
|
||||||
process.
|
process.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
@ -6806,8 +6820,8 @@ The generic nature of the GGS leaves it up to the client to define which
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The first client which connects to a table is responsible to provide the
|
The first client who connects to a table is responsible to provide the JavaScrip
|
||||||
JavaScript server source code.
|
t server source code.
|
||||||
To do so there is a
|
To do so there is a
|
||||||
\noun on
|
\noun on
|
||||||
define
|
define
|
||||||
|
@ -7550,7 +7564,7 @@ erlv8
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
erlv8 is powered by the V8 engine developed by Google.
|
erlv8 is powered by the V8 engine developed by Google.
|
||||||
The ability to communicate from JavaScript to Erlang using NIF callbacks
|
The ability to communicate from JavaScript to Erlang using NIF callbacks
|
||||||
is is present in the erlv8 bindings and can be used within the GGS.
|
is present in the erlv8 bindings and can be used within the GGS.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
|
@ -7593,7 +7607,7 @@ Protocol design
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Initially the GGS protocol was planed to use the UDP protocol as a transport
|
Initially the GGS protocol was planned to use the UDP protocol as a transport
|
||||||
layer.
|
layer.
|
||||||
Due to the lack of error checking in the UDP protocol, the UDP protocol
|
Due to the lack of error checking in the UDP protocol, the UDP protocol
|
||||||
is faster than the TCP protocol, this was a main reason in the desire to
|
is faster than the TCP protocol, this was a main reason in the desire to
|
||||||
|
@ -7743,7 +7757,7 @@ Testing of the GGS took place in two separate sessions.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Each of the two simulations use JavaScript as the GDL.
|
Each of the two simulations uses JavaScript as the GDL.
|
||||||
The JavaScript is run through Google V8.
|
The JavaScript is run through Google V8.
|
||||||
The database module uses Mnesia.
|
The database module uses Mnesia.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
@ -7837,7 +7851,7 @@ In the first test, in which Mnesia has been heavily used, the server had
|
||||||
load.
|
load.
|
||||||
In the next testing session, the test has been conducted with another client
|
In the next testing session, the test has been conducted with another client
|
||||||
that did not use Mnesia.
|
that did not use Mnesia.
|
||||||
Without mnesia the server peaked at 60,000 messages per second, however
|
Without Mnesia the server peaked at 60,000 messages per second, however
|
||||||
this was only for a very short time.
|
this was only for a very short time.
|
||||||
The average throughput was around 25,000 messages per second, five times
|
The average throughput was around 25,000 messages per second, five times
|
||||||
more than what the server was able to process with Mnesia in place.
|
more than what the server was able to process with Mnesia in place.
|
||||||
|
@ -8248,7 +8262,7 @@ This thesis describes a method to create a reliable and generic game server
|
||||||
To make the GGS as generic as possible separation of game and server logic
|
To make the GGS as generic as possible separation of game and server logic
|
||||||
is necessary.
|
is necessary.
|
||||||
Designing a good API is vital in order to allow game developers to interact
|
Designing a good API is vital in order to allow game developers to interact
|
||||||
with the server in a easy manner and with minimal overhead.
|
with the server in a simple manner and with minimal overhead.
|
||||||
Furthermore every game should be isolated so that games can not interfere
|
Furthermore every game should be isolated so that games can not interfere
|
||||||
with each other.
|
with each other.
|
||||||
Isolation can be achieved by introducing a context for each game which
|
Isolation can be achieved by introducing a context for each game which
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue