William Brogden wrote:Since you say "web application" let me raise the question of multiple "simultaneous" requests.
If you have a single instance of the C program running, what will you do if additional requests come in?
If you let multiple requests access the C program, is the C api designed to handle this? Any instance variables that might get confused?
You might be better off writing your socket stuff in Java.
Bill
William Brogden wrote:"to do what?" why make the socket call to the brokerage service of course!
Bill
There is nothing C specific or Java specific about socket communication, just opening sockets and sending bytes according to the well documented APIs. The only thing to watch out for is byte-order.
You have apparently concluded that the API the C program is using to talk to the brokerage service is too complex to duplicate in java.
What interface does the C program present for RMI-IIOP or any other communication technique?
You will certainly be better off using the highest level API that is well documented.
Wonder why byte-order is important.
William Brogden wrote:
Wonder why byte-order is important.
here is a nice discussion of the significance of byte order.
How much of what kind of data does the C program take as input?
Ditto for what it puts out?
IF the C has to run as a separate program, hiding the details of this sort of inter-app communication is what SOAP and RPC was invented for. Maybe the brokerage has implemented a SOAP or RESTful interface like Amazon, Google and many others.
On the other hand, is there some reason you can't have the C code loaded as a library by Java and talk to it with Java Native Interface methods?
Bill
are these open source JMS cross programming language compatible or we better write our own socket communication code ?
William Brogden wrote:
are these open source JMS cross programming language compatible or we better write our own socket communication code ?
It is my understanding that JMS and MQ series are compatible since IBM was a big contributor during development of the API. In any case, I would certainly try JMS first.
Using messaging will also handle "simultaneous" query problems since presumably the utility you are trying to work with will only accept messages at a rate it can handle. Also of course you could have multiple clients using the same mechanism.
Bill
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |