Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Node.js Blueprints
  • Table Of Contents Toc
  • Feedback & Rating feedback
Node.js Blueprints

Node.js Blueprints

By : Krasimir Stefanov Tsonev
4.7 (10)
close
close
Node.js Blueprints

Node.js Blueprints

4.7 (10)
By: Krasimir Stefanov Tsonev

Overview of this book

A straightforward, practical guide containing step-by-step tutorials that will push your Node.js programming skills to the next level. If you are a web developer with experience in writing client-side JavaScript and want to discover the fascinating world of Node.js to develop fast and efficient web and desktop applications, then this book is for you.
Table of Contents (14 chapters)
close
close
13
Index

Exploring WebSockets and Socket.IO

Let's say that we want to build a chat feature. The first thing that we should do is to develop the part that shows the messages on the screen. In a typical scenario, we want these messages to be delivered fast, that is, almost immediately after they were sent. However, if we don't use sockets to receive the data from the server, we need to make an HTTP request. Also, the server should keep the information till we request it to do so. So, imagine what would happen if we had 10 users and each one of them starts sending data.

We need to maintain a user session in order to identify the user's requests. These problems are easily solved if we use sockets. Once the socket is opened, we have a long live channel, and we can send messages back and forth. This means that you can start receiving information without requesting it. The architecture is analogous to a big net of bridges. The bridge is always open, and if we need to go somewhere, we are...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Node.js Blueprints
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon