Open Source Based G2S Game To System Eng
Open Source Based G2S Game To System Eng
Copyright © 2014 Sangmin Kim and Heejune Ahn. This is an open access article distributed
under the Creative Commons Attribution License, which permits unrestricted use, distribution, and
reproduction in any medium, provided the original work is properly cited.
Abstract
The casino gaming industry has introduced G2S (game to system) standards for
the future management protocol for slot machines. G2S does not simply replace
the 20 year old SAS protocol with Internet technology but also provides various
application and business opportunities to the casino industry. In this paper, we
present our design experience of C/C++ G2S engine for slot machines, based on
publically available open-sources, gSOAP and SQLite libraries. We discuss
design issues by comparing ours with openG2S, another open-source
implementation mainly for G2S hosts. Our engine shows excellence in many
aspects, including smaller footprint, no-JVM interpreter license requirement, and
better command response time.
Keywords: G2S (game to system) standards, slot machine accounting, game IT,
protocol design, open source, embedded system
Since SAS (Slot Accounting System) [2] is introduced by IGT in early 1990’s, it
has been the de facto standards designed to automate slot machine meter reporting
and event logging, player tracking, bonusing, ticketing and cashless gaming. In
spite of 25 years successful operation of SAS systems, they has many limitations,
the necessity of SMIB (slot machine interface board) for connecting to hosts, the
proprietary protocols between SMIB and host systems, slow communication
speed of serial protocol – 19,200 bps, no way to download content to the EGM,
and no room for server-based games. GSA released G2S protocol [3] in 2008, a
new protocol standards armed with Internet and web-based protocols. G2S has
various benefits, making every EGM be able to talk directly to multiple hosts,
leveraging off-the-shelf Internet technologies, host accessibility to incredible data
in each EGM, and allowing new applications to flourish.
Despite these flexibility and chance of business, technical details are almost
hidden in the closed casino IT industry. The paper tries to open up the technical
details for the interested IT industry and engineers so that they can contributes the
industry and suggest better direction of evolutions. The authors believe that the
open source based implementation of G2S protocol engine of EGM side suits for
this purpose, because of the easy accessibility of open source software. The
technical key features are discussed in Section 2, the architecture and key
components of our design and implementation are described in Section 3, and
finally in Section 4 we evaluate the systems in performance and functionality
together with the comparison with OpenG2S [4], another open source
implementation by IGT.
Transport layer functionality and service interface are fully defined by WSDL
(Web-Service Definition Language) documents. A typical transport mechanism is
HTTP and for security purpose HTTPS. Optional multicast mechanism should be
supported for the system providing ‘progressive’ bonus functionality.
G2S message layer provides addressing and delivery mechanism. Remarkably, the
delivery is asynchronous. When a G2S-Body message arrives at host or EGM, its
delivery is acknowledged with a G2S-ACK message, but the acknowledgement
does not guaranteed that the requests or response commands are processed.
Open source-based G2S engine design 1173
Architecture: The architecture follows the original 3 layers protocol structure and
utilizes open source software libraries as much as possible according to the moto
“Never Re-invent Wheel.”
MsgBuilder
OtherHandlers StateMa
chines
For
CommsHandler Classes
oQ
iQ
gSoap
Message Processor
gSoap
G2SEGMServer Emitter(s)
fastCGI
lighthttpd
HTTP
Thread Design: One RX thread and one TX (called an emitter) are used for trans-
Open source-based G2S engine design 1175
port layer and message layer, and single thread is used for applications layer for
not using multi-thread locks. Therefore, the application thread waits for 2 event
queues, one for commands from host, the other is for systems and user events
using multiplexing POSIX select API.
Persistent and Device Layer: Most of status of physical and logical devices in
EGM is reflected into database tables, especially when it should be persistent on
system restart due to operator’s commands or failures. Fig. 5 shows the key tables
of G2S EGM persistent information and their relationship. Class devices’
configuration and some status info, host’s subscription and transaction logs,
metering data sets are the key records.
For embedded database engine, SQLite3.0 [6] is used. SQLite is also open-source
for small embedded environment whereas SQLite has much limitation in
comparison with other commercial or server-based DBA. However, For
independence from specific DB engine and easiness for application programmer,
an DAO (data access object) pattern [7] was applied (Fig. 6). One more benefit
using DAO is that user does not need to consider if a status or parameter of a
device is persistent or not. DAO decide to store or not according to the persistence
property of each parameter.
Open source-based G2S engine design 1177
The interoperability test is done with OpenG2S host implementation by IGT. The
feature comparison between OpenG2S and our G2S implementation is listed in
Table 1. OpenG2S is written in Java, based on the J2EE servlet technology with
embedded tomcat server and JAXB for XML processing. The architecture is quite
similar to ours. Due to the limited functionality in OpenG2S, furthermore no
longer maintained by IGT, only subset of commands and related functions are
verified for interoperability: enabling and disabling communication and obtaining
device list in Comms class, and enabling, disabling, locking and door-open in
cabinet class, a few event subscription and reports eventHandler class, some basic
meters and manipulation in gameplay class. However these 5 classes plus handpay
class is the core/minimum functionality and considered enough for verifying the
architectural issue using the adopted technology and open source library.
1178 Sangmin Kim and Heejune Ahn
References
[6] Owens, Michael. Embedding an SQL database with SQLite. Linux Journal
2003
[7] Crawford, William, and Jonathan Kaplan. J2EE design patterns. O'Reilly
Media, Inc., 2003
[8] Il-Sun Park and S.-J. Shin, WS Security of XBRL Financial Documents
Encoded by SOAP, International Journal of Security and Its Applications,
vol. 7, no. 4 (2013)
[9] G.- C. Park, S. Kim, N. Yoo, K.-S. Lee and W. S. Jang, An Automatic
Conversion HTML/XML to WSDL for Ubiquitous Mobile Services,
International Journal of Multimedia and Ubiquitous Engineering, vol. 1,
no. 1 (2006)
[10] K.-H. Park, An XML Based Communication System for a Ubiquitous Game
Simulator, International Journal of Smart Home, vol. 7, no. 6 (2013)