View Full Version : Basics of Hessian

06-08-2011, 03:35 PM
I am just wanting to get a solid understanding of the value of using a Hessian server. I am not experienced network programmer, but having mainly developed standalone applications that use sockets for connection to "clients".

So far I understand Hessian is an application server. So It takes care of communication of remote procedure calls (across a network) handling the identification of methods to be called and the passing of arguments, and the returned results. Also that it uses a binary protocol.

Question: Is the following true? if you have an app that simply connects to some other app via TCP and transfers a lot of data via winsock or something similar, there certainly is no value to using a Hessian server.

As to its value over using something like tomcat or jboss, I see the following claims:

1) It is easier to use
2) The binary protocol is way smaller than other application servers that typically use SOAP, so it has smaller BW requirements. Won't the impact of that depend on what is being passed. In other words if you are passing large data payloads the lower protocol size would be less of an issue.
3) Again, because it is smaller, it footprint is more viable for small devices like cell phones etc.
3) Another claim I saw is that it compresses information before passing it so there is a BW savings there. I'm not sure if that is true or not.
4) Does it matter if your arguments and returned values are ascii or binary?

I'd be interested in any comments that help sort out my understandings.

Thank you,


06-08-2011, 05:13 PM
Hessian is a wire/serialization protocol, like SOAP or JSON. It's not an application server, but would be used in an application server (Resin or JBoss or Tomcat or PHP or .NET), although it can also be used outside of an application server.

Hessian is about sending programming objects from one computer to another. Sometimes the languages on both sides are the same, like Java. And sometimes the languages are different (like sending Java to .NET or to PHP.)

Although Hessian can be used as a framing protocol for blobs of data, that's not it's main use. The main use is sending objects (or procedure calls, which really are objects.)

2) The size efficiency depends on what you're sending.

If you're sending raw text, then Hessian would be the same as SOAP.

If you're sending lots of objects, big or small, Hessian is vastly more efficient than SOAP. (Because serializing objects to XML is horribly inefficient.)

If you're sending binary data, Hessian is more efficient than SOAP because XML is text. SOAP does have a number of hacks like attachments.

3) The implementation can be pretty compact, particularly compared to SOAP. SOAP is a bit of a monster, really.

5) The arguments are typically objects. Hessian treats binary and text equally, so both are equally efficient.

12-03-2011, 02:00 AM
What do you mean by Hessian is a platform neutral protocol.

For example if i am having a client which is in Java. Can i use Hessian to invoke a service built in .Net / any other language. How does Hessian support that ?

Hessian is a binary protocol right ? Just like Spring Http, so what is the actual difference between the two ?

I'm new to Hessian and Spring, so was wondering how it works

03-29-2012, 07:10 AM
Hessian's most rewarding feature, though, is the ability to pass full Java POJO object graphs from one process to another easily without the overhead of XML marshalling, an unfortunate side effect of SOAP web services. Also, Hessian is implemented in a variety of different languages, so you theoretically can execute efficient binary remoting between Java and Python or Java and C# as well.