• Post Reply Bookmark Topic Watch Topic
  • New Topic

Chat program that sits on public server (2 Questions)

 
travis Haycock
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, Im moving into Streams, Sockets etc, and want to set up a chat server. I already have a server program that I'm running locally and its working fine along with the client program, fine being they can communicate effectively. I want to move the server side onto a actual server how would I go about doing this? I already have a hosting account where my websites sit, do I need a new domain etc?



Question (2) I will be adding to this program by allowing people to sign up by downloading the client side app and being prompted for create credentials and send this to the database. How do I incorporate these two things together ( server-side program & database ) this is where Im getting confused , thanks for your help in advance, I'm excited to be moving into this!
 
Paul Clapham
Sheriff
Posts: 21882
36
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
travis Haycock wrote:Hello, Im moving into Streams, Sockets etc, and want to set up a chat server. I already have a server program that I'm running locally and its working fine along with the client program, fine being they can communicate effectively. I want to move the server side onto a actual server how would I go about doing this? I already have a hosting account where my websites sit, do I need a new domain etc?


You'd have to talk to your existing hosting provider to see if what you have already allows you to run servers (other than the one serving your websites already).


Question (2) I will be adding to this program by allowing people to sign up by downloading the client side app and being prompted for create credentials and send this to the database. How do I incorporate these two things together ( server-side program & database ) this is where Im getting confused , thanks for your help in advance, I'm excited to be moving into this!


You can (and should) test this in the same place you're already testing. You're going to have to expand your existing communication protocol to include messages which say "Hi I'm new please sign me up" and "Hi it's me again here's my ID and password" and so on. Work on this by drawing pictures first. Does your existing protocol keep track of user IDs and send them out to clients to identify who is talking? If not then it should. (You do have a protocol which describes the types of messages sent between the server and client, and what sort of messages you expect in return, and so on, don't you?)

And you're going to be sending passwords over the Internet. So you'll need to use proper security. You can't be secure without using HTTPS for your web site, so you'd need to check with your hosting provider about getting a security certificate for your chat site. And you should never store passwords in your database in plain text. You should hash them before writing them into the database, and when somebody tells you "This is my password" you should hash what they give you and compare that to the hashed data in the database.

Don't take that brief paragraph as a tutorial, either. It's not even a summary of best practices in the area. You should search out much more complete information on the web.
 
travis Haycock
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul, appreciate the input and will keep it in mind.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!