views:

118

answers:

4

First, I know almost nothing about the interfacing of this type and this is the first time, I'm trying it out. I am looking to use one of the Statistics/Simulation software either Maple or Mathematica or R for calculations and use C#/Java to handle other areas like persistence and data collection and so on.

Can you tell me which one of these platforms (.Net/Java) is more friendly for this exercise in terms of:

  • Effort required to prepare the data to the format usable by statistics software
  • Performance in terms of memory requirement and time required for communication between two programs.

I understand that a single platform may not be good for all of them and one may be very good for say maple but too bad for R. What I'm looking for is a good combination.

And why I'm not fixed on one of Maple/Mathematica/R? Well, they all are available to me and what I'm trying to calculate is pretty much common and also available in all of them.

So it has come down to which one is easy for interfacing.

Cheers

+1  A: 

Look here for some good insights on which language you might want to use. Java is probably going to have the best support (though I do hate to say that)

Jeremy Petzold
+1  A: 

There are two issues.

  • Preparing data. Any language will usually do, but Perl is great for massaging text.
  • Interfacing. This is highly program dependent so it goes the other way. Can you only talk to it using IPC on Unix, well then C# is out, if you can only talk to it using COM under WIndows C# is probably better.

So, figure out what package you will use, and what it can do.

Thorbjørn Ravn Andersen
+1  A: 

I terms of the language, you are unlikely to see a real difference. Perhaps C# is nicer as its newer. However, Java had been around longer and has far more open source libraries. This means you are more likely to find a library which does X or Y to suit you in Java.

Here is a just a few of the open source Java libraries available. http://java-sources.org/1 Google can help you find many more libraries.

Peter Lawrey
+2  A: 

Effort required to prepare the data to the format usable by statistics software

This really doesn't outline the problem. If you are going to be doing some complicated parsing, the answer may be more around the available libraries. Without knowing anything, I would guess Java. If no special libraries are required, they are probably equal.

Performance in terms of memory requirement and time required for communication between two programs

Memory between the two is similar and is mostly going to be a factor of aspects of your application and libraries you use. For cpu performance, all other aspects equal, I usually find that the CLR has better raw performance than the JVM. However, be careful with that statement. Depending on what code and libraries you are using, you could get wildly different results.

One other consideration depending on the nature of your problem. If you find you have some intensive processing that could be offloaded into native code, you will find that it is much easier, and faster, to access native code from the CLR than from the JVM.

Jim Rush
I understand that having the actual software undecided made it difficult to correctly answer. So I first finalized on the package based on a comparison found here: http://www.scientificweb.com/ncrunch/ncrunch5.pdf (very thorough but not very current (2008)) So I selected Mathematica. Once that was done I found that almost everybody agrees that CLR is much better to call native code than Java. Also if I'm careful with what I write; I can get more out of CLR than Java. So it is "C#+Mathematica". Also used: http://stackoverflow.com/questions/1783564/
Elister