views:

848

answers:

4

Hessian is a custom binary serialization protocol, (which is open-source - I think), that forms the basis for a binary cross platform remoting framework. I'd like to know if anyone here has used it, and if so, what sort of performance can we expect from a solution that bridges a Java app on one side with a C# app on the other. (Let us consider that we are serializing simple classes, and may be arrays, lists, dictionaries of simple classes.)

A: 

This is the sort of problem that web services were designed to solve. Although no longer simple, the SOAP format allows you to serialize objects to an XML representation on a Java/C# application, transmit them across the wire and deserialize them in the corresponding Java/C# application (Java/C# may be replaced with virtually any language that can translate an XML document). Although "serialize" is used here, it is also common for this process to be referred as "marshalling".

However, moving away from SOAP for web services is currently being considered by many. Find out more about web services from Wikipedia: http://en.wikipedia.org/wiki/Web_services

MetroidFan2002
+1 SOAP may be over-engineered, but we thankfully have other over-engineered pieces of software that can simplify its use. In .NET, calling a SOAP function is as simple as calling a normal function.
Frank Krueger
+1  A: 

Hi Krishna. Have you looked at the HessianC# project (http://www.hessiancsharp.org/)?

Matt Solnit
That is what we use. But my question was about performance.
Krishna
A: 

Admitting "Soap is over-engineered" and then praising an implementation that un-engineers/abstracts it is like me writing this entry in French, and then asking you to use Google Translate to read it, and then in English praising Google Translate.

Binary Protocols are the way of the future. If you are prepared to write "smart" code you will thank yourself when it performs exactly how it was programmed and developed to perform.

All it takes is one latent Soap service to bring your SOA architecture into an "exception" mode ... I call this the "exception" mode because companies with SOA's implemented in soap (READ: XML) implement exceptions around the SOA whenever they encounter a transactional type of data-interchange in which very large records may be read in succession.

*(I can just imagine the post SOAP implementation conversations being had)

So you have an SOA? :Yes we do Everything? :Well everything except our business critical transports...

Check out WSO2 webservices and their ESB while you are at it - you will thank yourself again if you do. There is a reason Mule, and then WSO2 provided support for HESSIAN. You might also want to read: http://java.sun.com/developer/technicalArticles/WebServices/fastWS/

Ben
+1  A: 

I am author of jni4net, open source intraprocess bridge between JVM and CLR. It's build on top of JNI and PInvoke. No C/C++ code needed and it should be relatively fast. I'm not sure if marshalling by reference across boundary would solve your problem.

Pavel Savara