tags:

views:

117

answers:

5

Pals,

I have a requirement to establish a communication channel between C++ and Java layer of my application for the exchange of objects and their properties.

I have got the following options:

  1. XML / SOAP
  2. Postgre SQL

Can you please advice me the Pros & Cons on these. Please share your experiences on the implementation complexities.

Thanks, Gtk

+1  A: 

If the option is between those I would choose XML

Object <=> XML

Java side Simple, C++ side XML Objects

Reason, its simpler for what you want, i.e. pass languaje objects and not Data Base

Ah, could you specify the comunication channel between the apps ?

Hernán Eche
+1 for sockets and XML!
SuperJames
A: 

Another option would be JMS. There are C++ clients out there.

Nick
A: 

Every time I see XML I think RESTful web service. Both platforms you mentioned have some form of tooling to marshal & unmarshal XML. There are plenty of working examples out in the wild, so a Google/Bing search is good. A nice side-effect is once you have those interfaces built, anything can connect to them.

If you really want to bother with generating a WSDL, then feel free to go the SOAP route. However, speaking with several years of web service integration experience, RESTful is so gosh darned simple compared to anything else.

T Reddy
I thought that SOAP was RESTful, or at least supported the concept?
aperkins
ack - ignore my previous comment. I was being an idiot, and thought REST meant something way more general than it really does.
aperkins
A: 

I would like to suggest a third option : YAML

You have parsing library in YAML for both java and C++. In my experience, it's easier to debug exchange in YAML that in XML (especially if you got full text field or cyclic data structure).

Guillaume Coté
A: 

I depends of the kind of message you transfer.

If your message are individual entity that have a short live, I would go for XML, YAML or something similar.

If your message contains information that is going to be used later on and refer to information in previous messages, I would use a database.

Guillaume Coté