• 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

What's merit and demerit of Socket Connection?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's merit and demerit of Socket Connection?
thanks
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can drop in an RMI connection fairly transparently, but with agonizingly little control. Implementing a socket connection gives you all the power but a lot more things that might go wrong.
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Advantages of sockets:
  • Can be more efficient and scalable than RMI (if good implemented).
  • You have control on how to handle concurrent clients; You can make it simple or complex as your requirements.
  • You don’t have to worry about extra work came with RMI, like registering RMI server, and working with firewalls.


  • Advantages of RMI
  • In Designing, RMI more close to Object oriented than sockets.
  • It is simpler in coding, and you don’t have to worry about thread pooling.



  • You have to choose RMI or a socket, depending on what is best for your project (from your point of view).

    For example being the socket more efficient may not be important since number of users connecting to system is very small.

    So it is not a matter of how many points you can find in favor or against socket, but what is more suitable for your project.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic