django - online game best-practice -
I am developing a Django-based MMO, and I wonder what is the best way for server-client communication Will happen . I found the solution:
- Periodic AJAX call
- To keep a connection alive and send data through it
After Edit in:
This will include "You have a message", "User attacked X", "Transport has arrived for your X" and so on The numbers can increase (such as 1 / sec), but for a specific user they should not go up to 1 minute
Benefit:
- The customer does not have to do Ajax
- Probably too much silly voting traffic is not.
Disadvantages:
- The server needs to have a more active connection open, and serve them for at least once time periods. In addition,
- Depending on how well the server code supports multi-threading (does PHP help out there?), This code for code to handle AJAX responses and Can be more difficult.
Comments
Post a Comment