This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
While writing one simple chat application i got one doubt . Suppose ,if i am chatting with single person ,i will establish socket connection with that client and send message to that client to particular port.Once i finsh chat i will close socket connection.
Now if i want to chat with more people say 100 people(just an example) at a time .then is it good to create 100 different socket connection?
Where as in database we normally use Connection pool,so i can reuse already created object.Do we have same think in socket connection?
I have a doubt because in database we are connection to one single databae ,so i can reuse already created one.But for doing chat i may have to connect to different IP address and port .
If number of clent increase socket connection also increases ..so i think there will be performance drawback in this application.Can any one of you tell me how to overcome this problem
Giving up is the easiest thing in the world to do..but holding it together when everything seems like falling apart is true strength!!
with regards, Harish.T