Simplified Game Specific Description Language for Rapid Game Server Development using LDD (Language Driven Development) Framework

Similar documents
PULP Scription: A DSL for Mobile HTML5 Game Applications

Textual Modeling Languages

Collaborative Open Market to Place Objects at your Service

Modeling Turnpike: a Model-Driven Framework for Domain-Specific Software Development *

Lightweight Data Integration using the WebComposition Data Grid Service

MDE Adoption in Industry: Challenges and Success Criteria

GenericServ, a Generic Server for Web Application Development

Model Driven Interoperability through Semantic Annotations using SoaML and ODM

A Study on Data Analysis Process Management System in MapReduce using BPM

Software Development Kit

Run-time Variability Issues in Software Product Lines

YouTrack MPS case study

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

Development of Integrated Management System based on Mobile and Cloud Service for Preventing Various Hazards

Organization of DSLE part. Overview of DSLE. Model driven software engineering. Engineering. Tooling. Topics:

A Framework of Model-Driven Web Application Testing

Reusability of WSDL Services in Web Applications

FRAFOS GmbH Windscheidstr. 18 Ahoi Berlin Germany

GECO: Automatic Generator-Composition for (Aspect-oriented) DSLs

A Case Study on Model-Driven and Conventional Software Development: The Palladio Editor

Applying 4+1 View Architecture with UML 2. White Paper

FRAFOS GmbH Windscheidstr. 18 Ahoi Berlin Germany

Programmabilty. Programmability in Microsoft Dynamics AX Microsoft Dynamics AX White Paper

Clarifying a vision on certification of MDA tools

Embedded Software Development with MPS

A Monitored Student Testing Application Using Cloud Computing

COCOVILA Compiler-Compiler for Visual Languages

Rotorcraft Health Management System (RHMS)

PLATFORM-AS-A-SERVICE (PAAS): THE ADOXX METAMODELLING PLATFORM

Syntax Check of Embedded SQL in C++ with Proto

Study of HTML5 WebSocket for a Multimedia Communication

MVC Architecture Driven Design and Implementation of Java Framework for Developing Desktop Application

Modeling Cloud Messaging with a Domain-Specific Modeling Language

CARDA: Content Management Systems for Augmented Reality with Dynamic Annotation

Learning Web App Development

Winery A Modeling Tool for TOSCA-based Cloud Applications

Structure Based Enterprise Mobility for Mobile Device Applications for AHMS

Software Requirements Specification

Middleware- Driven Mobile Applications

Mobile App Infrastructure for Cross-Platform Deployment (N11-38)

HYBRID. Course Packet

A Web Specific Language for Content Management Systems

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

Tool chain (BRIDE) delivered as BRICS software distribution

A CLOUD-BASED FRAMEWORK FOR ONLINE MANAGEMENT OF MASSIVE BIMS USING HADOOP AND WEBGL

A Multi-layered Domain-specific Language for Stencil Computations

A model driven approach for bridging ILOG Rule Language and RIF

XFlash A Web Application Design Framework with Model-Driven Methodology

Research and Performance Analysis of HTML5 WebSocket for a Real-time Multimedia Data Communication Environment

WebRTC: Why and How? FRAFOS GmbH. FRAFOS GmbH Windscheidstr. 18 Ahoi Berlin Germany

Personal Health Care Management System Developed under ISO/IEEE with Bluetooth HDP

XML Processing and Web Services. Chapter 17

Framework as a master tool in modern web development

Monitoring Infrastructure (MIS) Software Architecture Document. Version 1.1

Design of Media measurement and monitoring system based on Internet of Things

VICCI. The Eclipse Modeling Framework (EMF) A Practical Introduction and Technology Overview. Dipl.-Inf. Christoph Seidl

A Cloud Architecture for an Extensible Multi-Paradigm Modeling Environment

Research on P2P-SIP based VoIP system enhanced by UPnP technology

Design of Visual Repository, Constraint and Process Modeling Tool based on Eclipse Plug-ins

GUI and Web Programming

SOA, case Google. Faculty of technology management Information Technology Service Oriented Communications CT30A8901.

Oracle Communications WebRTC Session Controller: Basic Admin. Student Guide

Author: Daniël van t Oever

Development of Integrated Management System based on Mobile and Cloud service for preventing various dangerous situations

Generating Web Applications from Process Models

Building Web-based Infrastructures for Smart Meters

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web Application

Architectural Design Patterns for Language Parsers

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

Object-Oriented Software Specification in Programming Language Design and Implementation

Web Integration Technologies

Simplifying e Business Collaboration by providing a Semantic Mapping Platform

clooca : Web based tool for Domain Specific Modeling

From Business World to Software World: Deriving Class Diagrams from Business Process Models

Welcome to the Force.com Developer Day

New Web Application Development Tool and Its MDA-Based Support Methodology

A Model-Driven Approach for the Development of an IDE for Spacecraft On-Board Software

Implementing reusable software components for SNOMED CT diagram and expression concept representations

Pondering on the Key Functionality of Model Driven Development Tools: the Case of Mendix

Lets3D: A Collaborative 3D Editing Tool Based On Cloud Storage

Designing and Embodiment of Software that Creates Middle Ware for Resource Management in Embedded System

Transcription:

, pp.123-130 http://dx.doi.org/10.14257/astl.2013.39.23 Simplified Game Specific Description Language for Rapid Game Server Development using LDD (Language Driven Development) Framework Hwan-Soo Yoo and Seong-Whan Kim School of Computer Science, University of Seoul, 13 Siripdae-gil, Dongdaemun-gu, Seoul 130-743, Republic of Korea raryu7@gmail.com, swkim7@uos.ac.kr Abstract. Real time games require efficient and parallel processing capability for the game server, which is not easy for non-programmers and even for start-up companies. In this paper, we propose an integrated language driven development (LDD) framework for the real time game server development. Using LDD framework expert developer can make DSL language and later novice developer or non-programmer can programming with ease by using that DSL. We illustrate detailed LDD framework and give simple game server language. Even novice programmer can program during game development process, utilizing composed DSL written by expert programmer. This paper contributes to increase development productivity and ease of maintenance in game development process. Game developer can make DSL easily by using our LDD. We illustrated detailed DSL process in game development and showed real world http game server language following LDD. Keywords: DSL, Framework, Game, Real-time network, Development process 1 Introduction Game programmers no longer make game that only works on PCs. The number of device variety such as smart phones, smart pads, smart TVs and much more are increasing at a phenomenal rate and the focus is now shifting to those devices from traditional PCs. A lot of time is spent during requirements and implementation phase during software development. DSL (domain-specific language) [1] refer to language designed for specific are in mind, and DSL are used for the implementation phase. An advantage of using DSL is when domain s complexity if high, development that have used DSL have high efficiency compared to development investment. If application development team is composed of both expert and novice at a particular language, then the expert implement DSL during the beginning of the development will allow the novices to use the implemented DSL which will lead to higher productivity for the team. LDD is language driven method for game development that heavily uses and integrates DSL with game development process seamlessly. We design sophisticated framework using this method and demonstrate a simple case study. By using LDD for game development process, even non-programmer such as ISSN: 2287-1233 ASTL Copyright 2013 SERSC

game designer can do prototyping for the game during game design. Even novice programmer can shorten game development process if expert programmer make composed DSL available, thereby increasing quality by assigning time to import tasks. After this introduction, this paper is structured as follow: Section 2 reviews related work. Section 3 explains LDD process. Section 4 shows simple game serve engine case study. Section 5 summarizes the paper and outlines future work. 2 Related Works In this section, we review related works on various development process Firstly, we review model driven development (MDD) and domain specific language (DSL) approaches. MDD provides a methodology, in which programmers don t need to program detailed functionality which they intend to implement; they can use a model to define the systems architecture and functions. Skeleton source code is generated from the graphical model and after composing rest of the source code, object allocation, method lookup, and exception handling constructs are used to complete the program from the scratch code [2]. Bernardi [3] focused on research of applying model driven engineering (MDE) technologies to build production of a working prototype of web applications using design model and transformation technologies for different uses and domains which include XML/XSLT [4]-based languages, OMG standards based languages, ATL (ATLAS transformation languages ) [5], and many others. MOFM2T (MOF Model to Text) [6] specification defines transforming MOF models into text. Xpand framework under eclipse provides MOFM2T functionality. MDD of web applications [7] is ubiquitous web application [8] approach utilizes various models at several layers transforming into source code to arrive at final web applications. DSL is a language that defines the jargon of a particular class of problem domains or set of domain aspects. Executable DSLs hide software implementation [13]. DSL is referred to as either domain specific language in an academic way or just simply domain language. It is a limited language that is concentrated to specific problem domains by appropriate abstraction and notations. It is a problem-centric language [14] built for one particular task in mind. Development teams use same vocabulary to represent program module. For example, if there is a requirement for bond trading module within problem domain, same vocabulary is used during code writing [15], Ghosh [9] depicts the interface role of DSL from problem domain to solution domain. That two domain shares same vocabulary for ease of communication and domain expert can use DSL that was made by developer can solve problem domain s question with ease by using their professional knowledge. Kramer [16] researched mobile development DSL by supporting functions such as variables, functions, widgets, and events for deployment to iphone, Android, and Windows Mobile phones. Funk [17] proposed Xtext [18] and Xtend [19] for DSL to provide easy programming tool for non-programmers including graphic designers or content producers because image, sound, voice, and video was hard to program with existing tools. Furtado [20] have defined method on how to make games that operate under client using DSL, SPL, and FODA [21]. Maximilien [22] suggests that current web mashups provide a flourishing 124 Copyright 2013 SERSC

and innovative web, but it also states that it raises new challenges, including that current mashups are point solutions, lacking principled approaches to architecture and design; and many similar mashups use the same APIs but share nothing else in common. So by using DSL, developers can also use mashups to solve Web integration and service composition problems. Masuch [23] integrated DSL into scenario-based game. Figure 1(a) illustrates MobDSL s architecture. It consists of 3 tiers (1) the application, written and compiled using the DSL; (2) the DSL specific engine, and implemented libraries; (3) the running platform. Figure 1(b) depicts PULP tool chain with media and script artifacts, Figure 1(c) is an extracted feature model of ArcadEx, and Figure12(d) shows service mashups architecture. DSL engine takes a DSL-defined mashup and generates the code for a Ruby on Rails application. (a) (b) (c) (d) Fig. 1. (a) MobDSL architecture, (b) PULP Scription architecture (c) ArcadEx game feature model for DSL (d) Service mashups architecture using DSL 3 LDD (Language Driven Development) for clear, concise integration into game development In this section, we propose LDD framework, which is a DSL approach for game development. It is an elaborative integration of DSL into game development process, and it can be said to be a development framework that combines DSL based domain modeling and game development process. Figure 2 shows the overall LDD framework. To build LDD framework for game development process, we consider following major phases: (1) language requirements, (2) reference artifacts, (3) language design and compiler, and (4) legacy engine semantics. The details are as follows. Copyright 2013 SERSC 125

Fig. 2. Language Driven Development Process (1) Language requirements: it is the first phase that is divided into three parts: domain artifact for analyzing the given domain s characteristics, general language artifact for analyzing general language characteristics, and finally language requirements that combines the previous two artifacts to form overall requirements for the language. Terminology and language found at this phase are used for DSL s lexicon and communication in the later development and common language need to be chosen carefully. This common language is also called ubiquitous language [10]. (2) Reference artifacts: it is based on the information collected in the language requirement phase above and is composed of function and domain model. (3) Language design and compiler: the defined function and domain model of the reference artifacts defined during language design phase are used to define lexicon definitions, abstract syntax, concrete syntax, and EBNF to be used in DSL being built. For internal DSL implementation, there is embedded method that uses smart API and Syntax tree manipulation and generative method that does meta-programming during compile-time and runtime. Appropriate parser generator and lexical analyzer should be chosen at compiler design stage by referring to the information presented above. (4) Legacy engine semantics: output that has been generated through compiler or internal code runs. These legacy engines are engines that were being used before DSL project or engines that were chosen for the project. These legacy engines need to be utilized to broaden areas that DSL is usable and lessen development effort. 126 Copyright 2013 SERSC

4 Implementation In this section, we experimented with our LDD framework to develop a HTTP game server. Developers will be able to compose appropriate applications for particular domains such as web-based application, game, chatting application, real-time monitoring and so on by using our work. Figure 3 depicts simple game server output and flow at each stage of LDD framework and language artifacts. Fig. 3. Language driven development framework and artifacts of game server language Below is the partial source code for the browser-based multi-user real-time game server engine generated by such means. First line is for assigning collection using MongoDB [11], a nosql [12] solution as an example. Second line is for assigning port for WebSocket [13] and webserver for real-time networking and HTTP. Lines 4~11 is for providing warscence.html to users joining the room and disseminating packet to participating users in the event of shooting. 1 database collection is 'member' 2 server port is 52273 3 server file is 'login.html' when get '/' 4 server file is 'warscene.html' when get '/game/:room' 5 socket act when 'shoot' Copyright 2013 SERSC 127

6 emit 'shoot' in 'room' 7 end 8 socket act when 'addroom' 9 add room to roomlist 10 emit 'addroom' 11 end With this language user can easily implement networking, database and web service feature. Without our language line 3 will be like below code. app.get('/',function(request,response){ fs.readfile('login.html','utf-8',function(err,data){ response.writehead(200, { 'Content-Type' : 'text/html'}); response.end(data); }); }); 4.1 Language requirements Language requirements for real time game server is as follow. It must contain (1) general language requirements and (2) domain language requirements such as HTTP server, database and real-time networking. (1) General language requirements: Basic features the language must support are source code structuralization and variable scope through variable, conditional statement, and block statement. Use is, isnt that close to natural language for supporting expression from Conditional statement. (2) Domain language requirements: Use server, database, and socket that takes the form of subject for defining HTTP Server, database, and real-time network. For supporting Real-time communication and multi-user characteristics, emit, ack, disconnect, write, and send features must be provided by using easy and general language. For Database support characteristic, we provide keywords save, get, update, delete for CRUD operation. 4.2 Language design and Compiler Word class form from natural language for subject, property, verb, preposition, and object for lexicon define rule were used and optimized and minimized lexicon definition was made. Descriptions for lexicon are as in Table 2. Abstract syntax tree was composed with CoffeeScript [14] and Jison [15] parser was used for compiler. Jison is JavaScript based parser module that is very similar to existing Bison[16] or Flex[16]. This Jison was used for language s definition and parser. Table 1. Language lexicon Lexicon subject server property database property preposition server verb network verb Description server, database, socket port, file, log, message, redirection, download File collection in, to, from response, get, post, is join, add, emit, leave, disconnect, ack, send, write 128 Copyright 2013 SERSC

database verb conditional statement block statement save, delete, update, get when, is, isnt act, end Partial BNF for language is as Figure 4. It shows general statement, block statement, server s when statement, and conditional statement. languageδ statement* statement subject verb object preposition+ whenstatement+ block_statement inblockstatement blockstatement server act whenstatement socket act when object inblockstatement inblocksentence whenstatement conditionstatement inblocksentence* end response serverproperty verb object whenstatement+ response+ verb object preposition+ whenstatement+ when [ get+ post+ ] [ object conditionstatement ] object [ is isnt ] object Fig. 4. Partial BNF for language Compiler is composed of syntactical analyzer and transcoder as in Figure 3. Syntactical analyzer is formed of (1) lexicon parser that takes the processing rule as input and processes syntax, (2) AST handler that processes semantics, (3) stack handler that processes push and pop operation statement, and (4) array handler. Transcoder is composed of skeleton generator that generates stub code necessary for the operation of server that has been made with our language, server generator for the generation of typical server element code, Web generator for HTTP and Express side generation, General code generator for general language feature, and Code aggregator that collects the codes mentioned. 4.3 Legacy engine semantics Output that has been generated through compiler operates on top of the legacy engine. Node.js is used for server engine and Socket.IO is used for real-time networking server engine. Express for Web engine, MongoDB for database engine, and MongoJS for MongoDB and Express integration. 5 Summary and Conclusion LDD based development provides the procedures for building DSL during game development. DSL produced from this procedure is easily usable by non-experienced in game programming and suggests convenience and reusability not realizable in the traditional development. This framework encompasses from language requirement to design, textual language compiler and deployment to legacy engines and is applicable to various domains. Examples of such domain is: Given that the task is to build widely used real-time network application server in use by existing games, game Copyright 2013 SERSC 129

planner or non-expert developer can easily do database handling and network communication that are difficult to handle using existing languages by using DSL that have been constructed through LDD. Also, there are a lot of demand for interdisciplinary related works which have caused media art designer to do programming also, at which they use processing language[17] primarily for the task. Media art designer can efficiently express what they intend with little amount of code by using the DSL produced by domain experts by LDD approach instead of the aforementioned language. References 1. Mernik, M., Heering, J., Sloane, A.M.: When and how to develop domain-specific languages. ACM Comput. Surv. CSUR. 37, 316 344 (2005). 2. Balasubramanian, K., Gokhale, A., Karsai, G., Sztipanovits, J., Neema, S.: Developing applications using model-driven design environments. Computer. 39, 33 40 (2006). 3. Bernardi, M.L., Di Lucca, G.A., Distante, D.: A model-driven approach for the fast prototyping of Web applications. Web Systems Evolution (WSE), 2011 13th IEEE International Symposium on. pp. 65 74 (2011). 4. James, C.: Xsl transformations (xslt), http://www. w3. org/tr/xslt. 5. Jouault, F., Kurtev, I.: Transforming models with ATL. Satellite Events at the MoDELS 2005 Conference. pp. 128 138 (2006). 6. OMG: MOF Model to Text Transformation Language (MOFM2T), 1.0, http://www.omg.org/spec/mofm2t/1.0/. 7. Distante, D., Pedone, P., Rossi, G., Canfora, G.: Model-driven development of web applications with UWA, MVC and JavaServer faces. Web Engineering. pp. 457 472. Springer (2007). 8. Finkelstein, A., Savigni, A., Kappel, G., Retschitzegger, W., Kimmerstorfer, E., Schwinger, W., Hofer, T., Pröll, B., Feichtner, C.: Ubiquitous web application development-a framework for understanding. 6th World Multiconference on Systemics, Cybernetics and Informatics. pp. 431 438 (2002). 9. Ghosh, D.: DSLs in action. Manning, Greenwich, Conn. (2011). 10. Fowler, M.: Domain-specific languages. Addison-Wesley, Upper Saddle River, NJ (2011). 11. Chodorow, K., Dirolf, M.: MongoDB: the definitive guide. O Reilly, Beijing; Farnham (2010). 12. Leavitt, N.: Will NoSQL databases live up to their promise? Computer. 43, 12 14 (2010). 13. Fette, I., Melnikov, A.: The WebSocket Protocol, http://tools.ietf.org/html/draft-ietfhybi-thewebsocketprotocol-17. 14. Burnham, T.: Coffeescript: accelerated Javascript development. Pragmatic Bookshelf, Dallas, Tex. (2011). 15. Zach, C.: Jison, http://zaach.github.io/jison/. 16. Levine, J.R.: Flex & bison. O Reilly Media, Sebastopol, Calif. (2009). 17. Reas, C., Fry, B.: Processing: a programming handbook for visual designers and artists. MIT Press, Cambridge, Mass. (2007). 130 Copyright 2013 SERSC