Event-Driven Web Applications

An Interview with TIBCO's Kevin Hakman from JavaOne 2007

by Frank Sommers and Bill Venners
June 13, 2007

Summary
As developers build rich, application-like Web interfaces, some find the HTTP protocol's stateless request-response paradigm limiting. In this interview with Artima, TIBCO's Kevin Hakman describes a new tool that provides persistent HTTP connections in a scalable manner, allowing for event driven application protocols to be used on the Web.

The HTTP protocol's simplicity, including its stateless request-response paradigm, has been credited as one of the reasons HTTP emerged as the second most popular Internet protocol, next to SMTP. One advantage of HTTP over network protocols that rely on more connection state is scalability: since the server does not have to maintain connection state, scaling up HTTP is straightforward.

HTTP's statelessness, however, has proven a challenge in the context of Web-based applications that mimic traditional client-server designs. Traditional client-server applications typically maintain some connection state on both the client and the server, creating what appears to be a "persistent" connection between the two. The illusion of a persistent connection makes it easier to follow an event-driven programming paradigm, since the context for events passed between client and server is provided by the connection itself. Some event-driven client-server applications also allow the server to send messages to the client.

In this interview with Artima, TIBCO's Kevin Hakman describes a new tool that enables a similar event-driven programming model over HTTP. Noting that an important recent trend has been to exploit event-driven programming over the Web, Hakman notes that,

People are now demonstrating that you can have a persistent HTTP connection so that events on the server and events on the client are blurred. Your client applications, and your server applications, because they can be persistently connected rather than request-response connected, essentially exist all in the same event cloud. This gets us back to development paradigms, such as Visual Basic or client-server, while maintaining all of the cost benefits of deploying over the Web...

The ultimate issue around this persistent connection is scalability. A lot of that historically has been constrained [by] the servlet spec. Lots of people like to work with servlets, but there is a one [connection] to one thread limit.

The most recent release of the TIBCO Ajax message service goes outside the servlet. We created a dedicated Java process on the server... that isn't constrained to one thread, one connection. Instead, it pools those things, does multiplexing, leverages a lot of our experience in message bus capabilities, and extend[s] that to a scalable solution.

There are all kinds of applications [for this]—for example, stock-traders' desktops, executive dashboards with real-time information, operational overviews. To do that has historically been constrained to a thick-client model or to some kind of extra plug-in media requirement. Here, you're able to do that using Ajax technology and standard browsers.

Click to download audio Kevin Hakman, founder of General Interface and director of developer evangelism at TIBCO, talks about event-driven Web applications. (6 minutes 15 seconds)

What do you think of the persistent HTTP connection approach to creating event-driven Web applications?

Post your opinion in the discussion forum.

Talk back!

Have an opinion? Readers have already posted 1 comment about this article. Why not add yours?

About the authors

Frank Sommers is Editor-in-Chief of Artima Developer. He also serves as chief editor of the IEEE Technical Committee on Scalable Computing's newsletter, and is an elected member of the Jini Community's Technical Advisory Committee. Prior to joining Artima, Frank wrote the Jiniology and Web services columns for JavaWorld.

Bill Venners is president of Artima, Inc. He is author of the book, Inside the Java Virtual Machine, a programmer-oriented survey of the Java platform's architecture and internals. His popular columns in JavaWorld magazine covered Java internals, object-oriented design, and Jini. Bill has been active in the Jini Community since its inception. He led the Jini Community's ServiceUI project, whose ServiceUI API became the de facto standard way to associate user interfaces to Jini services. Bill also serves as an elected member of the Jini Community's initial Technical Oversight Committee (TOC), and in this role helped to define the governance process for the community.