added GDL VM

This commit is contained in:
Jeena Paradies 2011-04-05 12:38:55 +02:00
parent 55448caa90
commit 0db0a4e418

View file

@ -1,4 +1,4 @@
#LyX 1.6.7 created this file. For more info see http://www.lyx.org/
#LyX 1.6.9 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
@ -862,7 +862,17 @@ One important factor of any server is the availability.
\begin_layout Standard
There are several good papers on how to migrate whole virtual machines between
nodes to replicate them but for the GGS a different approche has been chosen.
nodes to replicate them
\begin_inset Note Note
status open
\begin_layout Plain Layout
Add more information about that
\end_layout
\end_inset
but for the GGS a different approche has been chosen.
Instead of just duplicating a virtual machine, the programming language
Erlang has been used which offers several features to increase the availability.
Some of them are
@ -1332,6 +1342,148 @@ We only support languages running in a sandboxed environment.
Encryption
\end_layout
\begin_layout Section
Game Development Language in a Virtual Machine
\end_layout
\begin_layout Standard
There is only a very limited number of game developers who would like to
write their games in Erlang, therefore we had to come up with something
to resolve this problem.
The main idea was to offer a replacable module which would introduce a
interface to different virtual machines which would run the game code.
This way a game developer can write the game in his favourite language
while the server part still is written in Erlang and can benefit from all
of its advantages.
\end_layout
\begin_layout Subsection
JavaScript
\end_layout
\begin_layout Standard
JavaScript has gained a lot of popularity lately, it is used in large projects
such as
\emph on
Riak
\emph default
\begin_inset Foot
status open
\begin_layout Plain Layout
\begin_inset Flex URL
status collapsed
\begin_layout Plain Layout
http://wiki.basho.com/An-Introduction-to-Riak.html
\end_layout
\end_inset
\end_layout
\end_inset
,
\emph on
CouchDB
\emph default
\begin_inset Foot
status open
\begin_layout Plain Layout
\begin_inset Flex URL
status collapsed
\begin_layout Plain Layout
http://couchdb.apache.org
\end_layout
\end_inset
\end_layout
\end_inset
.
On the popular social coding site
\emph on
GitHub.com
\emph default
, 18%
\begin_inset Foot
status open
\begin_layout Plain Layout
during the writing of the thesis the percentage went up to 19%
\begin_inset Flex URL
status collapsed
\begin_layout Plain Layout
https://github.com/languages/
\end_layout
\end_inset
\end_layout
\end_inset
of all code is written in JavaScript.
The popularity of JavaScript in the programming community, in combination
with the availability of several different JavaScript virtual machines
was an important influence in choosing JavaScript as the main control language
for our GGS prototype.
\end_layout
\begin_layout Subsection
Other languages
\end_layout
\begin_layout Standard
Other languages like
\emph on
lua
\emph default
,
\emph on
ActionScript
\emph default
are suitable as well because there is a virtual machine for each of them
which can be
\begin_inset Quotes eld
\end_inset
plugged in
\begin_inset Quotes erd
\end_inset
into our GDL VM interface.
With help of the
\emph on
Java Virtual Machine
\emph default
or the
\emph on
.NET
\emph default
environment it is even possible to run nearly every available programming
language in a sandbox as a GDL.
\end_layout
\begin_layout Standard
Due lack of time we have decided to use just the Erlang <-> JavaScript bridge
with our interface.
\end_layout
\begin_layout Chapter
Practice
\begin_inset Note Note
@ -1637,7 +1789,7 @@ Problems
\end_layout
\begin_layout Section
erlang_js
erlang_js
\end_layout
\begin_layout Standard