By Frank Cohen Day 2 | Day 3 The Server Side Java Symposium opened today in Las Vegas, Nevada. Attendance is strong with a very large room full of eager software architects and developers, technology evaluators, and tools vendors. The conference has 50+ sessions over the next 3 days with a strong emphasis on projects to help Java developers build POJOs and services, build-in scalability and performance, test and validate their applications, and learn from each other the best practices and patterns.
The session composition this year seems to favor CTO's, inventors, and open-source principal maintainers leading the sessions. Past conferences highlighted trends and new patterns and were a little more removed from the actual projects that implement the patterns.
Mule 2 and Spring 2
Ross Mason, the CTO at MuleSource talked about the upcoming Mule 2.0 integration framework and messaging platform and how Mule 2.0 is influenced by and supports Spring 2.0. Mule may be compared to enterprise service bus (ESB) tools from commercial vendors like TIBCO, BEA, and IBM. Mule is open-source using a version of the Mozilla Public License. Mason reports a strong Mule community with 650,00 downloads, 1000 on the users list, 250 deployments, 4 million Web pages served, and 6 fortune 50 users.
The room was full of developers interested in Mule, most of them already use Spring. Mason directed the attendees to consider that while Spring provides a good development framework, that Mule provides a very good runtime environment. In both cases Java developers are working with Plain Old Java Objects (POJOs) that become services using Spring and are deployed to a service bus using Mule. Mason told attendees Mule is ideal for situations where a POJO-created service will be under heavy load, with lots of concurrent requests, shared POJO functions between multiple applications, and using mix-and-match synchronous, asynchronous, and request/response patterns. Mule supports 30 transports, including XA and local transaction support with Spring transactions. Mule offers "no code" protocol bridging and features orchestration, routing (split/aggregate) and events.
Spring 2.0 enables Mule to do namespace handlers (no need for class names, instead Mule defines properties in a schema and offers validation that properties are set correctly,) new orchestration like Java contract based messaging, and Aspect Oriented Programming (AOP) and OSGi hot deployment of services.
OSGi was new to most TSSJS attendees and so Mason provided an overview and talked about its influence on Mule. OSGi is Service Oriented framework to dynamically publish bundles of services. The OSGi service registry allows bundles to find and bind to other services. OSGi gives Mule hot deployment of services, endpoints, and transformers. Spring-OSGi uses the Spring container to configure modules (bundles). OSGi provides abstraction over different OSGi implementations, including Equinox, Felix, and Knopflerfish.
Mule 2.0 will also increase usability by finally adding a nice visualization that shows a map of how services are calling other services.
Mule streaming allows services to consume very large events in an efficient way, including payloads being streamed and simple routing rules are based on event meta-data in the header. Mule also combines streaming and non-streaming endpoints.
Other Mule 2.0 goodies include a configuration repository. Mason told attendees that some Mule customers have 30 Mule instances running and have plans to go to 10,000. In that environment the Mule properties mechanism does not work and so Mule will come with a management repository service.
Mason discussed enhancements to the Mule IDE, an Eclipse-based, project wizard with visual drag-and-drop features coming in Mule 2.0. Mason said they are in alpha today with an internal only release and they are looking to public beta real-soon-now.
Mason fielded a few questions:
  • "Are there plans for Mule mapping and SCA " From the Mule perspective SCA is a way to wire services together in a uniform way. Mason said SCA is a good fit for Mule and that there plans for Mule configuration will use the SCA configuration. Mule is talking with Tuscany project for an SCA implementation.
  • "Are there plans for Mule mapping to JBI?" Mason said Mule can be embedded in a JBI container but he was unsupportive of JBI. Mason said JBI solves the subset problems for integration application development while Mule solves problems at the messaging level. Mason told attendees in his opinion that JBI attempts to standardize a solution to integration solutions where in reality most enterprise customers have different and unique needs. Consequently Mule will not standardize and provide Mule as a JBI container.
  • "How is Mule different from TIBCO Business Works and other commercial tools?" Mason told attendees that commercial vendors provide an entire methodology and provide all the tools around it. The generated code is usually complex. Mule is more agile and lets you dive into the code easily.
Mason finished by telling the attendees that there will be no Mule 1.4 release, they are moving to 2.0 directly.
Hallway Conversations
I listened to a few developers talking about SOA and loose coupling. From their perspective loose coupling has come to mean something different from its original definition. When Web Services were new the idea of loose coupling meant "easy" coupling, where WSDL defined the interface and an easy-to-use tool made binding your application (consumer) to a service straight-forward and required little or no coding. Now that Web Services are in production and being changed from maintenance efforts, loose coupling today means the ability to make a change to the server without requiring recompilation and redeployment of the consumer. The servers are now dynamic and the consumer's static. Deployments that require changes in existing consumers are painful.
Testing with Selenium
Neal Ford of ThoughtWorks. ThoughtWorks.com gave a good presentation of the Selenium browser-based validation test suite. Selenium is one of many record-playback tests suites (Water, asahi, jrobot, TestGen4Web, TestMaker) and Ford said Selenium was the best for testing Ajax applications. Ford said jwebunit and httpunit can't support AJAX testing. Ford told attendees that Selenium provides access to everything in a Web page and includes functions to validate Web pages using element locators, patterns, actions, assessors (to store results in variables), and assertions (to validate results.)
Selenium is written in JavaScript so it has access to any object in the page through DOM and also it can execute JavaScript in a test and access the JavaScript loaded with the Web page. However, Ford told attendees that Selenium does not support JavaScript confirmations that are generated in a page using the onload() event handler and Selenium does not support Flex, Flash, or Acrobat interaction. Selenium is a DOM based solution that gives users a variety of methods to find things on a Web page. You locate things by id, name, identifier and dom/Javascript, xpath, and CSS selectors.
One attendee asked how Selenium could record the time it takes to respond to a request. Ford said Selenium users set time-outs for a request but Selenium is not in any way a performance test product. Ford pointed-out that time-outs are good for testing AJAX applications where response time from the server is important.
While Selenium has its roots at ThoughtWorks, a system integration company, Selenium is open-source under an Apache license and attracted a vibrant and energetic Selenium community according to Ford. For example, Ford notes a user in the community contributed Selenium's XPath capability to validate results.
Selnium Runtime is the play-back component of Selinium. It is a powerful multiple platform environment that enables users to test Web applications across platforms. For instance, a single runtime engine commands multiple test machines where one test machine runs Microsoft Internet Explorer 6 for Windows and a second test runs Firefox for Mac OS X.
Selenium uses a declarative language so there are no loops or conditionals. One asserts declarations to validate results of a request. Selenium users have their choice of language support (Java, .NET, Perl, Python and Ruby.)
Ford described many advanced record-playback situations that Selenium is particularly strong at, including recording a back-button and refresh-command, testing namespaces, and supporting Microsoft NTLM authentication. Selenium comes with the JSUnit testing framework integrated. It supports HTTPS, however, users must support the SSL certificate dialogue by defining actions to take when the dialogue appears.
Selenium was in beta for the past 2 years and the project expects to release a 1.0 release real-soon-now. Ford told attendees that Selenium used Chris Pederick's Toolbar project in Selenium. Ford said after 1.0 the project will focus on documentation for user defined drivers and in the distant future will include an SDL-like scripting language to supplement Selenium's HTML features.
State of AJAX
Dion Almeer and Ben Galbraith of Ajaxian gave an excellent overview of the state of Ajax development. They began with an overview of the three main Ajax architectures:
  • Return Data, for instance JSON and XML
  • Return HTML, for instance responseText and inner HTML
  • Return JavaScript, to evaluate live
Almeer and Galbraith described the current situation for Ajax as a victory of the pragmatists over the purists, and they conclude the purists want a rematch. They pointed to OASIS, WS-I, and other standards efforts to define asynchronous browser/server interactivity that have gone no-where. The session described a split in the Ajax world between people that see JavaScript as good or evil. In the end, it appears to Almeer and Galbraith that "JavaScript doesn't suck, after all."
Almeer and Galbraith described three popular Ajax development frameworks:
  • jMaki is a wrapper around popular client side Ajax frameworks. jMaki comes with PHP, JSF tags, and is part of Sun Web Developer Pack. The Pack strangely enough includes Phobos that Almeer and Galbraith describe as "Kind of a Ruby on Rails like application server with early access JSF extensions and WADL support.
  • Google Web Toolkit is an "all Java" approach to Ajax. Almeer and Galbraith told attendees that GWT's big advantage is "users avoid touching that nasty JavaScript stuff." This had a strong advantage when debugging Ajax applications since developers run their Ajax applications in a hosted mode for debugging in their normal Java debugger, not in the browser itself. That by-itself saves you from the Microsoft Script Debugger. Additional GWT is "totally cross browser, they take care of the pain." Almeer and Galbraith told attendees "GWT puts the HTML back in the Java, where it belongs." That got a laugh.
  • Direct Web Remoting (DWR) adds a servlet to your project, creates a DWR configuration file, and runs in your browser.
Almeer and Galbraith were particularly impressed with the many free Ajax development tools. They described Tibco General Interface (Tibco GI for short) as in the " I can't believe its free department." They said "Tibco GI has very advanced Web Service support, has the richest set of widgets we've seen, and is freely distributed under a BSD license." Almeer and Galbraith believe the early Ajax community was stand-off-ish because of Tibco roots as a commercial vendor. They both urged attendees "We really think people should look at Tibco GI."
Additional tools covered in the talk include InteliJ IDEA, NetBeans 5.5, Firebug for Firefox, and Safari Drosera
The session covered performance improvements using native threads and just-in-time compilers. For example, Almeer and Galbraith noted Flash 9 is 10x faster and they expect the same scale of speed improvement for running Ajax. They pointed to the Adobe contributions to the Mozilla project (Tamarin) and told attendees that Firefox 4 will ship with the JavaScript implementation that is in Flash. The result will be speed and interesting interoperability through a JavaScript/Flash bridge. For instance, an Ajax script running in the browser today does not use a JIT to improve performance. The new bridge lets Flash and JavaScript talk to each other's DOMs. So for speed you will be able to run JavaScript in Flash's JIT-enabled VM.
Almeer and Galbraith talked about the significant improvements in 2D graphic rendering using the Canvas tag in Firefox, Safari, and Opera. Google provides a bridge to do 2D in MS IE too. Almeer and Galbraith noted that Canvas is getting most of the attention over SVG.
Almeer and Galbraith finished the session by talking about their visions of the Ajax future, including server-less AJAX using Amazon provided storage, Amazon EC2 provided hosting, and local persistent storage. They see a list of things on the horizon, including:
  • Apollo as the Web+ Platform?
  • Off-line Ajax Abundant
  • Abundant custom rendering
  • Microformats?
  • Fast Javascript interpreters
  • "Wow" versus the Web, where desktop application frameworks, including Microsoft Web Presentation Framework, Apple, Sun Swing improvements, are on the move to compete with Ajax.
  • HTML 5
And now for some poker, and then sleep. More postings tomorrow from The Server Side Java Symposium.
-Frank