|By Peter Lubbers||
|January 23, 2011 05:00 AM EST||
HTML5 WebSocket is an important new technology that helps you build engaging, interactive, real-time web applications quickly and reliably. Sure, HTML5 WebSockets may be the best thing since sliced bread, but is this new technology right for you?
This article identifies five types of web applications that will benefit from HTML5 WebSockets. So, without further ado... give me five!
The Five Signs
- Your web application has data that must flow bi-directional simultaneously.
- Your web application must scale to large numbers of concurrent users.
- Your web application must extend TCP-based protocols to the browser.
- Your web application developers need an API that is easy to use.
- Your web application must extend SOA over the Web and in the Cloud.
1. Your application has data that must flow bi-directional simultaneously.
When the Web was first conceived, it focused on document retrieval. Users requested a URL and the server delivered an object (for example, a web page or an image file). Today, the Web also comes to us. Servers want to let us know when they have something for us, be it a stock update or a message from a friend. Unfortunately, due to current Web architecture, clients must initiate communication with the server using half-duplex (request/response) HTTP. Even relatively static applications need a way to communicate asynchronously between the client and the server for common tasks, such as spell-checking or search auto-completion.
Up until now, in an effort to simulate full-duplex communication over half-duplex HTTP, developers have contrived clever tricks and techniques using two connections: one for the downstream and one for the upstream. Many of these techniques use polling or long-polling (Comet) to simulate server-initiated push. The maintenance and coordination of two connections causes significant resource consumption overhead and adds lots of complexity. Furthermore, these techniques do not provide true full-duplex communication where data can be transferred between the client and the server simultaneously. Simply put, HTTP was not designed for real-time, full-duplex communication.
Now, HTML5 WebSockets deliver a full-duplex communication model for the Internet: communication between the client and server can now flow in both directions at the same time. For today's web application developers, this new concept opens up entirely new application models without the burden and overhead of earlier approaches.
If you are building a web application that has data that must flow bi-directionally and simultaneously, you need to use HTML5 WebSockets.
2. Your application must scale to large numbers of concurrent users
If you are building a web application for a large number of concurrent users, you are inevitably going to face resource contention, particularly when each of your users must establish a connection to your back-end server. Typically, each of those connections includes the overhead of HTTP's verbose request-and-response protocol, as well as the establishment and teardown of secure connections.
The HTTP request and response model suffers from a significant amount of overhead. When retrieving a large document from a server, a few hundred bytes of HTTP header overhead is not a big deal. Consider what happens, however, when each message sent to a client is only a few bytes, such as a stock price update or a chat message that is only 20 characters long. The majority of the data transmitted in this case is unnecessary HTTP header overhead (up to 2000 or even more bytes for the single message), making the communication highly inefficient.
HTML5 WebSockets specify a new, vastly more efficient way of communicating between clients and servers that is far less taxing on the application and easier for the underlying network infrastructure to handle. Replacing hundreds of HTTP header bytes with just two WebSocket frame bytes leads to a massive reduction in unnecessary network throughput (1000:1). In addition, the lack of continuous polling dramatically reduces latency. All of this means that a single WebSocket server can deal with many more users at once, reducing the total cost of ownership (TCO).
HTML5 WebSockets provide such a dramatic improvement from the old, convoluted hacks that simulate a full-duplex connection in a browser that it prompted Google's Ian Hickson, the HTML5 specification lead, to say:
"Reducing kilobytes of data to 2 bytes... and reducing latency from 150ms to 50ms is far more than marginal. In fact, these two factors alone are enough to make WebSockets seriously interesting to Google."
3. Your application must extend TCP-based protocols to the browser.
Many web applications need to connect end users to information from back-end, TCP-based services. These services are contained in legacy systems, or travel across enterprise message buses via APIs and protocols such as TIBCO EMS, JMS, RMDS, AMQP, XMPP, and Stomp.
Some applications may be composed of several subsystems, each using a different application protocol. For example, one subsystem may require a publish/subscribe programming model that listens and responds to the changing prices of inventory items, another subsystem may receive a large volume of database events pushed from a column-based persistence engine, and yet another subsystem may need to support chat and chat rooms.
By using WebSockets, your application can avoid siloed solutions for each subsystem. You no longer have to use hacks to push data to a browser or use CPU and network-intensive polling to simulate publishing and subscribing. With WebSocket, the W3C and IETF standards bodies have provided an elegant way to enable full-duplex network communication over the Web. In addition, since WebSocket traffic flows over standard HTTP ports (80 and 443), there is no need to open additional ports on corporate firewalls to take advantage of full-duplex communication.
4. Your application developers need an API that is easy to use.
Consider how much time and effort is required to create a reliable two-way communications protocol and to connect an application server to back-end systems. Testing and securing applications built on top of this protocol is difficult, because it is harder to pinpoint the problem in a proprietary protocol. Moreover, the work is application-specific, thwarting all attempts to re-use it.
HTML5 WebSockets offer a single, standard interface against which to develop. This means developers can spend less time building and testing communication protocols and more time designing a superb client-side experience - without having to redo the back-end work. HTML5 WebSockets eliminate much of the custom development work that engineers have to do to create a fast, secure, full-duplex application.
5. Your application must extend SOA over the web and in the cloud.
Your enterprise service-oriented architecture (SOA) application or SOA product works well on an internal enterprise network, but you now have to deploy your high-performance distributed software over the web - and through the quagmire of firewalls and proxy servers along the way - to leverage all the advantages of a web infrastructure for your demanding customers and even more-demanding management.
With WebSockets, your applications can open a standardized, full-duplex connection over the web. Developers can leverage this connection to extend messages from a SOA inside the firewall to an external SOA, such as a high-performance Enterprise Service Bus (ESB) or a web-based Supply Chain in a cloud environment.
HTML5 WebSockets are more efficient than current architectures, and WebSocket applications can handle more concurrent users and a greater message volume, with less infrastructure. This ability is good for any application that has to deal with capacity constraints, as the number of servers required is lower. Where this really makes a difference, however, is in on-demand computing environments in public and private clouds. In a cloud-computing model, capacity is elastic: you pay for what you use.
Traditionally, there are two ways of handling growing demand. The first is to scale "vertically," which involves buying a bigger machine, adding RAM, and so on. Modern web applications do not use this approach; however; they scale "horizontally" - that is, to handle an increasing load, you add more machines at each of the tiers in the application.
Web applications deployed on elastic computing platforms must be especially aware of their resource consumption. In a cloud, the addition of machines is often automated, so there is no upper limit on resource consumption. Now, inefficient code translates directly into a higher bill at the end of the month, because more virtual machines were spun up to handle the traffic. In these environments, the efficiency of HTML5 WebSockets is particularly compelling.
This article showed you five reasons why you should be using WebSockets for your web applications. You learned that HTML5 WebSockets can enable true full-duplex communication, can handle large numbers of concurrent users, can extend TCP-based protocols to the browser, is easy to use, and can extend your SOA over the Web and in the cloud.
The Internet of Everything (IoE) brings together people, process, data and things to make networked connections more relevant and valuable than ever before – transforming information into knowledge and knowledge into wisdom. IoE creates new capabilities, richer experiences, and unprecedented opportunities to improve business and government operations, decision making and mission support capabilities.
Jul. 29, 2015 03:15 PM EDT Reads: 240
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists addressed this very serious issue of profound change in the industry.
Jul. 29, 2015 03:00 PM EDT Reads: 1,257
Discussions about cloud computing are evolving into discussions about enterprise IT in general. As enterprises increasingly migrate toward their own unique clouds, new issues such as the use of containers and microservices emerge to keep things interesting. In this Power Panel at 16th Cloud Expo, moderated by Conference Chair Roger Strukhoff, panelists addressed the state of cloud computing today, and what enterprise IT professionals need to know about how the latest topics and trends affect their organization.
Jul. 29, 2015 02:00 PM EDT Reads: 1,169
SYS-CON Events announced today that HPM Networks will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. For 20 years, HPM Networks has been integrating technology solutions that solve complex business challenges. HPM Networks has designed solutions for both SMB and enterprise customers throughout the San Francisco Bay Area.
Jul. 29, 2015 01:45 PM EDT Reads: 424
For IoT to grow as quickly as analyst firms’ project, a lot is going to fall on developers to quickly bring applications to market. But the lack of a standard development platform threatens to slow growth and make application development more time consuming and costly, much like we’ve seen in the mobile space. In his session at @ThingsExpo, Mike Weiner, Product Manager of the Omega DevCloud with KORE Telematics Inc., discussed the evolving requirements for developers as IoT matures and conducted a live demonstration of how quickly application development can happen when the need to comply wit...
Jul. 29, 2015 07:30 AM EDT Reads: 278
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Architect for the Internet of Things and Intelligent Systems, described how to revolutionize your archit...
Jul. 28, 2015 06:30 PM EDT Reads: 1,377
It is one thing to build single industrial IoT applications, but what will it take to build the Smart Cities and truly society-changing applications of the future? The technology won’t be the problem, it will be the number of parties that need to work together and be aligned in their motivation to succeed. In his session at @ThingsExpo, Jason Mondanaro, Director, Product Management at Metanga, discussed how you can plan to cooperate, partner, and form lasting all-star teams to change the world and it starts with business models and monetization strategies.
Jul. 28, 2015 04:30 PM EDT Reads: 1,755
Converging digital disruptions is creating a major sea change - Cisco calls this the Internet of Everything (IoE). IoE is the network connection of People, Process, Data and Things, fueled by Cloud, Mobile, Social, Analytics and Security, and it represents a $19Trillion value-at-stake over the next 10 years. In her keynote at @ThingsExpo, Manjula Talreja, VP of Cisco Consulting Services, discussed IoE and the enormous opportunities it provides to public and private firms alike. She will share what businesses must do to thrive in the IoE economy, citing examples from several industry sectors.
Jul. 28, 2015 11:00 AM EDT Reads: 2,036
Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world. Get ready to learn the facts: Is there a bias against women in the tech / developer communities? Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions? Some beginnings of what to do about it! In her Opening Keynote at 16th Cloud Expo, Sandy Carter, IBM General Manager Cloud Ecosystem and Developers, and a Social Business Evangelist, d...
Jul. 27, 2015 09:00 PM EDT Reads: 2,041
There will be 150 billion connected devices by 2020. New digital businesses have already disrupted value chains across every industry. APIs are at the center of the digital business. You need to understand what assets you have that can be exposed digitally, what their digital value chain is, and how to create an effective business model around that value chain to compete in this economy. No enterprise can be complacent and not engage in the digital economy. Learn how to be the disruptor and not the disruptee.
Jul. 27, 2015 10:00 AM EDT Reads: 2,023
Akana has released Envision, an enhanced API analytics platform that helps enterprises mine critical insights across their digital eco-systems, understand their customers and partners and offer value-added personalized services. “In today’s digital economy, data-driven insights are proving to be a key differentiator for businesses. Understanding the data that is being tunneled through their APIs and how it can be used to optimize their business and operations is of paramount importance,” said Alistair Farquharson, CTO of Akana.
Jul. 27, 2015 09:00 AM EDT Reads: 314
Business as usual for IT is evolving into a "Make or Buy" decision on a service-by-service conversation with input from the LOBs. How does your organization move forward with cloud? In his general session at 16th Cloud Expo, Paul Maravei, Regional Sales Manager, Hybrid Cloud and Managed Services at Cisco, discusses how Cisco and its partners offer a market-leading portfolio and ecosystem of cloud infrastructure and application services that allow you to uniquely and securely combine cloud business applications and services across multiple cloud delivery models.
Jul. 27, 2015 08:00 AM EDT Reads: 1,895
The enterprise market will drive IoT device adoption over the next five years. In his session at @ThingsExpo, John Greenough, an analyst at BI Intelligence, division of Business Insider, analyzed how companies will adopt IoT products and the associated cost of adopting those products. John Greenough is the lead analyst covering the Internet of Things for BI Intelligence- Business Insider’s paid research service. Numerous IoT companies have cited his analysis of the IoT. Prior to joining BI Intelligence, he worked analyzing bank technology for Corporate Insight and The Clearing House Payment...
Jul. 26, 2015 09:00 PM EDT Reads: 1,567
In his keynote at 16th Cloud Expo, Rodney Rogers, CEO of Virtustream, discussed the evolution of the company from inception to its recent acquisition by EMC – including personal insights, lessons learned (and some WTF moments) along the way. Learn how Virtustream’s unique approach of combining the economics and elasticity of the consumer cloud model with proper performance, application automation and security into a platform became a breakout success with enterprise customers and a natural fit for the EMC Federation.
Jul. 26, 2015 08:00 AM EDT Reads: 2,142
"Optimal Design is a technology integration and product development firm that specializes in connecting devices to the cloud," stated Joe Wascow, Co-Founder & CMO of Optimal Design, in this SYS-CON.tv interview at @ThingsExpo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 25, 2015 02:00 PM EDT Reads: 380
SYS-CON Events announced today that CommVault has been named “Bronze Sponsor” of SYS-CON's 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. A singular vision – a belief in a better way to address current and future data management needs – guides CommVault in the development of Singular Information Management® solutions for high-performance data protection, universal availability and simplified management of data on complex storage networks. CommVault's exclusive single-platform architecture gives companies unp...
Jul. 25, 2015 01:00 PM EDT Reads: 1,947
Electric Cloud and Arynga have announced a product integration partnership that will bring Continuous Delivery solutions to the automotive Internet-of-Things (IoT) market. The joint solution will help automotive manufacturers, OEMs and system integrators adopt DevOps automation and Continuous Delivery practices that reduce software build and release cycle times within the complex and specific parameters of embedded and IoT software systems.
Jul. 25, 2015 12:15 PM EDT Reads: 447
"ciqada is a combined platform of hardware modules and server products that lets people take their existing devices or new devices and lets them be accessible over the Internet for their users," noted Geoff Engelstein of ciqada, a division of Mars International, in this SYS-CON.tv interview at @ThingsExpo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 25, 2015 12:00 PM EDT Reads: 1,524
Internet of Things is moving from being a hype to a reality. Experts estimate that internet connected cars will grow to 152 million, while over 100 million internet connected wireless light bulbs and lamps will be operational by 2020. These and many other intriguing statistics highlight the importance of Internet powered devices and how market penetration is going to multiply many times over in the next few years.
Jul. 25, 2015 09:00 AM EDT Reads: 1,482
SYS-CON Events announced today that Dyn, the worldwide leader in Internet Performance, will exhibit at SYS-CON's 17th International Cloud Expo®, which will take place on November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. Dyn is a cloud-based Internet Performance company. Dyn helps companies monitor, control, and optimize online infrastructure for an exceptional end-user experience. Through a world-class network and unrivaled, objective intelligence into Internet conditions, Dyn ensures traffic gets delivered faster, safer, and more reliably than ever.
Jul. 24, 2015 11:00 PM EDT Reads: 2,050