Not This Again

Java Fun with RMI

In my distributed systems class our first project (of four) is to write our own RMI utility for Java. We are allowed to use any Java classes in the normal libraries with the exception of anything in the java.rmi.* packages. Although to many people this assignment probably seems dull, I think it will be the most interesting Java assignment I've had yet. Namely, it will allow me to really explore the facilities for serialization and reflection in Java, which in my opinion are some of the most fascinating features of the language. I am amazed by the fact that such a well typed (although that fact is argued by some) language can still give programmers such control.

Yet another cool thing about this assignment is that it is encouraging me to learn more about the JVM and how it works. Although we are given the freedom to push many features of RMI onto the user (such as proxy stub creation in distribution), I plan on trying to automate the process as much as possible. As such, I've been reading up on how to dynamically compile and load classes. Unfortunately Java doesn't seem to have this ability included in any of the standard libraries (although in the past attempts have been made to include it), so it seems that I will need to invoke a Java compiler externally. Despite this, it is really cool that it is possible to create a class at runtime, compile it, and load it into a running JVM for execution.

I don't really know what I was trying to get at with this post. I guess I really just want to say that Java and RMI are cool, and everyone should take Distributed Systems.

PS: In other news, my roommate bought new ram for his laptop but he wasn't careful to make sure it would work with his laptop. Long story short, my laptop just gained a gig of ram, and it is very happy.


Comments
Post a Comment