|By Kaazing Blog, John Fallows||
|February 1, 2007 09:00 PM EST||
There's a common misconception among many end users, consumers, and developers that AJAX is the ultimate solution for the Web and that it can provide all the same functionality as a rich desktop solution. Sure, AJAX can cover most of our expectations for a rich client, mimicking functionality provided by a desktop application, but there's still one area that has yet to be fully integrated scalable server-initiated message delivery.
With server-initiated message delivery, all end users of a particular application are simultaneously notified of any changes to the application state, e.g., at the stock exchange a stock is dropping fast and the trading application has to inform all traders about the sudden change in price.
Server-Initiated Message Delivery
Let's use the trading application as an example for server-initiated message delivery. Each broker has his own preferences in stocks and bonds and requires instant notification of changes in the market. A desktop client for a distributed enterprise application typically registers interest in specific kinds of server messages so the server can notify the desktop client when they occur. This lets the desktop application efficiently use the network on a need-to-know basis instead of having the client actively ask for information.
This approach won't work for a traditional Web-based AJAX application since the server can't initiate a direct connection to the browser because of browser security, firewalls, and Web proxies.
Sure, it's possible with AJAX to "notify" a Web client that a change has occurred on the server using a technique called "polling." By creating a Web application that polls every now and then the end user believes that he's been notified by the server, when in fact it's repeatedly asking for updates like any child asking for candy Can I get it now? Can I get it now? Can I get it now? You get the picture.
Of course, this impacts network bandwidth since there's traffic for each polling request even when no updates are available from the server. We need a way for Web clients to register interest in certain types of messages and then let the server initiate delivery of those messages, pushing them to each browser.
There's a Twist
OK, OK, OK, there is a twist you can't actually "push" messages to a Web-based AJAX application unless you maintain an open connection from the client to the server. However, a thread is kept alive on the server for each open connection so messages can be delivered to the browser immediately.
The fact that you'd even try to maintain an open connection per user to a server would have heads rolling down the corridors in most IT departments. Just imagine thousands, or even hundreds of thousands of connections, using the thread and process pooling models provided by most Web Servers today, keeping each thread alive on the server just to be able to send a message to the client it doesn't scale! Let's come back to that one later.
HTTP Connection Limitations
Today most frameworks leveraging AJAX are using the XMLHttpRequest object, which allocates an HTTP connection for the duration of the request. The HTTP 1.1 specification recommends that browsers support a maximum of two open connections to the hosting server. This presents a problem for highly interactive AJAX Web applications, especially on Microsoft Internet Explorer, which enforces this recommendation.
If there are more than two AJAX frameworks or components using the XMLHttpRequest on the same Web page then there will probably be contention for the two open connections, causing requests to queue. The result will be blocked and ineffective communication, defeating the main purpose of having AJAX on the Web page. There's a need to share server communications over two HTTP connections at most.
Next-Generation Web Communication
The main reason a Web server allocates one thread per connection is because it expects the request to be highly active and short-lived. However, maintaining an open connection to the server is extremely long-lived and activity is mostly dormant. We also need a way to meaningfully share server communications to address the browser connection limit. Thankfully, there are several projects in process addressing the limitations of traditional AJAX Web applications. Let's have a look at some of these projects.
Comet - The Never-Ending Request
First we need a way to create message-driven Web applications that require the server to notify the client about server-side events. This is where Comet comes in as described by Wikipedia:
Comet is a programming technique that enables Web servers to send data to the client without having any need for the client to request it.
Comet provides the means for the server to initiate a response to a client request, and later send a message to that client using the same response for example, in the browser a message will "just" appear. Comet also provides clients with a way to register interest in specific types of messages. When the server publishes a message, it's delivered only to clients that previously registered interest in that kind of message.
Comet doesn't solve everything; in fact it creates some new problems. Using Comet means lots of outstanding requests, ideally one per client, and introduces similar scalability issues at the server as the AJAX polling technique. Keeping a separate thread allocated for each open request will exhaust the server's resources, so for this model to work properly, the Web server has to handle multiple requests without allocating one thread per request.
Asynchronous Request Processing
The idea behind Asynchronous Request Processing (ARP) is to manage incoming servlet requests asynchronously. Rather than committing a separate Java thread to synchronously process each servlet request, a single thread leverages Java NIO to detect when new information needs to be written to the response of any outstanding request. This technique provides a huge scalability win for the Comet use case, giving excellent performance even when there are a large number of outstanding, mostly dormant, requests at the server.
Although there's no standard defined for ARP several teams and projects are providing ARP solutions, such as Jetty Continuations and Grizzly. We take our hats off to these visionary teams providing everyday developers with ARP and Comet solutions.
Note: There's hope that ARP will be standard in the Servlet 3.0 and Java EE 6 specifications.
The Comet Messaging Protocol
SoftLayer operates a global cloud infrastructure platform built for Internet scale. With a global footprint of data centers and network points of presence, SoftLayer provides infrastructure as a service to leading-edge customers ranging from Web startups to global enterprises. SoftLayer's modular architecture, full-featured API, and sophisticated automation provide unparalleled performance and control. Its flexible unified platform seamlessly spans physical and virtual devices linked via a world...
May. 30, 2016 08:00 AM EDT Reads: 2,355
SYS-CON Events announced today that ContentMX, the marketing technology and services company with a singular mission to increase engagement and drive more conversations for enterprise, channel and SMB technology marketers, has been named “Sponsor & Exhibitor Lounge Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2016, at the Javits Center in New York City, New York. “CloudExpo is a great opportunity to start a conversation with new prospects, but what happens after the...
May. 30, 2016 07:15 AM EDT Reads: 1,380
Companies can harness IoT and predictive analytics to sustain business continuity; predict and manage site performance during emergencies; minimize expensive reactive maintenance; and forecast equipment and maintenance budgets and expenditures. Providing cost-effective, uninterrupted service is challenging, particularly for organizations with geographically dispersed operations.
May. 30, 2016 07:00 AM EDT Reads: 2,231
The IoTs will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform. In his session at @ThingsExpo, Craig Sproule, CEO of Metavine, will demonstrate how to move beyond today's coding paradigm and share the must-have mindsets for removing complexity from the development proc...
May. 30, 2016 06:00 AM EDT Reads: 2,006
SYS-CON Events announced today TechTarget has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. TechTarget is the Web’s leading destination for serious technology buyers researching and making enterprise technology decisions. Its extensive global networ...
May. 30, 2016 05:30 AM EDT Reads: 3,297
SYS-CON Events announced today that Commvault, a global leader in enterprise data protection and information management, has been named “Bronze Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Commvault is a leading provider of data protection and information management...
May. 30, 2016 04:45 AM EDT Reads: 3,315
The essence of data analysis involves setting up data pipelines that consist of several operations that are chained together – starting from data collection, data quality checks, data integration, data analysis and data visualization (including the setting up of interaction paths in that visualization). In our opinion, the challenges stem from the technology diversity at each stage of the data pipeline as well as the lack of process around the analysis.
May. 30, 2016 03:15 AM EDT Reads: 1,535
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, wh...
May. 30, 2016 03:00 AM EDT Reads: 2,087
Designing IoT applications is complex, but deploying them in a scalable fashion is even more complex. A scalable, API first IaaS cloud is a good start, but in order to understand the various components specific to deploying IoT applications, one needs to understand the architecture of these applications and figure out how to scale these components independently. In his session at @ThingsExpo, Nara Rajagopalan is CEO of Accelerite, will discuss the fundamental architecture of IoT applications, ...
May. 30, 2016 03:00 AM EDT Reads: 1,389
SYS-CON Events announced today that MangoApps will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. MangoApps provides modern company intranets and team collaboration software, allowing workers to stay connected and productive from anywhere in the world and from any device. For more information, please visit https://www.mangoapps.com/.
May. 30, 2016 02:45 AM EDT Reads: 1,076
SYS-CON Events announced today that Tintri Inc., a leading producer of VM-aware storage (VAS) for virtualization and cloud environments, will exhibit at the 18th International CloudExpo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, New York, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
May. 30, 2016 02:45 AM EDT Reads: 2,528
SYS-CON Events announced today that Alert Logic, Inc., the leading provider of Security-as-a-Service solutions for the cloud, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Alert Logic, Inc., provides Security-as-a-Service for on-premises, cloud, and hybrid infrastructures, delivering deep security insight and continuous protection for customers at a lower cost than traditional security solutions. Ful...
May. 30, 2016 02:15 AM EDT Reads: 3,019
In his session at 18th Cloud Expo, Bruce Swann, Senior Product Marketing Manager at Adobe, will discuss how the Adobe Marketing Cloud can help marketers embrace opportunities for personalized, relevant and real-time customer engagement across offline (direct mail, point of sale, call center) and digital (email, website, SMS, mobile apps, social networks, connected objects). Bruce Swann has more than 15 years of experience working with digital marketing disciplines like web analytics, social med...
May. 30, 2016 02:00 AM EDT Reads: 1,485
SYS-CON Events announced today Object Management Group® has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA.
May. 30, 2016 01:00 AM EDT Reads: 2,692
SYS-CON Events announced today that EastBanc Technologies will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. EastBanc Technologies has been working at the frontier of technology since 1999. Today, the firm provides full-lifecycle software development delivering flexible technology solutions that seamlessly integrate with existing systems – whether on premise or cloud. EastBanc Technologies partners with p...
May. 29, 2016 10:00 PM EDT Reads: 2,416
WebRTC is bringing significant change to the communications landscape that will bridge the worlds of web and telephony, making the Internet the new standard for communications. Cloud9 took the road less traveled and used WebRTC to create a downloadable enterprise-grade communications platform that is changing the communication dynamic in the financial sector. In his session at @ThingsExpo, Leo Papadopoulos, CTO of Cloud9, will discuss the importance of WebRTC and how it enables companies to fo...
May. 29, 2016 04:15 PM EDT Reads: 2,620
The IoT is changing the way enterprises conduct business. In his session at @ThingsExpo, Eric Hoffman, Vice President at EastBanc Technologies, discuss how businesses can gain an edge over competitors by empowering consumers to take control through IoT. We'll cite examples such as a Washington, D.C.-based sports club that leveraged IoT and the cloud to develop a comprehensive booking system. He'll also highlight how IoT can revitalize and restore outdated business models, making them profitable...
May. 29, 2016 02:00 PM EDT Reads: 3,012
Customer experience has become a competitive differentiator for companies, and it’s imperative that brands seamlessly connect the customer journey across all platforms. With the continued explosion of IoT, join us for a look at how to build a winning digital foundation in the connected era – today and in the future. In his session at @ThingsExpo, Chris Nguyen, Group Product Marketing Manager at Adobe, will discuss how to successfully leverage mobile, rapidly deploy content, capture real-time d...
May. 29, 2016 12:45 PM EDT Reads: 1,710
What a difference a year makes. Organizations aren’t just talking about IoT possibilities, it is now baked into their core business strategy. With IoT, billions of devices generating data from different companies on different networks around the globe need to interact. From efficiency to better customer insights to completely new business models, IoT will turn traditional business models upside down. In the new customer-centric age, the key to success is delivering critical services and apps wit...
May. 29, 2016 10:30 AM EDT Reads: 1,323
Join us at Cloud Expo | @ThingsExpo 2016 – June 7-9 at the Javits Center in New York City and November 1-3 at the Santa Clara Convention Center in Santa Clara, CA – and deliver your unique message in a way that is striking and unforgettable by taking advantage of SYS-CON's unmatched high-impact, result-driven event / media packages.
May. 29, 2016 10:00 AM EDT Reads: 2,567