vendredi 4 septembre 2015

Django: global variables in multi-connections

I developed a django web-application and I tested it in local.. good news, it works!

Know I am trying to move forward. I want to make it reachable via public Internet.. Bad news, it won't work!

The client-side interact with server using Ajax and execute some python script and get some result to display in the web page.

The problem is that my application/server can't handle multiple connexions!!

I clarify:

Mainly, the problem is that when more than one client are served (2 for ex.), each one will ask the server to run a python script and, because there is a lot of global variables in the script, the two clients will modify them simultaneously and than bof!

Can multi-threading be a solution? How?

PS: It's clear, I am newbie to web :-). Thanks




Aucun commentaire:

Enregistrer un commentaire