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.
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?
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.
William Brogden wrote:"to do what?" why make the socket call to the brokerage service of course!
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.
I think your best bet is to write a UNIX type script to parse the output of the CVS command.
Rob Prime wrote:That's because the start should be (?<!'), without the >.
That still misses things like "name is null" or "name like '%name'" but that's because you're simply not looking for "is" or like.
In the end I think that regular expressions are not the way to solve this issue, because it will be hard to find a regular expression for all solutions. I tried "(?<!')(\\w+)(\\s*)(?==|is|like|in)" but that still failed for cases "name = ' name = '" and "name = 'name='" - because the second occurrences in fact match as well. Your real requirement is "replace any field" which can be translated roughly as "replace anything that is not a string literal or operator".