JAVA Sub project?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

JAVA Sub project?

David Wan
Quantlib is terrific!

But these days any library without a Java Version would be incomplete.
I heard that Berkley DB has a Java version now.

1. Operator overload may not be a big issue, firstly,  the client
programs that use the library may not need to deal with those formular
(those formular is embeded inside the library implementation),
secondly, in situations that client need to pass a formular, it can
have simple and clean interfaces, for example, can implement a class
"Formular" that flexible enough to handle any arithmatic operators (it
is trival to implement in Java).
=cal((new Formular ("a + a*b + c*d"), Object args)));
plus polymorphism, the code can be more clean than C++ code.

2. Performance is difficult to tell. it really depends on OS and C++
compiler. the optimized c++ compiler most likely will generate faster
result. Late binding overhead is not that big plus in situations you
can have "final" plus composition to archieve reuse and early binding.
 but it cannot beat inline of course.

3. Java has so many advantages over C++ ...

I saw there is posting to propose a Java sub-project. Cannot wait
seeing it happens and would like to contribute too. I like both C++
and Java, but Java deserves a space in quant world too :-)

David


Reply | Threaded
Open this post in threaded view
|

QuantLib, Java (C#), and SWIG

Ferdinando M. Ametrano-3
Hi all

David Wan wrote:
>[..]
>I saw there is posting to propose a Java sub-project. Cannot wait
>seeing it happens and would like to contribute too. I like both C++
>and Java, but Java deserves a space in quant world too :-)

Please forgive my ignorance, but why is everybody interested in porting
QuantLib to Java (C#), and nobody is considering just extending to Java
(C#) the SWIG wrappers already available for Python, Ruby, and Scheme?

Any tech or architectural reason? Just to write "100% Java"?

ciao -- Nando




Reply | Threaded
Open this post in threaded view
|

Re: QuantLib, Java (C#), and SWIG

David Wan
No matter what, JNI or pure, need a Java version :)

Never used SWIG before, cannot comment how good a job it can do. My
humble opinions about "JNI vs. Pure" are:

1. A JNI based Java program is not as realiable as a pure one: it has
much more chances to crash (JVM abnormal halt) than a pure one.
 
2. JNI may or may not be faster that a pure one;

3. JNI addes complexity for both development and deployment,
especially deployment. for example, a Java Swing based GUI that uses
"quantlib java version :)", if it is pure java, you can just put it on
your web site and use web start to let people to access it anywhere
using a browser with an internet connection. But for a JNI one, you
have to install the native library on the client's PC. If updating is
available, the client would have to install the library again. For
pure one, no need.

4. Not sure how much time porting using JNI (say SWIG) will save than
re-implementing in pure java

5. If Quantlib can be implemented using Java with same(similar)
interfaces and functionalities of the C++ version, there will be fun.
If someone benchmark the performance after it is done, it may become
the most popular IT article of the year.

David

   


On Fri, 01 Oct 2004 12:27:37 +0200, Ferdinando Ametrano
<[hidden email]> wrote:

> Hi all
>
> David Wan wrote:
> >[..]
> >I saw there is posting to propose a Java sub-project. Cannot wait
> >seeing it happens and would like to contribute too. I like both C++
> >and Java, but Java deserves a space in quant world too :-)
>
> Please forgive my ignorance, but why is everybody interested in porting
> QuantLib to Java (C#), and nobody is considering just extending to Java
> (C#) the SWIG wrappers already available for Python, Ruby, and Scheme?
>
> Any tech or architectural reason? Just to write "100% Java"?
>
> ciao -- Nando
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Re: QuantLib, Java (C#), and SWIG

Ferdinando M. Ametrano-3
Hi all

David Wan wrote:
>1. A JNI based Java program is not as realiable as a pure one: it has
>much more chances to crash (JVM abnormal halt) than a pure one.
>[...]
>5. If Quantlib can be implemented using Java with same(similar)
>interfaces and functionalities of the C++ version, there will be fun.
I agree

Jimmy Freese wrote:
>I'm not interestd in getting getting a thread of Java
>vs. C++, or Ford vs Chevy or Bush vs Kerry or even Bud
>Light vs Coors
nobody is interested in such a thread :)

>just wondering if some java developers
>are interested in a java quant lib, like David Wan is.
>
>I'm interested in helping on this one.
>
>Let's make it happen.

Go ahead! I was wondering about SWIG just out of curiosity, it wasn't
intended to be a "JVM abnormal halt"

ciao -- Nando