Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What's merit and demerit of Socket Connection?

 
Vince Cheung
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's merit and demerit of Socket Connection?
thanks
 
Barend Garvelink
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • 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.
 
Omar Kalaldeh
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • 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.
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic