HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML
 

The buzz at JavaOne 2000, in my opinion, was definitely the solidification of Java in the wireless market. As radio host for SYS-CON Radio at JavaOne, I had the pleasure of interviewing CEOs and CTOs of leading application server vendors. Many of them focused, not on J2EE support, but on how their products are providing wireless solutions.

Wireless access to EJBs is becoming a reality due to support for WML in numerous application servers. BEA's WebLogic Server and Lutris's Enhydra are two of the players already shifting attention to wireless enhancements to their products, building on the core J2EE services that offer reliability, scalability and transaction support to wireless business solutions.

This month in EJB Home I'll cover some basic concepts of wireless development and describe why I think using a WAP-enabled application server over the J2EE platform is a winning hand.

Wireless Application Development
What is WAP? Good question. Let's discuss wireless concepts and common terminology, then apply it to J2EE application servers to understand the importance of EJB and the rest of the J2EE APIs in wireless development.

WAP - Wireless Application Protocol - is a set of protocols designed to allow the development of Web-based applications for mobile devices such as phones and handheld computers. WAP was developed by a group of industry giants including Motorola, Ericsson and Nokia in a fashion similar to the way Sun requests representatives from industry leaders to help develop new Java specifications. The WAP Forum, as they're called, developed WAP to address numerous limitations in the mobile applications. For instance, mobile devices have limited CPU and memory compared to a standard desktop computer. WAP is designed to overcome these limitations. Likewise, the reliability of communications for mobile devices is unpredictable at best, while limited bandwidth generally causes network latency. These constraints to successful wireless solutions are also the focus of the WAP Forum.

Two elements that resulted from the WAP Forum are an application protocol for wireless communication and a browser-based application environment called WAE (Wireless Application Environment). Together they provide the capability to program wireless solutions for most mobile devices.

Wireless Application Environment
WAE provides two components that enable the development of wireless applications that are network-neutral and communicate with narrow-band devices: Wireless Markup Language (WML) and WMLScript (WMLS).

WML is similar to HTML, which is passed between a browser and a Web server via the HTTP protocol. It's an XML-based language, specifically designed to provide a presentation layer in mobile devices with microbrowsers. If you think HTML clients are basic, wait till you work with (or develop) a microbrowser UI!

The WAP Forum developed a specification that defined the tags and format of a well-formed WML document. A WML document comprises one-to-many cards that in turn are contained in a deck when they're logically grouped together to perform a business function. Cards are the lowest form of UI presentation in a microbrowser. They generally map just enough information to display on one screen in a mobile device. That said, more steps are generally involved in a wireless business transaction than in traditional Web browser applications. More steps alone tend to signify less reliability for wireless solutions. The need for solid business logic and transaction control in your application server becomes even more evident with wireless application development.

WMLScript, the other enabling element of WAE, provides general scripting capabilities to overcome the narrow-band communication limitations between mobile clients. Together, these elements are vital pieces in a wireless solution to minimize the load on narrow-band devices. For instance, a WAP Forum study comparing the same application based on an HTTP protocol and the WAP protocol found less than half the number of packets are required for WAP as for HTTP.

Let's look at the mechanism for encoding and decoding WML between mobile devices and an application server.

WAP Gateways
WAP Gateways are products that provide an implementation of the end-to-end communications for WAP. A WAP Gateway connects clients on a mobile network with J2EE application servers that have been configured to talk with the WAP Gateway. WAP Gateway interoperability is the latest and greatest feature that J2EE application servers are offering to make business services built on J2EE APIs accessible to mobile devices. WAP Gateways act as bridges between mobile clients requesting business services and the application servers housing the logic and data. Figure 1 shows this relationship in more detail.

Figure 1
Figure 1:

J2EE Vendors Gone Wireless?
Wireless support has just begun in J2EE application servers. Perhaps it seems late in the game, considering the WAP Forum has been around since 1997. In any event, I see vendors providing support for standards based on market demand and technological feasibility. Basically, the Java market demanded J2EE support; thus vendors put the inclusion of J2EE APIs at the top of their list. EJB, the focal point of the J2EE platform, has been available since 1998, and Java industry giants from IBM, BEA Systems and Oracle on down have enthusiastically adopted its APIs (although some still hold out on J2EE licensing issues with Sun). These same companies are joining the WAP Forum in the golden age of wireless. Their servers are including wireless support on top of solid J2EE underpinnings.

WAP, a relatively new standard, is increasing in popularity not only as a result of market demand, but also because it's maturing into the de facto standard for wireless communications. Application server vendors can now rest easy, knowing their product costs to support WML won't go to waste but will remain standard for years to come. The fear of writing an outdated product line is much higher when you don't build it on industry-supported standards. It's hard to justify the resources and time for an effort until there's enough momentum for the technology to provide an enduring market.

Advances in wireless technology are affecting the proliferation of the wireless applications market. Mobile devices are packing more memory and processing power these days. Also, the bandwidth for communications is increasing enough to support shuttling more and more complex data into mobile devices. WML supports tags for graphics and icons that can be downloaded into microbrowsers, a huge step in bandwidth capabilities.

J2EE: The Underpinnings of Scalable, Reliable Wireless Solutions
As indicated earlier, EJB is a more mature standard than the wireless standards emerging on the market. Since EJB is now inherent in most app servers, and J2EE is a stable platform for building mission-critical applications, it's an easy transition to build wireless capabilities into application servers to take advantage of existing and new business logic built with EJBs.

Core business logic is being built with EJB and the J2EE platform today. Companies are taking advantage of a platform that is open, standards based and powerful with respect to scalability and transaction processing. These key features are exactly what wireless applications need to provide users with an enjoyable experience. Let's take a closer look at two J2EE features: session and transaction management, and scalability, to understand why J2EE application servers play an important part in a winning hand called wireless application solutions.

Session and Transaction Management
"I pick my first two cards dealt by the man in the cheap tuxedo and see the Ten of Hearts and the Jack of the same suit"

Because wireless environments tend to have less connection stability and less predictable availability of service, development of wireless applications must take these constraints into account. Reliability of session data and transactions is a strong suit of the J2EE platform and an added benefit to wireless applications built on a J2EE app server.

J2EE, centered on EJB, provides the transaction management that wireless applications need, especially when their communications are even less reliable than an HTTP session between browser requests. Applications looking to take advantage of EJB's session and transaction management features might build their business process layer with stateful session beans. Then, when a wireless device drops its connection, a transactional, stateful session bean allows the device to regain its transaction where it left off and continue processing as soon as it connects again.

There are many ways to use the session management features of EJB for wireless applications. The beauty of developing business logic with EJBs is that this logic can be reused for other front ends. In the example I described earlier, you can use a stateful session that manages a complex process that may span across multiple WML decks in order to allow the user of a mobile device to participate in a long-running business transaction. However, the business process modeled by the stateful session bean shouldn't be based on the user interface you're trying to support. Instead, it should reflect your business, and it should be just as easy to paste a JSP or servlet-driven UI onto the front of the session bean's logic and data as it is to develop a WML-based interface (see Figure 2).

Figure 2
Figure 2:

Scalability
"My third card is the Queen of Hearts. Card number four the King! And last but not least, I hold the Ace of Hearts in my hand - an unbeatable royal flush."

The following quote caught me by surprise last year. What's your reaction? "According to The Strategis Group, there will be more than 530 million wireless subscribers by the year 2001. New estimates report that the number of wireless subscribers will break the one billion mark by 2004, and a "substantial portion of the phones sold that year will have multimedia capabilities."

If the Strategis Group estimate is correct and J2EE continues to grow as the preferred platform for server-side computing, the number of users connected over the Internet to J2EE-based application servers will be mind-boggling!

No worries. J2EE application servers are built with highly scalable distributed architectures in mind. They are built to manage thousands of client connections, threads and transactions at a time. Servers on the market today are also able to scale relatively well in stateful architectures that maintain session across multiple calls from a client. Stateful architectures will be essential to successful wireless applications as duly noted above under the "Session and Transaction Management" section.

Scaling to support unknown, potentially unlimited users across the Internet is a problem already being addressed in many Web-based applications today. However, the wireless movement opens up the Internet to a whole new market of users. They are the "anytime, anywhere" users whose surfing time isn't governed by a DSL line and whose business doesn't wait for a LAN connection. You must begin to think about building your applications based on the "anytime, anywhere" user, including scaling and transaction management for wireless solutions.

Conclusion
This month I covered a hot topic in the area of Java these days: wireless application development. With a little background on the WAP, the de facto standard for wireless development, I tied the J2EE platform into the picture to magnify the importance this platform plays in wireless solutions. The demand for wireless applications is putting even greater pressure on the J2EE platform to rise up and meet the scalability, session management and transactional needs of the wireless community.

If you pick a J2EE-compliant application server as your deployment environment, you're playing a royal flush when it comes to the success of your wireless application. I believe the wireless solutions market will be dominated not only by innovative device manufacturers, but by application server vendors who make it easy to build reusable, scalable business logic that supports the smoke and mirrors of WML decks and cards. They who host their wireless applications in a scalable, transactional fashion hold the winning hand!

Author Bio
Jason Westra is the CTO of Verge Technologies Group, Inc.
( www.vergecorp.com). Verge is a Boulder, Colorado-based firm specializing in e-business solutions with Enterprise JavaBeans.

Jason can be reached at: [email protected]

 

All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.