Socket.IO Real-time Web Application Development

Rohit Rai

  • 出版商: Packt Publishing
  • 出版日期: 2013-02-11
  • 售價: $1,170
  • 貴賓價: 9.5$1,112
  • 語言: 英文
  • 頁數: 140
  • 裝訂: Paperback
  • ISBN: 1782160787
  • ISBN-13: 9781782160786
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

Build modern real-time web applications powered by Socket.IO

Overview

  • Understand the usage of various socket.io features like rooms, namespaces, and sessions.
  • Secure the socket.io communication.
  • Deploy and scale your socket.io and Node.js applications in production.
  • A practical guide that quickly gets you up and running with socket.io

In Detail

The expectations of users for interactivity withweb applications have changed over the past few years. No more does the user want to press the refresh button to check if new messages have arrived in their inbox; people expect to see updates in their applications in real-time. Mass multiplayer online games have given up the requirement of plugins and are built entirely in JavaScript. Socket.io enables you to build these highly interactive applications that work cross-browser.

"Socket.io Real-time Web Application Development" is a guide to building, deploying, and scaling highly interactive real-time web applications using socket.io. This book will guide you through the building of a chat system using Node.js and socket.io, helping you get familiar with various features of the framework. Going further it will empower you to deploy and scale your applications in production.

Introducing web application development with Node.js, this book walks you through developing of a full-fledged chat system built with socket.io and introducing all the concepts of socket.io and its usage in the process.

It introduces you to the different approaches of bidirectional communication between the browser and the web server and will show you how socket.io abstracts all this for you to provide a single unified and uniform API for messaging and eventing to develop cross-browser applications. It explains how to authenticate your users, segregate the communication to channels, build chat rooms, and handle and scale sessions. It explains the mechanics behind socket.io and it also introduces you to what is involved in deploying the application to production and the intricacies involved in scaling it

This book will introduce you to all that is needed in browser-server communication to develop the next generation of interactive applications and games.

What you will learn from this book

  • Establish a bidirectional connection in the browser to the web server.
  • Develop a chat system using Node.js and socket.io.
  • Various methods of pushing information from the server to the browser.
  • Get familiar with socket.io API for cross-browser bidirectional communication.
  • Understand the socket.io protocol and its mechanics behind the scenes.
  • Get to know Socket.io messaging, events, sessions, authorization, namespaces, and rooms.
  • Cluster and distribute the socket.io sessions using redis session store.

Approach

Written in an engaging, easy-to-follow style, "Socket.io Real-time Web Application Development" is a practical guide for developing real-time web applications with Node.js and socket.io.

Who this book is written for

This book is aimed at developers who want to start developing highly interactive and real-time web applications like chat systems or online multiplayer games, or want to introduce real-time updates or server push mechanisms in their existing applications. Knowledge of developing in JavaScript and web applications in general is expected. Though there is a chapter on introducing Node.js, prior knowledge of Node.js will be a plus..

商品描述(中文翻譯)

建立現代即時網頁應用程式,搭載 Socket.IO

概述
- 了解各種 socket.io 功能的使用,如房間、命名空間和會話。
- 確保 socket.io 通訊的安全性。
- 在生產環境中部署和擴展您的 socket.io 和 Node.js 應用程式。
- 一本實用指南,讓您快速上手 socket.io。

詳細內容
過去幾年,使用者對網頁應用程式的互動性期望已經改變。使用者不再希望按下刷新按鈕來檢查收件箱中是否有新消息;人們期望在應用程式中即時看到更新。大型多人在線遊戲已經放棄了插件的需求,完全使用 JavaScript 建構。Socket.io 使您能夠建立這些高度互動的應用程式,並且能夠跨瀏覽器運作。

《Socket.io 即時網頁應用程式開發》是一本關於使用 socket.io 建立、部署和擴展高度互動即時網頁應用程式的指南。本書將指導您使用 Node.js 和 socket.io 建立聊天系統,幫助您熟悉該框架的各種功能。進一步地,它將使您能夠在生產環境中部署和擴展您的應用程式。

本書介紹了使用 Node.js 進行網頁應用程式開發,帶您開發一個完整的聊天系統,並在過程中介紹 socket.io 的所有概念及其用法。

它向您介紹了瀏覽器與網頁伺服器之間雙向通訊的不同方法,並將展示 socket.io 如何為您抽象化這一切,提供一個統一且一致的 API 來進行消息傳遞和事件處理,以開發跨瀏覽器應用程式。它解釋了如何驗證您的使用者、將通訊分隔到不同的頻道、建立聊天室,以及處理和擴展會話。它解釋了 socket.io 的運作機制,並介紹了將應用程式部署到生產環境所需的內容及其擴展的複雜性。

本書將介紹開發下一代互動應用程式和遊戲所需的所有瀏覽器與伺服器通訊知識。

您將從本書中學到什麼
- 在瀏覽器與網頁伺服器之間建立雙向連接。
- 使用 Node.js 和 socket.io 開發聊天系統。
- 從伺服器推送資訊到瀏覽器的各種方法。
- 熟悉 socket.io API 以進行跨瀏覽器的雙向通訊。
- 了解 socket.io 協議及其背後的運作機制。
- 了解 Socket.io 的消息傳遞、事件、會話、授權、命名空間和房間。
- 使用 redis 會話存儲來集群和分配 socket.io 會話。

方法
《Socket.io 即時網頁應用程式開發》以引人入勝、易於理解的風格撰寫,是一本針對使用 Node.js 和 socket.io 開發即時網頁應用程式的實用指南。

本書的讀者對象
本書針對希望開始開發高度互動和即時網頁應用程式(如聊天系統或在線多人遊戲),或希望在現有應用程式中引入即時更新或伺服器推送機制的開發者。預期讀者應具備 JavaScript 和網頁應用程式開發的一般知識。雖然有一章介紹 Node.js,但具備 Node.js 的先前知識將是加分項。