• 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

Which aproach is best ?

 
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am given an assignment on Socket Programming and the functionality is like below.
The communication happens between two machine infinite. Lets say Machine A and Machine B.
A sends message to B and B reads message and send back the acknowledgement to the A. and this happens infinite. One more rule is there. No of messages which A will send in 1 second is configurable.
Message length is also fix which A and B sends to each other.

Which approach is best for the above scenario keeping performance in mind. And After every second I need to display below statics on the console.

Max A-B communication Time
Max B-A communication Time
Max A-B-A Communication Time
Avg Time A-B in previous Second
Avg Time B-A in previous Second
Avg Time A-B-A in previous Second

 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You forgot to provide a list of "approaches" for us to choose from. Without that, my response would be that the best approach would be to write working code. This assignment isn't especially complex and there really aren't a whole lot of radically different ways to do it.
 
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic