Re: JPype

7 views
Skip to first unread message

William Stein

unread,
Jun 26, 2008, 6:10:29 PM6/26/08
to bret...@u.washington.edu, sage-f...@googlegroups.com, Yi Qiang
On Thu, Jun 26, 2008 at 3:04 PM, Brett Nakashima
<bret...@u.washington.edu> wrote:
> Someone told me that you had Jpype up and working already.

I did get it to do something for a quick demo. I didn't do anything special.
i didn't do anything beyond hello world.

> I'm trying to
> get it up on my computer but when I run their setup.py it doesn't seem to
> work when I just do 'sudo python setup.py' Could you tell me how you got it
> working. I'd post my errors, but I think I'm going about this completely
> wrong since there's tons of errors.

I did

sage -python setup.py install

I don't know if Jpype is any good. It seemed possibly flakie to me.
Flakie is very bad
for high-frequency trading. Another possible approach to this problem
would be to
create a java program that starts an xml-rpc server, and just write a
Python program to
talk to the xml-rpc server. That would avoid any runtime linking and
should easily be
fast enough for us (xml-rpc is pretty fast).

rpc = remote procedure call. There should be several tutorials about how to use
it on the web. Also, Yi knows how to use it pretty well.

-- William
>
> Thanks,
> Brett
>

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Glenn H Tarbox, PhD

unread,
Jun 26, 2008, 7:57:31 PM6/26/08
to sage-f...@googlegroups.com
On Thu, 2008-06-26 at 15:10 -0700, William Stein wrote:
> On Thu, Jun 26, 2008 at 3:04 PM, Brett Nakashima
> <bret...@u.washington.edu> wrote:
> > Someone told me that you had Jpype up and working already.
>
> I did get it to do something for a quick demo. I didn't do anything special.
> i didn't do anything beyond hello world.
>
> > I'm trying to
> > get it up on my computer but when I run their setup.py it doesn't seem to
> > work when I just do 'sudo python setup.py' Could you tell me how you got it
> > working. I'd post my errors, but I think I'm going about this completely
> > wrong since there's tons of errors.
>
> I did
>
> sage -python setup.py install
>
> I don't know if Jpype is any good. It seemed possibly flakie to me.
> Flakie is very bad
> for high-frequency trading. Another possible approach to this problem
> would be to
> create a java program that starts an xml-rpc server, and just write a
> Python program to
> talk to the xml-rpc server. That would avoid any runtime linking and
> should easily be
> fast enough for us (xml-rpc is pretty fast).
>
> rpc = remote procedure call. There should be several tutorials about how to use
> it on the web. Also, Yi knows how to use it pretty well.

I think this is a really good idea. Twisted has support for xml-rpc.
We can minimize the smarts on the java side. basically, the java
xml-rpc server comes up "listening". Twisted initiates the conversation
and we simply "implement" the java interface for incomming requests and
outgoing responses.

The outgoing responses to requests and outgoing associated with market
data are, essentially, the same. On the twisted side, a single expected
"result" will use a deferred (I'll write up an early example) whereas
market data will be a more conventional "request" without a response.
the java side code will be, basically, identical.

-glenn

>
> -- William
> >
> > Thanks,
> > Brett
> >
>
>
>
--

Glenn H. Tarbox, PhD || 206-494-0819 || gl...@tarbox.org
"Don't worry about people stealing your ideas. If your ideas are any
good you'll have to ram them down peoples throats" -- Howard Aiken

Reply all
Reply to author
Forward
0 new messages