A Real-Time Programming Battle Web Application by Using WebRTC

Ryoya Fukutani,Shusuke Okamoto,Shinji Sakamoto,Masaki Kohana
DOI: https://doi.org/10.1007/978-3-030-29029-0_73
2019-08-15
Abstract:We are developing a web system for learning Python programming. The multiple users can join the system simultaneously through programming battles. This system consists of two parts which are web browsers and a web server. The browser side program written in JavaScript uses an idea from Robocode, which is a open sourced programming learning tool. A user of Robocode plays a battle by writing robot programs in Java. On the other hand, the user of our system writes a program in Python, and the program is converted to a JavaScript of robot program. The conversion is done on the web sever as soon as the user changes his or her code in real-time. In our previous work, we used WebSocket to implement a client-server model that is one-on-one fight. However, since the CPU usage ratio of both browsers and server were high, it was difficult to increase the number of players. Therefore, in this implementation, we use WebRTC to build an application on communicating among browsers that supports more than two players efficiently. We will compare CPU usage ratio on WebSocket model over WebRTC model. Moreover, we will consider which method is suitable for our system.
What problem does this paper attempt to address?