Communication Model: C ++ and Java

Pals,

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

I have the following options:

  • XML / SOAP
  • Postgre sql

Could you advise me these pros and cons. Share your experience with implementation challenges.

Thank you gtk

+4
source share
5 answers

If the parameter is in between, I would choose XML

XML <=> Object

Java Simple Side, C ++ Side XML Objects

The reason is, it’s easier for what you want, that is, to transfer language objects, not a database

And, could you indicate the communication channel between the applications?

UPDATE

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

+1
source

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

0
source

Every time I see XML, I think the web service is RESTful. Both of the platforms you mentioned have some form of tools for marshaling and demonstrating XML. There are many working examples in the wild, so a Google / Bing search is good. A good side effect is that after you build these interfaces, anything can connect to them.

If you really want to worry about creating a WSDL, then feel free to go along the SOAP route. However, speaking with years of experience integrating web services, RESTful is so damned simple in comparison to anything else.

0
source

I would like to suggest a third option: YAML

You have a parsing library in YAML for java and C ++. In my experience, it’s easier to debug an exchange in YAML, which is in XML (especially if you get a full text field or a circular data structure).

0
source

Depending on the type of message you are sending.

If your message is a separate entity that has a short time, I would go for XML, YAML or something like that.

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

0
source

All Articles