• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help to implement this idea

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ,
i need to write class work as server ,which perform different methods for different clients .This server has its own thread , which is reponsible to perform methods for clients .The client will put the request to server then back to continue its work .I now that there are diferent ways to implement this idea like :
1.for each instance in the server side there are two threads one is reponsible to perform request and the other is responsible to accepts requests from clients and put in queue .
but i think creating thread for each request is expensive
OR
2.when client request method in the server side .This method will create new thread to handle client request .
but i think will not make client wait until resver accept its request .In anther word may be this way is faster in make clients back to continue its work .
OR
3.server side just has one thread and use vector to accept requests from clients where vector is care about synchronized .Therefore it will accept request one by one ,then after server perform each request back and take new requests from this vector
......etc
i don't know which way is the best in increase performance and in reduce synchronization problems , where server methods need to be synchronized .
pleeease can any body tell me what are the different ideas to implement server class and which is the best .
Thanks a lot
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic