[ome-devel] jvmlink
Curtis Rueden
ctrueden at wisc.edu
Thu Nov 17 16:36:24 GMT 2011
Hi Mario,
Ok. I have two main changes, that would make sense to include in your
> SVN without too much pain or potential downsides:
>
Both of these changes are great and make perfect sense, thanks! I created
an SVN account for you (credentials sent in a private mail).
I'm still very interested in a more elaborate library for RPC, but at
> the same time I like the fact that it is very lightweight. I will give
> ZeroC ICE a thought (or try), and let you know how it goes.
>
OK. The OME team has used ICE a lot, so feel free to write back to
ome-devel with your experiences.
I tried [GCJ] once, but failed, due to my lack of ANT-knowledge. Maybe I'll
> try again.
>
We tried it briefly with ImageJ, and were able to compile and run it,
though there were some crashes with the user interface. But for Bio-Formats
it may not be an issue. But it would take some time to explore.
Fortunately, you should not need to know about Ant—you can compile a .jar
file to a .so, for example, using gcc.
Great, thanks! Lets start with me updating the JVMLink, and go from there.
>
Sounds good. I'm glad JVMLink is useful to your project. :-)
Regards,
Curtis
On Thu, Nov 17, 2011 at 7:09 AM, Mario Emmenlauer <mario at emmenlauer.de>wrote:
>
> Hi Curtis,
>
> thanks for the nice email, and good to see you're well! Below more:
>
> > Good to hear from you! I am CCing the OME-devel list, since this
> > conversation may be of interest to others.
> >
> > I looked at your Jvmlink software, that makes an interface between C++
> and
> >> Java via sockets. I had to adapt the code for Unix (Linux, to be more
> >> precise). Are you still interested in maintaining this code? Are there
> >> newer
> >> versions than the one from LOCI SVN (in legacy subtree)?
> >>
> >
> > The short answer is: I am not interested in maintaining the JVMLink code.
> > And there is not a newer version that what you found in SVN. (But I would
> > be happy to give you commit access to the LOCI SVN repository, if you
> > would
> > like to commit your changes to the codebase!)
>
> Ok. I have two main changes, that would make sense to include in your
> SVN without too much pain or potential downsides:
> (1) I made all network transfers a lot faster by using the byte-writer
> in Java. I'm not a Java-pro, so my implementation might still be
> suboptimal. But at least it improves transfer speed from several
> kbyte / sec to several Mbyte / sec at no additional cost.
> (2) All code now works on Linux, with identical functionality as the
> Windows code previously had. This comes without modifying the
> Windows code (using ifdef _WIN32 where appropriate), so again there
> should be no downside of adding my changes.
>
> > The reason is: there are a plethora of ways to enable inter-process
> > communication between C++ and Java (as well as a slew of other
> languages):
> > ZeroC Ice (as I mentioned to you in Paris); Apache Thrift, Hessian, Etch,
> > zeromq, Gearman... it's a long list. JVMLink was written from scratch and
> > makes NO considerations for security, which is of central importance when
> > utilizing the network stack. All of the aforementioned tools provide a
> > mechanism to avoid globally exposing your application over the network,
> > unlike JVMLink. And all of them have had a lot more development time and
> > design work focusing on performance, usability, etc.—which we simply
> > cannot
> > match for an unfunded one-off project like JVMLink.
> >
> > What I want to do in the future is provide better cross-language
> > inter-process access to Bio-Formats. As I said in Paris, Bio-Formats Ice
> > bindings would be nice, if I had any time to work on them. But right now
> I
> > am too busy with ImageJ2.
>
> I'm still very interested in a more elaborate library for RPC, but at
> the same time I like the fact that it is very lightweight. I will give
> ZeroC ICE a thought (or try), and let you know how it goes.
>
>
> > Another vital area to explore is compiling Bio-Formats with GCJ so that
> > you
> > can use it as native code. GCJ has been around for 15+ years and gotten
> > quite good. Have you tried it?
>
> That sounds like a great idea. I tried it once, but failed, due to
> my lack of ANT-knowledge. Maybe I'll try again.
>
>
> > The good news is that even though I personally do not have time, the OME
> > team now has funding to pursue these things, and is currently hiring. So
> > hopefully we will finally see substantial progress in coming months.
> >
> > Again, I would be happy to grant you commit access to JVMLink so that you
> > can hack away, if you still decide to use it going forward. I just wanted
> > to fill you in on our perspective, and why we haven't developed it
> > further.
>
> Great, thanks! Lets start with me updating the JVMLink, and go from
> there. All the best from Basel,
>
> Mario
>
>
> > Regards,
> > Curtis
> >
> >
> > On Thu, Nov 10, 2011 at 6:12 AM, Mario Emmenlauer
> > <mario at emmenlauer.de>wrote:
> >
> >> Dear Curtis,
> >>
> >> I'm picking up on an old talk here, we had at the OME UGM 2010 in Paris.
> >> I looked at your Jvmlink software, that makes an interface between C++
> >> and
> >> Java via sockets. I had to adapt the code for Unix (Linux, to be more
> >> precise). Are you still interested in maintaining this code? Are there
> >> newer
> >> versions than the one from LOCI SVN (in legacy subtree)?
> >>
> >> Attached you can find a work-in-progress. Its your code, with some
> >> extensions for Unix. I have made some smaller changes in other places as
> >> well, for example const'ed some strings where possible. A main
> >> difference
> >> is to use a call to "write(byte[], ...)" in Java that writes the full
> >> byte[] array in one go (as opposed to byte-wise). This speeds up large
> >> transmissions thousandfold!
> >>
> >> If you like my code, please add it to your SVN for distribution. But
> >> beware, it is work in progress, and I checked it only on Linux. I did
> >> not
> >> check it on Windows (yet), I might have accidentally broken something.
> >>
> >> Anyways, all feedback from you is very welcome! Let me know if there are
> >> newer versions of your code, or if you know better libraries to fill
> >> this
> >> gap. Also let me know if you want to be informed about my changes at all
> >> :-)
> >>
> >> Cheers,
> >>
> >> Mario (from XuvTools / libBlitzBioFormats)
> >>
> >>
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20111117/363bcc78/attachment.html>
More information about the ome-devel
mailing list