git clone https://github.com/manjunath-satyamurthy/game-server-demo-Tic-tac-Toe-.git
cd game-server-demo-Tic-tac-Toe-/gameserver
virtualenv env
. env/bin/activate
pip install -r app/requirements.txt
python app/manage.py migrate
python app/manage.py createsuperuser
Follow the instructions to create user and repeat step 6 for multiple users
python app/manage.py runserver
step 7: Now open the url localhost:8000 in 2 different browser windows and login in with the different user account just created. Do not use 127.0.0.1 as there will be cross origin request issue.
The above picture describes the proposed architecture. Using django server as an http server, django-channels for websockets server, redis as a caching layer, celery for asynchronous tasks.
The above architecture can be modified a little bit to use token based authentication systems by additionally using DjangoRESTFramework(DRF). DRF integrates with Django and help developers create REST api's easily.
Additional Note: This project uses python 2.7. It is advised to use python 3+ and hence have to update Django to version 2.0 and use the latest channels package for websockets.
Please go through the documentations of the technologies used. Django, DjangoRESTFramework, Channels, Redispy, Celery.