I am building an application for a sports club where in all players must use it to get announcements and to get latest news, reports etc.
So I thought about having a players online type system where other players can see what players are currently online so they can chat to them if they would like.
.net 4 Entity Framework 4 using MySQL 5 database backend with InnoDb tables for relationships
When a player logs in to the system, a flag (Online) gets set to true.
Currently I am using a timer to poll the database every 5-10 seconds to see what users are online (Online flag) to update a list on the application.
When a chat window is initiated between two players, it polls every 3 seconds
I do not have access to a dedicated windows box currently otherwise I would have gone with the TCP Client / Server type setup.
1) Is this good practice to poll a database table with such a short timescale?
2) Is there a better way to acheive this information regarding who is online / chat with just a database?
Any thoughts / suggestions appreciated
This post has been edited by batesy3k: 12 July 2011 - 05:57 AM