If you’re building something like a browser-based game, reducing latency is crucial to keeping things running smoothly. This can add up to a reasonably large amount of data that needs to be transferred, which in turn increases latency. Every time you make an HTTP request a bunch of headers and cookie data are transferred to the server. The problem with all of these solutions is that they carry the overhead of HTTP. This involves keeping an HTTP connection open until the server has some data to push down to the client. One of the most popular of these strategies was long-polling. To overcome this a number of different strategies were devised to allow servers to push data to the client. The biggest thing holding them back was the traditional HTTP model of client initiated transactions. Web applications had grown up a lot and were now consuming more data than ever before. This paradigm went unchallenged for a number of years but with the introduction of AJAX around 2005 many people started to explore the possibilities of making connections between a client and server bidirectional. The web was built around the idea that a client’s job is to request data from a server, and a server’s job is to fulfill those requests. A Brief History of Real-Time Web Applications Before we dive into learning about the WebSocket protocol and API I first want to spend a little time going through some of problems that face real-time web applications and how the WebSocket spec aims to solve them. In this blog post we’re going to cover how to use WebSockets to create real-time web applications. Try our program out with a free seven-day trial today. If you’re looking to take your programming skills to another level, Treehouse offers unlimited access to a variety of courses starting at $25/month.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |