views:

67

answers:

2

I would like my newer C# 2.0 application to talk to my older Java 1.4 application (can't change versions, sorry). What are my options?

I think that using shared memory would give me better performance, but on the other hand, if I use a network protocol then the architecture would be more flexible. So I'm looking to weigh up both options to see which has the biggest pay off.

I've used XML-RPC implementations that are dog slow, but I assume that was just a bad implementation, and not the actual protocol. Would I be better off going with a lower-level protocol? I've used Google's protobuf before in C++ and Python (over plain old sockets) but I'm not so sure that it's available for Java and C# -- is there anything similar available for the languages I'm using?

I'm looking for the best performance that I can possibly get, but, I'm working with objects and inheritance hierarchies that I'd like to serialize (protobuf is a good example of how this can be done). So, sadly, just sending a simple string over sockets isn't really feasible.

+1  A: 

Aha, there's actually C# versions of protobuf!

... and protobuf has support for Java anyway.

nbolton
+1  A: 

you might also consider JSON as serialization for your objects, much lighter than XML but same capabilities to represent object hierarchies and many libraries are available.

for the communication bus however, i would recommend network since it gives better flexibility.

IMHO,your performance bottleneck is due to serialization/deserialization more than communication bus itself.

dweeves
Yeah I think I agree -- however, the CPU did not spike when the data was transferred, so I can only assume that the serialization was so poor, that it did not utilise all available resources. Grr!
nbolton