i have a few questions about real time applications.
Comet vs Websockets, what is better? For example checking the online users, chat etc.
How does running any of these processes (comet server, websockets) affect normal server functions performance (Page load, php, operating with databases)?
How can i actually install websockets / comet to my hosted server and not just having it on localhost.
Im sorry if some of these questions are stupid, but im quite new to this, so i have to start somewhere :)
Once again, this is a question that is only answered by "it depends on what you're doing". Also, a simple SO and/or Google search will give you several results that I suggest you should read for a better in-depth view.
Both techniques will deliver data "real time", and both can be used to check online users, check etc. Also, Comet is an umbrella term and there are many "Comet Servers" that use WebSockets as the transport mechanism when possible. Comet servers don't just use AJAX, XHR Long-Polling, Forever-Frame etc. They now use WebSockets and fallback to other transport mechanisms where required.
Depending on what kind of back-end technique you're using, ASP.NET SignalR is pretty awesome too.