|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.
SYS-CON Events announced today that Harbinger Systems 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. Harbinger Systems is a global company providing software technology services. Since 1990, Harbinger has developed a strong customer base worldwide. Its customers include software product companies ranging from hi-tech start-ups in Silicon Valley to leading product companies in the US a...
Jul. 5, 2015 04:00 AM EDT Reads: 1,453
[session] Dark Art of Container Monitoring By @Sysdig | @DevOpsSummit #DevOps #Docker #Containers #Microservices
Containers are revolutionizing the way we deploy and maintain our infrastructures, but monitoring and troubleshooting in a containerized environment can still be painful and impractical. Understanding even basic resource usage is difficult – let alone tracking network connections or malicious activity. In his session at DevOps Summit, Gianluca Borello, Sr. Software Engineer at Sysdig, will cover the current state of the art for container monitoring and visibility, including pros / cons and liv...
Jul. 4, 2015 11:45 PM EDT Reads: 337
In his session at 16th Cloud Expo, Simone Brunozzi, VP and Chief Technologist of Cloud Services at VMware, reviewed the changes that the cloud computing industry has gone through over the last five years and shared insights into what the next five will bring. He also chronicled the challenges enterprise companies are facing as they move to the public cloud. He delved into the "Hybrid Cloud" space and explained why every CIO should consider ‘hybrid cloud' as part of their future strategy to achie...
Jul. 4, 2015 07:00 PM EDT Reads: 313
DevOps Summit, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 17th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long development...
Jul. 4, 2015 06:45 PM EDT Reads: 381
"A lot of the enterprises that have been using our systems for many years are reaching out to the cloud - the public cloud, the private cloud and hybrid," stated Reuven Harrison, CTO and Co-Founder of Tufin, in this SYS-CON.tv interview at 16th Cloud Expo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 4, 2015 06:30 PM EDT Reads: 279
The time is ripe for high speed resilient software defined storage solutions with unlimited scalability. ISS has been working with the leading open source projects and developed a commercial high performance solution that is able to grow forever without performance limitations. In his session at Cloud Expo, Alex Gorbachev, President of Intelligent Systems Services Inc., shared foundation principles of Ceph architecture, as well as the design to deliver this storage to traditional SAN storage co...
Jul. 4, 2015 05:15 PM EDT Reads: 1,091
The last decade was about virtual machines, but the next one is about containers. Containers enable a service to run on any host at any time. Traditional tools are starting to show cracks because they were not designed for this level of application portability. Now is the time to look at new ways to deploy and manage applications at scale. In his session at @DevOpsSummit, Brian “Redbeard” Harrington, a principal architect at CoreOS, will examine how CoreOS helps teams run in production. Attende...
Jul. 4, 2015 05:15 PM EDT Reads: 242
[slides] IoT Middleware for a Faster Time to Market By @robomq | @ThingsExpo #IoT #M2M #InternetOfThings
Internet of Things (IoT) will be a hybrid ecosystem of diverse devices and sensors collaborating with operational and enterprise systems to create the next big application. In their session at @ThingsExpo, Bramh Gupta, founder and CEO of robomq.io, and Fred Yatzeck, principal architect leading product development at robomq.io, discussed how choosing the right middleware and integration strategy from the get-go will enable IoT solution developers to adapt and grow with the industry, while at th...
Jul. 4, 2015 04:30 PM EDT Reads: 1,071
In the midst of the widespread popularity and adoption of cloud computing, it seems like everything is being offered “as a Service” these days: Infrastructure? Check. Platform? You bet. Software? Absolutely. Toaster? It’s only a matter of time. With service providers positioning vastly differing offerings under a generic “cloud” umbrella, it’s all too easy to get confused about what’s actually being offered. In his session at 16th Cloud Expo, Kevin Hazard, Director of Digital Content for SoftL...
Jul. 4, 2015 04:00 PM EDT Reads: 1,144
17th Cloud Expo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises ar...
Jul. 4, 2015 02:00 PM EDT Reads: 296
Live Webinar with 451 Research Analyst Peter Christy. Join us on Wednesday July 22, 2015, at 10 am PT / 1 pm ET In a world where users are on the Internet and the applications are in the cloud, how do you maintain your historic SLA with your users? Peter Christy, Research Director, Networks at 451 Research, will discuss this new network paradigm, one in which there is no LAN and no WAN, and discuss what users and network administrators gain and give up when migrating to the agile world of clo...
Jul. 4, 2015 02:00 PM EDT Reads: 267
Agile, which started in the development organization, has gradually expanded into other areas downstream - namely IT and Operations. Teams – then teams of teams – have streamlined processes, improved feedback loops and driven a much faster pace into IT departments which have had profound effects on the entire organization. In his session at DevOps Summit, Anders Wallgren, Chief Technology Officer of Electric Cloud, will discuss how DevOps and Continuous Delivery have emerged to help connect dev...
Jul. 4, 2015 01:30 PM EDT Reads: 291
"We help to transform an organization and their operations and make them more efficient, more agile, and more nimble to move into the cloud or to move between cloud providers and create an agnostic tool set," noted Jeremy Steinert, DevOps Services Practice Lead at WSM International, in this SYS-CON.tv interview at @DevOpsSummit, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 4, 2015 01:00 PM EDT Reads: 221
SYS-CON Events announced today that Secure Infrastructure & Services 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. Secure Infrastructure & Services (SIAS) is a managed services provider of cloud computing solutions for the IBM Power Systems market. The company helps mid-market firms built on IBM hardware platforms to deploy new levels of reliable and cost-effective computing and hig...
Jul. 4, 2015 01:00 PM EDT Reads: 467
"AgilData is the next generation of dbShards. It just adds a whole bunch more functionality to improve the developer experience," noted Dan Lynn, CEO of AgilData, in this SYS-CON.tv interview at 16th Cloud Expo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 4, 2015 12:45 PM EDT Reads: 238
"We have a tagline - "Power in the API Economy." What that means is everything that is built in applications and connected applications is done through APIs," explained Roberto Medrano, Executive Vice President at Akana, in this SYS-CON.tv interview at 16th Cloud Expo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 4, 2015 12:30 PM EDT Reads: 297
The 17th International Cloud Expo has announced that its Call for Papers is open. 17th International Cloud Expo, to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, APM, APIs, Microservices, Security, Big Data, Internet of Things, DevOps and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding bu...
Jul. 4, 2015 12:30 PM EDT Reads: 304
The 5th International DevOps Summit, co-located with 17th International Cloud Expo – being held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the ...
Jul. 4, 2015 12:15 PM EDT Reads: 359
Containers have changed the mind of IT in DevOps. They enable developers to work with dev, test, stage and production environments identically. Containers provide the right abstraction for microservices and many cloud platforms have integrated them into deployment pipelines. DevOps and Containers together help companies to achieve their business goals faster and more effectively. In his session at DevOps Summit, Ruslan Synytsky, CEO and Co-founder of Jelastic, reviewed the current landscape of...
Jul. 4, 2015 12:00 PM EDT Reads: 1,120
"What Dyn is able to do with our Internet performance and our Internet intelligence is give companies visibility into what is actually going on in that cloud," noted Corey Hamilton, Product Marketing Manager at Dyn, in this SYS-CON.tv interview at 16th Cloud Expo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 4, 2015 12:00 PM EDT Reads: 237