How do I make a web interface for a socket server

Posted by mgroat on Stack Overflow See other posts from Stack Overflow or by mgroat
Published on 2010-03-23T01:00:33Z Indexed on 2010/03/23 1:11 UTC
Read the original article Hit count: 261

Filed under:
|

I've got a socket server running (it's something that's basically like a chat server). Users can telnet into it, but I'd like to make a web interface. This is the first time I've ever done something like this, so I'm not really sure where to start. A few thoughts I've had:

  • Have some server-side Python (or PHP) on my webserver, which accesses the socket server. I think I know enough about sockets to have Python interact with the server, but how do I go about getting the website that the user sees to update in real time? Should I just have the website refresh few seconds? I would prefer to do things this way if I can figure out how.
  • Write a Java applet that interacts with the socket server, and embed the applet in the website. I would have to re-learn a language that I haven't touched in years, but my main goal here is learning -- so that wouldn't be such a bad thing. The main problem I have with this is that it requires end users to have Java installed on their computers, which I'd rather not do.

Is one of these two solutions the right way to go? Anybody know where I can find a good tutorial to get started?

Edit: There's no real security concerns with exposing the server to the internet.

© Stack Overflow or respective owner

Related posts about sockets

Related posts about web-applications