better design

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NagarajanS
    New Member
    • Dec 2006
    • 39

    #1

    better design

    Hi,
    l have created one servet-client chatting application.Tha t application works fine but now i want to simplify my application.Her e is the design what i have done,

    server<--->Clients

    Ehen ever a client connects, server creates a Separate thread and hold that Soket object until the client gets disconnected from server.

    This will work for some 10-20 clients.When the client size increases to 100-200 then server memory might affected because of this sepa thread.Now i want to eliminate that,How to do that?

    Regards,
    Nags
  • BigDaddyLH
    Recognized Expert Top Contributor
    • Dec 2007
    • 1216

    #2
    Originally posted by NagarajanS
    Hi,
    l have created one servet-client chatting application.Tha t application works fine but now i want to simplify my application.Her e is the design what i have done,

    server<--->Clients

    Ehen ever a client connects, server creates a Separate thread and hold that Soket object until the client gets disconnected from server.

    This will work for some 10-20 clients.When the client size increases to 100-200 then server memory might affected because of this sepa thread.Now i want to eliminate that,How to do that?

    Regards,
    Nags
    You can use the new input/output library (nio) that was introduced in 1.4:

    Comment

    Working...