Fork me on GitHub

Friday, March 9, 2007

Tracking Back and Moving Forward

bunnie’s blog » Blog Archive » Scritch scritch–huh?
First, thought I'd start the day off with a trackback to some unfortunate us politics that I wish would be different. Just follow the link, read the resources and formulate your own opinion, it's pretty obvious what it says.

Also, I've just recently seen "An Inconvenient Truth" the Al Gore global warming educational film. I feel that the film is a well put together, documented and scientifically backed cry for unity the likes of which is complicated by the greedy nature of our political system and it's "campaign contributions" (That's my own personal opinion, not directly expressed in the movie). This film clearly and truthfully (look up the data) indicates the insanely critical point we're at as a species and as members (the primary unbalancing ones at that) of a planetary ecosystem. I strongly suggest you watch it because I can't do as good a job as they do at stressing how important this is. Turns out scientists have had to sue to have their names removed from the report because their claims were censored and did not want to be considered supporters of the modified message. Also, Al Gore has owned share in the carbon offsetting business for quite some time. Sorry for the hasty statements.

beyond all that, in the Software Engineering and Development side of my brain I have been planning and planning more of the development of my research project and along the way I have stumbled upon several really really neat ideas for projects I'm sure other people will be interested in too. I only wish I had the time to work on them as well, but it seems I barely have enough time to work on my own commitments. This can also be assumed as a plea for somebody... anybody, to be my hero and organize these projects into being; I'm totally game for participating in the engineering process and things of that nature but I do not have enough time to be considered a significant help on actual implementation/coding. These projects, in the long run, can also be easily adapted into my infrastructure to make a distributed pervasive system who's usefulness will extend well into the era of grid and mesh computing (provided, of course, it is maintained and the same coding concepts apply :p). Enough beckoning, to the projects!

Hah! Tricked yah (not really, but there's a little bit of background information first :p)

If you haven't checked out IKVM.Net you should. It's a Java Virtual Machine that can dynamically interpret (JIT compile) and statically compile Java bytecode to .NET CIL (supporting both Mono and Microsoft's .NET Framework). I see this project as a tremendously important idea because it would bridge the gap of the oh so similar next generation programming languages and environments currently separated by a great chasm only vaguely crossable using J#. I haven't taken the opportunity to check into support for JRuby, Groovy, JACL or Jython but I do know that it is currently aimed at support for Java 1.4. Honestly I feel this project would get some tremendous headway if it were taken seriously and contributed to by the Java/Sun and Microsoft communities. There are other projects like Phalanger that do similar managed interoperability support and I love it, but Java is the one we really need guys. There's no reason for us to constantly be reinventing the wheel on different languages and platforms when we can just bridge them together in an efficient manner and let everyone use the language that will benefit them most without making it so nobody outside their little inner circle can use it. Anyway, this rant went a little long :p, my ideas:

I feel that IKVM could use help in the following areas:
-Migration to a J2SE 5 model
-Support for bridging the existing Java/Sun written runtime instead of the GNU Classpath (this is more of a political venture) since IKVM supports JNI this should work relatively well; in retrospect another option is to bridge the awt packages and native control libraries to .NET GDI+ (System.Drawing/System.Drawing.Drawing2D) and System.Windows.Forms base classes (System.Windows.Forms.Control). Note: it seems like this is further along then i remember, which is great, but it's still incomplete.
-Support for App.config settings to support local classpath definition for applications that don't use IKVM directly.
-Attributes to apply to .NET code (ie [IKVMPackage("something.whatever")]Something.Whatever) that would allow IKVM to better translate .NET code to Java calls and to allow things like making Java stubs of classes written in .NET that don't use a cli.* package so as to be able to replace existing Java packages with native .NET ones easily. Perhaps this should include other things like the ability to rename classes and interfaces (to support different naming standards, ie: [IKVMName("SomeInterface")]public interface ISomeInterface.
--I believe that the generated property accessors should also be more like standard Java bean definitions (void setProperty(type value); type getProperty()) instead of the standard CIL set_Property and get_Property.
--MulticastDelegates (events) should function more like Java events;
Thus C# event System.AppDomain.ProcessExit is the static Java function cli.System.AppDomain.add_ProcessExit().

This should translate to
cli.System.AppDomain.addProcessExitHandler(
new ProcessExitHandler() {
void ProcessExit(Object sender, EventArgs e) { /*blah*/ }
});
or a derivative that doesn't use an anonymous inner class.

I think this would be great especially since, with full swing support and JDK 1.5 support alongside better .NET support we could fully write .NET applications using things like NetBeans IDE and even potentially add debug support, hell maybe even J2EE. The reason I consider IKVM one of the best solutions to this is that a complete implementation for interoperability requires direct communicatioon/translation between virtual machines, not just service oriented architecture (as great and important as it is). After running some simple computational tests you find that running Java code that has been statically compiled to CIL runs tremendously faster in the Microsoft.NET and Mono CLRs than it does in Sun's own JVM. Unfortunately the complications of translating from one object base to another wind up slowing some things down a little bit (Like IComparable to Comparable conversion) but still IKVM runs much faster than I could ever imagine .NET running in the JVM. This would allow Java developers to leverage and take advantage of .NET benefits without losing the cross-platform (Mono) and language specific features they love.

Other than IKVM, another great project/standard to look at is JSON which is gaining popularity. There is currently a project to support JSON-RPC for .NET called Jayrock that is pretty full featured, but I had a great idea that would be a truly impressive and usefull .NET implementation of JSON-RPC. A JSON Serialization Formatter and JSON-RPC based remoting channel would be a much more applicable approach that would make JSON totally usable with .NET applications without having to modify any code (assuming they use App.config based remoting configuration).

If anybody were to create these projects I would certainly be able to leverage the technologies in my research which I aim to be able to run services, consumers, and even desktop environments on everything from ARM mobile processors to x64 breeds simply by using a very simple base extensibility framework that is currently .NET specific but I would love to bridge support to Java with. I've even considered using db4o databases with both (if they're still language compatible) the Java and .NET libraries as a means of providing a standard consistent persistence model that requires arbitrary conversion for the storage of objects. I haven't done a full architecture review on this though, so I'm not sure what part IKVM will play in relation to db4o (ie, running Java db4o with IKVM for Java apps and running .NET db4o with native .NET or using .NET db4o for both with IKVM stubs for Java and saving Java db4o for native JVM implementations).

I'm also desperately interested in information on how well Mono runs when compiled against Linux 2.4 and 2.6 for ARM/MIPS/SH processors, including how well Mono's WinForms run on it and if there are any Mono based "Compact Framework" builds. If there aren't any Compact Framework builds it's not really that big of a problem, but a windowing toolkit for mobile devices would be much appreciated :p.

Anyway, those are my ideas/requests/plans 8) people should learn to reply sometimes, lol.

-TheXenocide

2 comments:

German Viscuso said...

Cool project you describe here. Java and .NET db4o databases are compatible. The only think to have in mind is that the fully qualified name for a class will be different in each environment. For that, db4o has the ability to map a fully qualified name to another.

Best regards,

German

TheXenocide said...

Awesome; thanks for the heads up; I knew there was something that could be done. I'll be posting back with some development on some of these ideas :p

-TheXenocide