Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 May 2012
Offline Last Active May 12 2012 07:15 AM

Topics I've Started

Logic for handle multiple clients in my TCP server written in java

05 May 2012 - 02:18 PM

hi Posted Image first of all, this is my first post!
second, i read the FAQ's, but my doubts are still there Posted Image

So I'm programming a server for a multiplayer game in Java, but I don't know the proper way to handle the client connections.

The game is like a tiny mmo inspired inspired by Transformice. For those who do not know, Transformice is a MMO flash and tcp based game. It has around 60.000 concurrent players / day average and I wonder how they handle this amount of connections. Right now, my server spawns a thread for every client connection and I read in the FAQ's this is not good but also I thought same before read it.

So basically the question is, how i manage my server to keep as many client connections as hardware / network is capable to (Without spawning a new thread for each client connection because i think this is not suitable for a mmo game).

As far as i know JVM can't handle that huge amount of threads, so this can't be the right way.

also I'm such a noob in networking. I started to learn it few months ago.
Someone gives me some light?