How expensive is SOAP?

During the session Architectural and Technical Challenges with SOAP at the OOP 2007 conference, someone asked me the question: "What is the overhead in your opinion in using SOAP over traditional RMI communication?" It is a hard question, because RMI comes with Java SE almost for free.
So I tried to be honest and answered: "about 30%". After my answer a developer from the audience answered the question again with his estimations: "not true, in out project we have about 70%-80% overhead". I became curious and asked him, why he uses SOAP then. The answer was funny: "Because of strategical  decisions". After the session we discussed this issue with the participants and it turned-out, that in most of the projects there is Java on both sides (client and server) - which is really funny, if not crazy. You have an java-object, then you serialize it over ascii, to get it again, on the other side :-).
So sometimes decoupling can be really expensive: to build, as well as to maintain.


Cloudy Jakarta EE and MicroProfile: Microservices, Clouds and Beyond Jakarta EE / MicroProfile airhacks workshops at MUC airport, Winter Edition

airhacks.fm the podcast:

Stay in touch: airhacks.news.

Comments:

I disagree. There are still some other arguments to think about even when all parties speak Java. In my previous project there were two J2EE based systems on both ends. Both using WebLogic 8.1. So we chose RMI (EJB calls) to implement the communication between the systems. The project was finished successfully and went into production. After that we realized where the problem is: one of the systems is developed and managed by us, another by our partner. And now we can't switch to WebLogic 9.2, we can't switch to Java 5, we can't even deploy new WLS service packs, because both systems must have the same Java version, the same WebLogic, as the EJB communication does not work if both end are different. And it is real problem to convience our partner to switch their application to Java 5. They do not want it. That's it.
One of the discussed solutions was to switch our system to JBoss 4/5 instead of switch to WebLogic 9.2 with the hope that there will be no library conflicts.

Posted by Sergiy on February 05, 2007 at 10:46 PM CET #

You forgot about one thing. Firwalls. RMI is not that friendly with them. Well, not as friendly as HTTP is at least. There are ways to make RMI more friendly why deal with that when you've got HTTP?

Posted by Watt on February 07, 2007 at 01:31 AM CET #

That's where Spring Remoting is handy allowing to migrate from RMI to SOAP, Hessian, or other remote protocols without so much as a config file edition.

Posted by ehsavoie on February 08, 2007 at 04:34 PM CET #

Watt,

you are right, but then just use REST or XML-RPC.
Using SOAP just for firewall violation is a little bit overengineering :-),

thank you for your comment,

adam

Posted by Adam Bien on February 09, 2007 at 09:55 AM CET #

Sergiy,

you are also right. You have to consider whether you have both parties under YOUR control. If not binary coupling can become a huge problem.

thank you for your comment!

Posted by Adam Bien on February 09, 2007 at 10:01 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
realworldpatterns.com
...the last 150 posts
...the last 10 comments
License