views:

160

answers:

2

Hello,

A quick design question for the worth.

I need to share data between C++ client and Java server. The Client talks to the server using SOAP.

The issue is - I have a generic interface serving all kinds of requests on the Java backend. I don't want to "pollute" is with specific kind of request object which will most of the times remain null.

So I'm looking for a "creative" solution:

  1. DB - C++ client writes to temporary (in memory) DB table, passes the ObjectKey to Java. Java creates an object from the record. Table is cleaned up each hour.
  2. Shared Memory Cache - C++ saved object to cache, Java fetch the object.
  3. SOAP - C++ passed the object as part of the SOAP request.
  4. MORE - ???

This must be as efficient as possible solution. I would love to hear other alternatives that I don't know of.

Thank you, Maxim.

A: 

You could use a REST approach as an alternative to SOAP. It would cut down some of the SOAP overhead. However, I think writing directly to some memory cache sounds more efficient.

Magnus Skog
A: 

You can use shared memory as ramdisk and interchange via files. also on Unix You can use UNIX sockets which is good and FAST interface for shared memory

vitaly.v.ch
I don't think RAM / Sockets are possible because these are separate machines connected via a TCP/IP network.
Maxim Veksler
You run client and server on separate machines? - There are solutions for distributing shared memory. :)please describe hardware platforms more verbose
vitaly.v.ch