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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Robocode. http://robocode.sourceforge.net/. Accessed 9 May 2019
Shichel, Y., Ziserman, E,. Sipper, M.: GP-Robocode: using genetic programming to evolve Robocode players. In: Proceedings of the 8th European Conference on Genetic Programming (EuroGP 2005), pp. 143–154 (2005). https://doi.org/10.1007/978-3-540-31989-4_13
LiveScript (JavaScript) implementation of Robocode. https://github.com/youchenlee/robocode-js/. Accessed 9 July 2018
Kohana, M., Okamoto, S.: A data sharing method using WebRTC for Web-based virtual world. In: Proceedings of the 6th International Conference on Emerging Internet, Data and Web Technologies (EIDWT 2018), pp. 880–888 (2018)
CodeComba. https://codecombat.com/. Accessed 9 May 2019
WebRTC. https://webrtc.org/. Accessed 9 May 2019
Web Worker. https://html.spec.whatwg.org/multipage/workers.html#worker. Accessed 23 July 2018
WebSocket. https://tools.ietf.org/html/rfc6455. Accessed 23 July 2018
Transcrypt. https://github.com/JdeH/Transcrypt. Accessed 16 May 2019
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Fukutani, R., Okamoto, S., Sakamoto, S., Kohana, M. (2020). A Real-Time Programming Battle Web Application by Using WebRTC. In: Barolli, L., Nishino, H., Enokido, T., Takizawa, M. (eds) Advances in Networked-based Information Systems. NBiS - 2019 2019. Advances in Intelligent Systems and Computing, vol 1036. Springer, Cham. https://doi.org/10.1007/978-3-030-29029-0_73
Download citation
DOI: https://doi.org/10.1007/978-3-030-29029-0_73
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-29028-3
Online ISBN: 978-3-030-29029-0
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)