• Post Reply Bookmark Topic Watch Topic
  • New Topic

Socket programming, Corba and RMI

 
Chris Ben
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
We used a program written with Corba for the communication between clients and server at a local network. However, we had some problems of message loss, which is very strange since Corba uses TCP/IP actually. I am now thinking to use socket programming by TCP/IP to replace the Corba program. But unfamiliar with Corba and RMI, I am not sure whether that is a right solution in a long run.
Could some experts please give me some advices about the pros and cons of Corba, RMI and bare socket programming?
Thanks a lot
Chris
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should know first that neither CORBA nor RMI provide a mechanism for guaranteed delivery over and above what TCP offers. I would look at the application well before I worried about the quality of the transport in most cases.
CORBA and RMI both provide a protocol layer above TCP. RMI relies on Java's Object Serialization, for example, so is intended for JVM-to-JVM only communication. CORBA uses an IDL (interface definition language) to de-couple the network communication from the underlying program. That is, with CORBA you should be able to connect applications written in any two supported languages and let them talk.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Chris Ben
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thank you for your reply. I am surprised that CORBA and RMI do not garantee the message delivery as TCP does. I have thought both of them are based on TCP/IP and garanteed delivery should not be a problem for them if the implementation on the protocols only stays at the application layer.
Does this non-reliability depend on the vendor? How about the CORBA stuff of jdk1.3? Does it garantee the message delivery if both client and server using java?
Really not knowing much about it, please forgive me if my quesions are naive.
BTW, your book is the only book I read for the certification exam. Thanks a lot.
Chris
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chris -
Maybe I gave the wrong impression: TCP guarantees packet delivery, THEREFORE so do RMI and CORBA. What I meant to suggest was that message loss would be more likely attributable to a) a buggy TCPIP driver or stack, or b) a flaw in the application. I was trying to say RMI/CORBA do *not* detract from TCP delivery; they in fact rely on it.
Thank you for your kind words about RHE. Always makes me smile to hear from someone who found it useful.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Chris Ben
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Michael, got one more question, what do you mean the buggy "TCP/IP driver or stack"? Do you mean the implementation of TCP/IP at the transport layer? I am simply using Jbuilder5 to develop my programs, which uses jdk1.3. Will there be any problems from the application layer?
Thanks a lot
Chris
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's always possible, if not probable, that the code used to implement TCP/IP on your system(s) might have a flaw that drops packets. It's rare, but not unheard of.
I would absolutely check whatever bug list might be available for JBuilder, just to be sure. Also, I'm not aware of any network fault issues for JDK 1.3, but again, a trip through the bug list can save you a lot of grief.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Chris Ben
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the clarification.
Have a good weekend
Chris
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!