0

I have web application settled on Apache server, and using php. I wish to put inside some kind of widget like "real time, multi-user application". I was looking around how to solve it and decided to use html5 (canvas). To make it multi-user and real time I was thinking about Websockets. I am not familiar with it at all, but I have read that generally it is possible to use Websockets over Apache but have no idea how to run it.

1)Can anyone help me to start with it? How to settle Websocket server(?) over Apache (I guess what I have written is a silly thing, but I hope I have explained what I mean)

2)Maybe there is another solution for my needs? Some different way (I hope simpler, not necessarily better) which will make my app real time and multi-user, than Websockets.

Thanks in advance for help.

santBart
  • 2,466
  • 9
  • 43
  • 66
  • Relevant: http://stackoverflow.com/questions/1530023/do-i-need-a-server-to-use-html5s-websockets – joar Jan 10 '12 at 13:19
  • Relevant: http://stackoverflow.com/questions/2924991/what-popular-webservers-have-support-for-html5-websocket – joar Jan 10 '12 at 13:20
  • ok i get it but how to connect them> I don't get idea of connecting those two things – santBart Jan 10 '12 at 13:27

2 Answers2

2

AFAIK Apache httpd doesn't support Websocket off the box so you would have to install additional third party module most likely. Here is one I found. I haven't tried it myself. Once it's done client side (JavaScript) should be identical across all implementations so you could follow any tutorial available on the net.

Websocket is cool thing, very fast, I'm using it on number of projects but from Java/Jetty. Keep in mind that not all browsers support Websocket yet by default and also Websocket traffic won't traverse all proxies so make sure you tested all that.

maximdim
  • 8,041
  • 3
  • 33
  • 48
1

1)Can anyone help me to start with it? How to settle Websocket server(?) over Apache (I guess what I have written is a silly thing, but I hope I have explained what I mean)

Have a look at:

2)Maybe there is another solution for my needs? Some different way (I hope simpler, not necessarily better) which will make my app real time and multi-user, than Websockets.

In my opinion the easiest way to add realtime functionality to a web app, and in particular a PHP application, where managing concurrent connections is a problem, is to use a realtime hosted service (such as Pusher who I work for).

  • No install
  • No maintanence
  • JavaScript client and PHP server library available and easily used
  • Scaling handled for you
  • Feature rich
Community
  • 1
  • 1
leggetter
  • 15,248
  • 1
  • 55
  • 61