I'd recommend some sort of ExecutorService rather than new threads for each client connection. You'd get the advantages of thread re-use and bounding the threadpool in run-away situations.
On Wed, Aug 25, 2010 at 5:45 AM, Ahmad Shahzad <ashahz...@gmail.com> wrote: > Hi All, > I want to replace the code in Server.java class of hadoop/ipc with > my own socket factory code. The point is that right now what i see in > server.java is that it uses NIO package and serversocketchannels to do work. > I wanted to ask that is it possible that i can convert this code into simple > multi-threaded client server model, in which the server creates a server > socket and waits for connections and it creates a separate thread for each > client connection it receives. If i can do this much than i will be able to > replace simple sockets with my own socket factory sockets. > > Are there any issues with that ??? > > > Regards, > Ahmad >