6

I need to establish a communication model between C++ layer and Java layer in my application. Initially, I planned to use SOAP with XML, but my clients are interested in setting up a database communication channel.

I am new to DB and not sure how to proceed. I would like to take your sincere suggestions on the implementation of communication in terms of objects between C++ and Java layer using database.

Thanks, Geet

3 Answers3

6

Database as communication? shudder

http://en.wikipedia.org/wiki/Database-as-IPC

This is an anti-pattern. Can you change your clients' minds?

Sockets are easier than a full blown SOAP interface.

Starkey
  • 9,673
  • 6
  • 31
  • 51
2

If you have 2 different applications communicating, sockets is the way to go. If your C++ layer is more like a library, you could also use JNI (http://en.wikipedia.org/wiki/JNI, google for tutorials).

Cephalopod
  • 14,632
  • 7
  • 51
  • 70
1

The choice of communication channel and blocking model is largely application dependent but sockets will probably work best if you don't need to worry about security. SSL/Mutual auth is your next step up.

I rolled my own, but I would use google protocol buffers if I had to do it all again. http://code.google.com/p/protobuf/

They seem to capture much of what people wanted out of ASN1 (but not all messed up) and let you do what people often try to do with serializing java Properties.

Justin
  • 4,437
  • 6
  • 32
  • 52