Book Image

Socket.IO Real-time Web Application Development

By : Rohit Rai
Book Image

Socket.IO Real-time Web Application Development

By: Rohit Rai

Overview of this book

<p>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.<br /><br />"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.<br /><br />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.<br /><br />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. <br /><br />This book will introduce you to all that is needed in browser-server communication to develop the next generation of interactive applications and games.</p>
Table of Contents (16 chapters)
Socket.IO Real-time Web Application Development
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Acknowledgement

Writing a book, especially your first one, is an uphill and demanding task that cannot be accomplished by a single person without support from several others, and this book is no different. I would like to thank everyone who has played a role in helping me write this book or helping me reach the point where I could think of writing my own book. Though I cannot mention all the people by name, I am heartily grateful and indebted to everyone. However, I would like to mention the people who have played a directly important role in this book.

First of all, I have to thank my father and his elder brother, my uncle, who together, played the most important role in my personal and academic development. They inscribed on my mind, the importance of learning and knowledge above all else in life.

I would like to thank my wife, Paridhi, and my brother, Rajat, for bearing with my tantrums and idiosyncrasies, and still understanding and supporting me during my long hours of work and writing. I couldn't have pulled it off without them. The other very important person that I need to mention is my cousin, Shiti, who was always reviewing the book, giving exceptional feedback, running, debugging, and correcting the code for me, and also taking over quite a bit of my workload and my projects whenever she could. I have to thanks all my friends and cousins who played an important role in my upbringing, and who understood my missing all their parties and celebrations all the time.

I have to thank my friends, partners, and founders at my two ventures, Satyaprakash at TupleJump and Guillermo at Happymer, who have unconditionally supported me through the writing of this book and coped with me missing meetings and running slow at work from time to time.

I thank Pramati Technologies, the place where I learned most of what I know today and spent most of my career. I thank Jay and Vijay Pullur for starting this wonderful company; it is one of the very best places to work at.

I have to thank my managers, mentors, and guides at Pramati, specially Ramesh Loganathan, Chandrasekhar Sivaram, and KVP who have taught me a lot. All of them helped develop particular skill sets within me, without which I could never have written a book or started my own company. Chandru and KVP gave me the freedom to choose my projects, run my teams my way, and also the support to build Matisse and socket.io.play. Ramesh, who was the first published author I got to know in person, is my inspiration to write. Talking about mentors, I owe my professional success to Vivek Lakshman, my manager at Cordys and SocialTwist, my mentor, protector, guide, and above all, a friend I probably didn't do much to deserve. He has always challenged me to set higher goals for myself and then supported and pushed me to achieve these targets. The positive energy that he brings to any conversation helps boost the morale of everyone around.

My thanks go to everyone at Pramati for helping me, assisting me, and guiding me from time to time. I must thank my friends and colleagues, Apurba and Sunny (now at Sprinklr), who have always challenged me to learn more, explore more, and keep improving from time to time. Sunny was the one who forced me to dig deeper in JavaScript and functional programming during our SocialTwist days. And Apurba is someone from whom I have learned a lot; I still feel like a student in his presence.

The acknowledgements for a book on any technology would be incomplete without thanking the creators. I am thankful to Ryan Dahl, the creator of Node.js and Guillermo Rauch, the creator of socket.io, and the countless open source contributors to these and other enabling technologies, without whom these projects, and in turn this book, would have been impossible.

Last but not the least, I have to thank the team of editors and reviewers for this book. I thank the editors at Packt, Manali, Harsha, and Esha, who have been very good to me, understood the challenges for a first-time writer, and been considerate with delays and shuffling of deadlines. I also thank the reviewers who have done an excellent job of pointing out what is missing in the book, correcting the mistakes, and reviewing the code. Thank you guys, you have been great!