logo       

Talking Perl to Java and Back: msg#00093

programming.swig

Subject: Talking Perl to Java and Back

Hi, newbie to swig and the mailing list,

I looked around the archives, but without a search function I couldn't find
anyone else who asked this, so please
forgive me if this has been asked before.

I'd like to implement a java interface in perl, then call the java classes.

I'm working a stock trading platform written in Java. The vendor supplies
an API, so that one may write computerized trading systems that can place
orders, check stock prices...

If I were working in pure Java, I'd implement their API, then create an
instance of my
API, then call a method in another vendor supplied class passing it my
instance of the API. Their stuff then callbacks my API method perform
customer custom behavior.

Under the covers what happens it their stuff starts up another tread
listening on a socket, then as the trading system puts messages onto the
socket, this thread picks them up, reads the message, and dispatches the
appropriate customer supplied methods.

I'd like to do this in Perl. I've tried Inline::Java and Java.pm with no
luck. The problem seems to be a threading issue (the vendor stuff starts
another thread that can seem to communicate with my perl).

Questions:
1) can you use SWIG to talk between perl and Java?
2) Do you think the threading issues I've experience before, will exist in
under SWIG?
3) any tutorials/papers/examples of having Perl and Java communicate?

Thanks
Jay (also a Chicagoan)


_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise