• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is this a smart idea, or a dumb idea (or both)?  RSS feed

 
Anomander Rake
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently downloaded a free voice chat program consisting of an applet, a small server program that listens at a certain port, and a group of related classes, etc. all in a nice directory structure. I put the whole thing on my server, made a jar file for some of the stuff as instructed and it works fine. However, it is a very simple setup that blindly sends voice data to everyone who is logged in - it's all one big chatroom. However, I want to be able to let users log into and talk in several separate chatrooms. I have begun to go through the code to figure out what part is doing what, and how I might add such a feature That might take ahwhile, because I'm fairly new to Java - but in the meantime, I got an idea...

Since I don't expect to have more than a handful of separate groups (say, five) talking at any given time, why don't I just make five folders and put one copy of the whole voice chat program (including a jar file with the applet) in each folder. I'd set up each of the five server programs to listen at a different port, then write some PHP script to let users identify which rooms are available and retrieve the appropriate applet which talks to the appropriate server in the appropriate folder. Each room would then have its own mini server, etc.

What I am wondering is, would this sort of thing bog the machine down more than an approach where a single voice server handled all the chat rooms? Would it make much difference for a small number of rooms and people? Is it scalable - or will it cause probems veyond some number of rooms (again, vs. a single voice server and a handler to deal with serveral rooms)? Or is this just the way its usually done anyway? I'm going to try it to see what happens, but just wondering if any experts out there had an opinion.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's unlikely to make much difference at all, actually. If you had many dozens of chat rooms, then the overhead of process-switching could become significant; at that point you could potentially improve matters by moving everything into one process. But for the small installation you're talking about now, I don't really think it matters.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!