Thứ Năm, 30 tháng 4, 2009

VisualVM: JRuby and the Ruby to JVM Spectrum

As I have worked with JRuby, it has been interesting to observe the intersection of the Java and Ruby communities. Because JRuby potentially combines with best of the JVM with the best of Ruby, it is perhaps not surprising that JRuby leads to a greater intersection of the Java community and the Ruby community. For example, because I have been working primarily in Java in recent months, I probably would not have been aware of the major controversy in the Ruby community surrounding a single presentation given recently at the Golden Gate Ruby Conference (GoGaRuCo).

Many Rubyists like to focus on the Ruby advantages that JRuby brings to Java, but there is no denying that JRuby also brings advantages of the JVM to Ruby. One particular area of interest here is the impact of the JVM on JRuby performance. In How JRuby makes Ruby Fast, Charles Nutter demonstrates how JRuby's performance improves as more JVM features (server mode, JIT compiling, and so forth) are employed. Some strict Ruby compliance must be sacrificed for some of the performance improvements, but this flexibility to selectively choose between the best features of Ruby and the JVM is one of the endearing features of JRuby.

As described in the JRubyWiki topic Performance Tuning, JRuby performance can be tweaked with JVM arguments and properties. Although these properties and JVM arguments can be set on the command-line, there are times you may want to know which ones are being used or what the default settings are. This is where VisualVM makes things really easy.

VisualVM is included with recent versions of Sun's implementation Java SE 6. It in many ways serves as a replacement for JConsole and a host of command-line tools provided with Sun's SDK. In his post Can Your Ruby Do This?, Ola Bini points out how JRuby is able to take advantage of the built-in JMX support in Java SE 6 for automatic detection, monitoring, and management. Similarly, VisualVM can be used to monitor JRuby processes by virtue of them running in the JVM.

To demonstrate this, I'll use VisualVM to monitor the running JIRB (JRuby's Interactive Ruby) tool. With jirb started on my local machine (it could also be accessed remotely, but local is slightly easier), I see the running process when I start Visual VM (jvisualvm at the command line) as shown in the next screen snapshot.



In this case, the only other Java process running on my local machine is VisualVM itself. This also provides evidence that JIRB does indeed run as a Java process (using class org.jruby.Main). When I click on the JRuby process, I can see the JVM arguments used in conjunction with running jirb as shown next.



Because I had downloaded and installed the JConsole-like MBeans plug-in for VisualVM earlier, the JMX-exposed MBeans for JIRB are available. These are shown in the next screen snapshot in the MBeans tab (this tab is not available in VisualVM until it is explicitly downloaded and installed using Tools-->Plugins).



As the last image indicates, the JRuby process exposes a long list of configuration items for viewing. This allows VisualVM, JConsole, or any other JMX-enabled client to see how the JRuby runtime is configured in that particular case.

JRuby brings together the Java world and the Ruby world both in technical aspects and in people/community/political aspects.

Thứ Tư, 29 tháng 4, 2009

jirb: Gentle Introduction to JRuby

If you haven't had the opportunity to work with Ruby or JRuby, the jirb tool provides an easy approach to playing with JRuby basic syntax and features.

In the article Accessorize Oracle Database with Ruby, I used screen shots of IRB (Interactive Ruby) to introduce Ruby for scripting. JIRB is the equivalent tool running on JRuby. In fact, in this blog post I will use the same examples in JIRB that I used in that OTN article with IRB to demonstrate Ruby on the JVM with JRuby.

In the OTN article (Figure 3), I demonstrated accessing Ruby predefined constants RUBY_PLATFORM, RUBY_VERSION, and RUBY_RELEASE_DATE in IRB. The next screen snapshot shows the same constants in JIRB along with an additional JRuby-specific constant JRUBY_VERSION.



The fact that the RUBY_PLATFORM constant is set to "java" provides a good clue about this actually being JRuby, but the existence of the JRUBY_VERSION constant (1.2) confirms that it is JRuby 1.2 being used.

I used the first figure (Figure 1) of the OTN Ruby article to demonstrate using Ruby mathematical operators in IRB. The next screen snapshot demonstrates the same mathematical operators in JIRB.



Figure 2 of the OTN article on Ruby demonstrated Ruby String functions in IRB. The next screen snapshot shows these same String functions in JIRB.



Finally, in the Figure 4 of the OTN article on Ruby, I demonstrated (as best as can be done in a static article) how clicking on tab twice brings up completion information in IRB. The same feature works in JIRB:



Besides demonstrating the tab-tab completion functionality of JIRB, this also demonstrates that even an integer (0) is an object in Ruby.


Getting Started with JRuby and JIRB

JRuby can be downloaded here. There are source and binary (jruby-bin-1.2.0.zip) downloads available. When the binary download is complete, it can be unzipped or opened into a directory of choice (such as C:\jruby-1.2.0 in my case. I like to set an environment variable JRUBY_HOME to point to this directory and then place %JRUBY_HOME%\bin on the Path. You can confirm correct setup by entering "jruby -v" on the console. If you see a JRuby version (such as 1.2) and a Ruby version (such as 1.8.6), the setup is correct. Running JIRB is as easy as typing "jirb" at the console prompt.

Thứ Ba, 28 tháng 4, 2009

The Software Development Do-Gooder

Throughout my career, I have either caused unnecessary problems by being a software development do-gooder or have suffered delays ranging from minor to significant because of other software development do-gooders. The word do-gooder is a noun that more formally applies to someone who promotes common good, but I am using here in the more informal sense of someone who means well and tries to do a "good" thing, but ends up not doing as well as he or she would like because of lack of experience, naivety, or failure to consider practical aspects of what he or she is trying to do.

In this post, I articulate my perspective on the nature of what I call a software development do-gooder. I then talk about how to minimize the negative effects of the software development do-gooder while maintaining the positive aspects.

At a high level, the classic software development do-gooder is a person who wants to do "good" things above and beyond his or her normal tasks to improve the overall product. Because the do-gooder implements these well-intentioned actions outside of his or her own regularly assigned tasks, they are often done hurriedly and almost as a side thought rather than being well-planned and thought out. Negative consequences most commonly follow a do-gooder's actions when the do-gooder failed to consider all ramifications of a change that seemed simpler and less involved than it really is.

Examples of Software Development Do-Gooder Actions

There are numerous examples of actions that fit the this idea of a software development do-gooder. A small set of these are listed next.

"Fixing" code that is not well understood. It is easy as a software development do-gooder to see some code that appears to be blatantly incorrect and decide to fix it. If it turns out the code was actually (surprisingly) correct, then the "fix" might actually break it. Even if this mistake is quickly realized, there is wasted effort.

Applying best practices and standards hurriedly to another developer's code. I am a strong believer in best practices as evidenced by my articles on JSP Best Practices, More JSP Best Practices, and Basic JPA Best Practices. These are best used with engineering judgment (knowing when it is most appropriate to apply them) and are best used throughout development. The problem I have seen in this case is when an "improvement" is being made to meet a standard or best practice and working code is broken in the process. There are many specific examples in this context such as cleaning up seemingly dead code that is actually being used somewhere, improving an API that is actually used somewhere not expected, starting to make code changes that ripple much deeper into the code than expected (typically because of too tightly coupled code), and so forth.

Blurring Personal Preferences with Real Value It is sometimes difficult to distinguish between do-gooder actions intended to truly improve software from actions simply intended to employ one's personal coding and stylistic preferences. While the negative consequences of a well-meaning do-gooder's changes are not particularly welcome, they are easier to take than negative effects of changes that are merely opinionated and stylistic. An example of this is changing names of variables to meet one's own preferences and then requiring others to spend extra effort merging code with those trivial changes. It is easier to think that the code is better because of the name changes, but is it really or is it just better in one person's opinion?


Why the Do-Gooder Runs into Problems

In general, the do-gooder negative consequences seem to come out when the developer means well, but actually causes more trouble than good because he or she made one of these classic mistakes: underestimated the effort required for the fix or new effort; lacked understanding of code, technology, or domain; failed to realize effects of change on all stakeholders; addressed an issue more rapidly than the task really required; or failed to communicate with developers who could explain why something was done the way it was or what other unforeseen effects a given change would have.


Reducing the Negative Impact of the Do-Gooder

A Do-Gooder often actually ends up doing good things as intended. However, when the do-gooder does mess up, it is nice to have approaches to undo the bad.

Use Configuration Management Because many of the most costly results of a well-intentioned, but ultimately flawed, action are in code or other documentation and are often easily identifiable, it is helpful to have a decent configuration management (CM) system that allows changes to be rolled back to the previous known and correct state. With CM tools almost as prevalent as programming languages, there are many reasonable alternatives from which to choose an appropriate CM solution.

Unit Tests and Regression Tests Perhaps the best way to know if a seemingly innocent "improvement" has not broken a working system is to have unit tests and regression tests that prove the code still works as desired. Compiler checking will catch some errors, but the really costly ones are the subtle runtime errors introduced by do-gooder's seemingly minor change. Unit tests and regression tests can improve one's chances of catching these before committing them.

Clear Code A configuration management system and unit and regression tests are good tools for determining that a particular change has not had a bad effect and undoing an improper change. A good preventive step to avoid making unnecessary changes in the first place is to have clear code. Clear code is more likely to not tempt the do-gooder to try to tweak it or "improve" it unnecessarily. Clean code that works properly does not offer a lot of incentive to the do-gooder looking to do good.

Comments on Unorthodox Code Many developers believe strongly in letting the code speak for itself and reducing comments. I have no objection to this as long as the code is actually clear and clean as described in the last item. However, there are times when circumstances out of our control may dictate less clear code than we'd normally like. In such cases, especially when things are done that seem counter intuitive to traditional software development practices, it is important to comment on why the unorthodox approach is being used. At the very least, the comments will help the do-gooder know what was intended and perhaps the do-gooder's improvement will still be a good idea. On the other hand, the do-gooder may realize from the comment that there is no "easy" or "quick" way to remedy the convoluted code and won't even try until he or she is prepared to spend the required effort on the task. Code like this should be refactored with serious thought and not in a fly-by do-gooder approach.

Communication

As with many problems, the negative consequences of a do-gooder action can be reduced with better communication. Face-to-face discussions, e-mail, instant messaging, and the telephone all provide a quick way to find out if a do-gooder's proposed change is free of negative consequences. The do-gooder can also communicate after a change is made to let others know what it is and why it was made. Furthermore, steps such as using Java @Deprecated annotation and Javadoc tag @deprecated to more slowly introduce and communicate a particular change (such as removal of seemingly dead code) can also be advantageous.

Consider Real Value and Cost

The do-gooder should also consider what the actual value of a particular change is and compare that to known and potentially unknown costs and negative consequences.



Conclusion

In general, the software do-gooder often does many useful and truly good things. However, when the do-gooder is not careful, he or she can cause more problems and more trouble than the benefits of his or her action are worth. We don't want people to stop trying to do extra and we don't want to document and describe every little thing in intricate detail. However, we also want to take preventive measures to prevent and minimize the inadvertent negative consequences of a do-gooder's actions.

The do-gooder can minimize the frequency and severity of negative consequences by reducing naivety via better communication, through spending more time understanding the problem and its effects, by using configuration management tools, and by building and using unit and regression tests.

Thứ Hai, 27 tháng 4, 2009

Groovy: JVM-based Scripting with Less Ceremony

My favorite use of Groovy is to write simple scripts that rely on Java classes or other features of the Java Virtual Machine (JVM) on which Groovy is running. The reduced ceremony approach of Groovy is particularly attractive in such situations.

To illustrate, I will show a couple examples of scripts that can be supported directly with Java classes, but with are much more concise and readable when written in Groovy. For each example, I'll first show the normal Java example followed by the Groovy equivalent. Along the way, I'll point out the Groovy features that make Groovy so script friendly.


Script Example #1: Use of InetAddress

There are several times when it is useful to know information about the network one is using as well as about individual hosts on that network. A particularly useful class in such situations is the java.net.InetAddress class. I have benefited from this class repeatedly when working with JMX on Linux. In particular, there is a known issue (occasionally) with Linux when a machine's loopback address is not configured to support localhost so that hostname -i produces an IP address other than 127.0.0.1.

Although there is an operating system command to look this information, there are some advantages to using a Java-based approach. First, when working with Java libraries and toolkits, it is often nice to use the same mechanisms they use in scripts to increase the likelihood of seeing similar results. Second, an operating system specific command does not, by its very nature, necessarily cross operating systems well. A Java-based script will generally run on any operating system for which a JVM is available.

I have blogged before about using InetAddress. My first regular Java example is based on the example provided in that blog post. Because there are some minor changes and for convenience, a slightly modified version of that example is shown here.


package dustin.examples;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
* This class demonstrates the InetAddress class.
*/
public class InetAddressDemonstrator
{
/**
* Run simple demonstration of the usefulness of the java.net.InetAddress
* class.
*
* @param aArgs The command line arguments; none expected.
*/
public static void main(final String[] aArgs)
{
InetAddress localhost = null;
try
{
localhost = InetAddress.getLocalHost();
System.out.println( "InetAddress: " + localhost );
System.out.println( "\ttoString: " + localhost.toString() );
System.out.println( "\tCanonicalHostName: "
+ localhost.getCanonicalHostName() );
System.out.println( "\tHost Name: " + localhost.getHostName() );
System.out.println( "\tHost Address: " + localhost.getHostAddress() );
System.out.println( "\tHost Bytes: " + localhost.getAddress() );
System.out.println( "\tHash Code: " + localhost.hashCode() );
}
catch (UnknownHostException unknownHostException) // checked exception
{
System.err.println( "Doh!! Unknown Host ("
+ unknownHostException.getClass().toString()
+ "): " + unknownHostException.getMessage() );
}
}
}


Besides the code itself that accesses InetAddress to provide information about the local host, additional code that is required for this example includes the two import statements, the class declaration code, the main function for the executable class, and the try-catch blocks for handling the checked exception java.net.UnknownHostException (different than java.rmi.UnknownHostException).

The output of running the above code looks like that shown in the next screen snapshot.



The relative "ceremony" code to actually desired executable code is even worse if only one call to an InetAddress instance is required. This is shown in the next code listing for a class that simply returns the localhost information without all the other details provided in the earlier code example.


package dustin.examples;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
* This class demonstrates the InetAddress class.
*/
public class InetAddressDemonstrator2
{
/**
* Run simple demonstration of the usefulness of the java.net.InetAddress
* class.
*
* @param aArgs The command line arguments; none expected.
*/
public static void main(final String[] aArgs)
{
try
{
System.out.println( "InetAddress: " + InetAddress.getLocalHost() );
}
catch (UnknownHostException unknownHostException) // checked exception
{
System.err.println( "Doh!! Unknown Host ("
+ unknownHostException.getClass().toString()
+ "): " + unknownHostException.getMessage() );
}
}
}


The output from this simplified Java code is shown in the next screen snapshot.



Even with only one call on InetAddress, there were still quite a few more lines of code required to use it. The same functionality is implemented in Groovy as shown in the next code listing.

getLocalHost.groovy


println "InetAddress: " + InetAddress.getLocalHost()


If you blinked while reading the above or started to wander a little, you probably missed the single line of Groovy code. That's the entire script. Assuming that Groovy has been installed correctly and that the system path includes the Groovy installation bin directory, all that is needed to run this script is groovy getLocalHost. The output is shown in the next screen snapshot.



This output shows that the results of running the Java code and the single line Groovy script are the same (not surprising given that Groovy really IS Java). The Groovy code is so short because no imports were required (Groovy does not require any class in a package starting with java to be imported), no checked exception had to be caught (Groovy does not force checking or handling of exceptions), and no class and main method declarations are required in Groovy. These base assumptions in Groovy significantly reduce the overhead associated with running this single statement. Even running the Groovy script happened to be slightly easier in this example because no classpath had to be specified for the Groovy script in this particular case.

If we wanted all the information to be displayed from a Groovy script that was shown in the very first Java code example, the Groovy script remains simple:

useInetAddress.groovy


localhost = InetAddress.getLocalHost()
println "InetAddress: " + localhost
println "\ttoString: " + localhost.toString()
println "\tCanonicalHostName: " + localhost.getCanonicalHostName()
println "\tHost Name: " + localhost.getHostName()
println "\tHost Address: " + localhost.getHostAddress()
println "\tHost Bytes: " + localhost.getAddress()
println "\tHash Code: " + localhost.hashCode()


The output of this Groovy script is the same as for the Java class as demonstrated in the next screen snapshot.



In this example, I included the .groovy extension on the name of the Groovy script file being run to make it a little different than the previous example.


Script Example #2: Readable Java Epoch Time

When working with Date and Calendar and other related contexts, it is common to store and pass around dates as longs representing the number of milliseconds since Java epoch. It can be handy to have scripts that allow for easier use of these long representations of a date/time. For example, it can be helpful to know what long corresponds to the current date/time and to convert a given long to its corresponding date/time in Java. This is especially helpful when reviewing logs or other code output that displays dates in this milliseconds since epoch form.

The next code listing is simple Java code for displaying the current time in terms of milliseconds since Java's epoch time.


package dustin.examples;

public class TimeNowInMillisecondsSinceEpochTime
{
/**
* Provide current time as milliseconds since Java epoch time.
*
* @param arguments Command-line arguments; none expected.
*/
public static void main(final String[] arguments)
{
System.out.println( "Milliseconds Since Java Epoch: "
+ System.currentTimeMillis());
}
}


The output from this sample Java code is shown next.



The Groovy code for the same functionality is even simpler and again fits into a single line:


println "Milliseconds Since Java Epoch: " + System.currentTimeMillis()


The output is the same as for Java (with some milliseconds passed since running that example):



There are numerous times when I need to know what a given long representing milliseconds since Java epoch time is in terms I better understand. A simple Java class that can convert milliseconds to human readable date/time is shown next.


package dustin.examples;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
import java.util.TimeZone;

/**
* This class converts the provided milliseconds (as sole command-line argument)
* to a Calendar. This class assumes a US/Denver/Mountain time zone and English
* locale.
*/
public class MillisecondsSinceEpochConverter
{
/**
* Main executable for this class. Expects a single command-line argument,
* which is assumed to be a Long that represents a time based on milliseconds
* since Java epoch time.
*
* @param arguments Command-line arguments: one expected, the long that
* represents the number of milliseconds since Java epoch for which the
* more human readable date/time String is desired.
*/
public static void main(final String[] arguments)
{
final Long millisecondsSinceEpoch = Long.valueOf(arguments[0]);
Calendar calendar =
Calendar.getInstance(TimeZone.getTimeZone("America/Denver"), Locale.US);
calendar.setTimeInMillis(millisecondsSinceEpoch);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println(
millisecondsSinceEpoch + " is "
+ dateFormat.format(calendar.getTime())
+ " (" + calendar.getTimeZone().getDisplayName() + ")");
}
}


Output from running the above Java code is shown next.



The Groovy equivalent to the above is now shown.

getDateTimeRepresentation.groovy


import java.text.SimpleDateFormat

final Long millisecondsSinceEpoch = Long.valueOf(args[0])
calendar = Calendar.getInstance(TimeZone.getTimeZone("America/Denver"), Locale.US)
calendar.setTimeInMillis(millisecondsSinceEpoch)
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
println millisecondsSinceEpoch + " is " + dateFormat.format(calendar.getTime()) + " (" + calendar.getTimeZone().getDisplayName() + ")"


The output from running the Groovy script is shown next.



In all of the Groovy examples so far, including this last one, I left off the static data typing to show off Groovy's duck typing. I did have to import one Java class in the last example, but I was able to remove the rest of the import statements. I also had to use the name "args" for the command-line arguments in Groovy because there was no explicit specification of how the command-line arguments would be accessed. Instead, Groovy implicitly provides the command-line arguments in an array of Strings called "args."

I also placed the entire last statement that outputs the results to standard output on a single line. If I had left the statement spanning multiple lines as it was in the Java version, I'd see an error message saying something like

Caught: org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: java.lang.String.positive() is applicable for argument types: () values: []


This same error is also shown in the next screen snapshot.



However, there is an even better way to output this final String to the standard output. Instead of using the overridden + operator to add Strings, I can take advantage of Groovy's GString support. The revised version of the Groovy script is shown next (only the last statement has changed).


import java.text.SimpleDateFormat

final Long millisecondsSinceEpoch = Long.valueOf(args[0])
calendar = Calendar.getInstance(TimeZone.getTimeZone("America/Denver"), Locale.US)
calendar.setTimeInMillis(millisecondsSinceEpoch)
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
println "${millisecondsSinceEpoch} is ${dateFormat.format(calendar.getTime())} (${calendar.getTimeZone().getDisplayName()})"


There is one more Groovy feature to demonstrate in this example. The last statement is still on one line. Groovy supports multiline Strings. These are specified by enclosing the multi-line Strings between three double quotes markers and by using backslashes at the end of each code line that should NOT be a newline in the String. The final revision of this long-to-readable Date/Time representation script is shown next.


import java.text.SimpleDateFormat

final Long millisecondsSinceEpoch = Long.valueOf(args[0])
calendar = Calendar.getInstance(TimeZone.getTimeZone("America/Denver"), Locale.US)
calendar.setTimeInMillis(millisecondsSinceEpoch)
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
println """${millisecondsSinceEpoch} is ${dateFormat.format(calendar.getTime())} \
(${calendar.getTimeZone().getDisplayName()})"""


The output for all three versions of this Groovy script are exactly the same.


Script Example #3: System Properties

I often want to know which Java System properties are defined for my environment. The following Java code will provide this information.


package dustin.examples;

import java.util.Enumeration;
import java.util.Properties;

/**
* Class that accesses the System properties.
*/
public class SystemPropertiesAccessor
{
public static void main(final String[] arguments)
{
Properties systemProperties = System.getProperties();
Enumeration propertyKeys = systemProperties.keys();
while (propertyKeys.hasMoreElements())
{
String key = (String) propertyKeys.nextElement();
String value = (String) systemProperties.get(key);
System.out.println(key + "=" + value);
}
}
}


I will not show the output here, but it consists of name/value pairs for the system properties with an equals sign separating the name and value. The equivalent Groovy code is shown next.

systemProperties.groovy


theSystemProperties = System.getProperties();
propertyKeys = theSystemProperties.keys();
while (propertyKeys.hasMoreElements())
{
key = propertyKeys.nextElement();
value = theSystemProperties.get(key);
println "${key}=${value}"
}


The Groovy version loses the casts to String along with no more need for static data typing and the removal of import statements. The output statement uses the same ${} syntax we looked at in the last Groovy example.

Another interesting observation can be made from this last Groovy example. Because I named the Groovy script file systemProperties.groovy, I was not able to name my variable the same thing (it was named systemProperties in the Java code). The name conflict is evident in the associated error message.




Conclusion

Groovy allows Java developers to write tight, concise scripts that combine the advantages of scripting languages with the advantage of access to the large set of Java classes and libraries. Groovy allows the script writer to adapt a Java class minimally or to move more fully to Groovy-specific syntax as feels appropriate for the given situation.

Chủ Nhật, 26 tháng 4, 2009

Colorado Software Summit 2009 Preliminary Agenda Posted

The Preliminary Agenda for Colorado Software Summit 2009 has been posted. I am excited to announce that I will be speaking for my second time at this fabulous software development conference. My topics are "Applied JRuby" and "RESTful Java."

I'm also excited to preview the abstracts of some of the other presentations that I definitely plan to attend during this conference. These include Scala - The Java Path to Functional Programming, Advanced Relational Persistence, JSR 223 - The Java Scripting Engine, A Cornucopia of JVM Languages on the Google App Engine, con(Currency) in the Java World, at least one of the Cloud Computing presentations, and, of course, the always insightful keynote presentations. It also sounds like more presentations will be added to the agenda in the near future.

It is going to be a lot of work preparing these two presentations and then giving each of the 90-minute presentations three times each during the week, but I am really looking forward to another outstanding week at the Colorado Software Summit in gorgeous Keystone, Colorado.

CSS 2008 Linux Presentations Released

Three Linux-related presentations from Colorado Software Summit 2008 have been made available on the Colorado Software Summit site. Two of the presentations are from Thomas Cameron and are called "Automating Your Linux Infrastructure" and "SELinux for Mere Mortals (or, 'Don't Turn It Off!')." The third Linux-related presentation from CSS 2008 that was just posted is Noel Bergman's "Laptop Linux: Arrive Dependent on MS-Windows, Leave Living with Linux." Noel's other presentation, which is also available now, is called "Business Processes: Big Business' Secret Weapon Is Now Available to Everyone!" and covers WS-BPEL.

The three Linux-related presentations can be downloaded from the 2008 Agenda by Speaker Name.

Thứ Bảy, 25 tháng 4, 2009

The Truth is Out There: Is It At JavaOne and Oracle OpenWorld?

There is no shortage of articles covering the news of Oracle's intent to buy Sun and Sun's agreement to be purchased by Oracle. This level of coverage is justifiable given the potential magnitude of this on development using Java and on many other areas of the information systems and computer science fields. Many of us were not surprised, but now that it has actually happened, there are many questions. The answers to some of these questions may be full of surprises.

It seems that 2009 JavaOne (June 2-5, 2009) and Oracle OpenWorld 2009 (October 11-15, 2009) will likely provide answers to many of our questions and perhaps even prompt a few new questions and even start or strengthen some conspiracy theories. [By the way, I'm especially looking forward to the hallway chat and Q&A session at Colorado Software Summit 2009 (October 25-30, 2009) regarding the latest developments.]

A very recent Java.net poll asked the question, "Which of the technologies highlighted at JavaOne 2009 is of greatest importance for the future of Java?" It is interesting to note that as of this writing (and with this poll question no longer featured on Java.net as the current poll question), there have been only 310 votes so far. I am probably reading more into the responses than I should and the relatively low number of votes could simply imply that the poll question was not significantly interesting or controversial to a large number of developers. Having said that, I wonder if at least part of the low response is due to developers more interested in the overall future of Java than of any one particular aspect of it.

My guess (and that's all it is) is that JavaFX will not reign as the main attraction for a third year running, but that talk of the effects and impact of Oracle buying Sun will dominate JavaOne regardless of the organized presentations and activities. Similarly, but to a lesser degree, the same Oracle/Sun transaction will be a major topic at Oracle OpenWorld. Because Oracle OpenWorld includes many presentations, activities, and attendees with no or very little direct interest in Java, there may be more "other things" to talk about.

Some of the questions that people will be talking about and looking for answers to at these two major conferences are:

* Is 2009 JavaOne the last JavaOne? With Oracle's OpenWorld being a huge event in its own right, will Oracle have interest in maintaining a separate and very large conference? What will JavaOne be like in the future under Oracle if the conference continues?

* Will Oracle support JavaFX with the same passion and resources that Sun did?

* Will Oracle support GlassFish and NetBeans with the same passion and resources that Sun did?

* Will Oracle support MySQL with the same passion and resources that Sun did or is this another conspiracy theory with potential?

* Will Oracle support JRuby and other largely Sun-sponsored community projects with the same passion and resources that Sun did?

* What effect will this have on the Java Community Process (JCP)?

* How will the life of the Java developer change?


Two television series that I have enjoyed remind me of how many of us feel now as we contemplate Oracle's purchase of Sun. Both The X Files (1993-2002) and Lost (2004-present) had/have a way of answering one or two questions now and then while at the same time opening up several times that number of new questions. Although this was/is extremely frustrating at times, I kept/keep watching in a desperate hope to get some answers. In fact, based on my own behavior and the popularity of these series, it seems that we may even like the questions and the speculations that ensue. It will be interesting to see if 2009 JavaOne and Oracle OpenWorld 2009 actually satisfy most of our questions or if, like The X Files and Lost, they answer a few questions while opening up many more. Perhaps we enjoy this ability to speculate in Java-dom as much as we do about our favorite television shows.

Finally, if Oracle is thinking about combining "JavaOne" with "Oracle OpenWorld", a natural blend would be "Oracle JavaWorld", but the "JavaWorld" trademark is already taken. So, if the conferences are combined in the future, what will the new conference's name be?