开发者

Communication model: C++ and Java

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 prope开发者_StackOverflow社区rties.

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


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 language objects and not Data Base

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

UPDATE

If you can use JSON I would recommend it instead of XML, here is why.


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


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.


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).


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜