Free Sample
+ Collection

Building Scalable Apps with Redis and Node.js

Joshua Johanan

Develop customized, scalable web apps through the integration of powerful Node.js frameworks
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783984480
Paperback316 pages

About This Book

  • Design a simple application and turn it into the next Instagram
  • Integrate utilities such as Redis,, and Backbone to create Node.js web applications
  • Learn to develop a complete web application right from the frontend to the backend in a streamlined manner

Who This Book Is For

If the phrase scalability sounds alien to you, then this is an ideal book for you. You will not need much Node.js experience as each framework is demonstrated in a way that requires no previous knowledge of the framework. You will be building scalable Node.js applications in no time! Knowledge of JavaScript is required.

Table of Contents

Chapter 1: Backend Development with Express
Node.js and Node Package Manager
Using Express in Node
Using middleware in Express
Adding templates to the mix
Using sessions in Express
Processing forms
Very simple authentication
Setting up a config file for our app
Methods to extend an application
Chapter 2: Extending Our Development with Socket.IO
Node package versions
Building a simple Socket.IO app
Broadcasting a message
Using the disconnect event
Creating namespaces
Adding rooms
Using namespaces or rooms
Using namespaces and rooms together
Using Socket.IO and Express together
Adding application-specific events
Using Redis as the store for Socket.IO
Socket.IO inner workings
Ideas to take away from this chapter
Chapter 3: Authenticating Users
Node package versions
Let's build our authentication
Registering a Facebook application
Using Passport to authenticate to Facebook
Using Google for authentication
Adding Google authentication to our application
Adding more OAuth providers
Adding secure local authentication
Password-storing theory
OAuth process
Chapter 4: RabbitMQ for Message Queuing
Node package versions
Getting RabbitMQ
Our first message queue
Sending messages back
Adding message queues to PacktChat
Message queuing in RabbitMQ
Chapter 5: Adopting Redis for Application Data
Node package versions
Installing Redis
Using Redis data structures
Redis schema
Redis persistence
Using Redis as a message queue
Adding Redis to PacktChat
Redis is for application state
Chapter 6: Using Bower to Manage Our Frontend Dependencies
Node package versions
Installing and using Bower
Introducing React
Introducing Backbone
Chapter 7: Using Backbone and React for DOM Events
Bower package versions
Finishing Socket.IO
Creating React components
Backbone models
The Backbone router
Putting it all together
Updating CSS and the layout
Adding a new worker
Trying out our application
Chapter 8: JavaScript Best Practices for Application Development
Node package versions
Setting up tests
Setting up different environments
Introducing Grunt
Static files and CDNs
Scripting our new tools
Chapter 9: Deployment and Scalability
Creating servers on EC2
What is Ansible?
Chapter 10: Debugging and Troubleshooting
Node packages
Using Chrome Developer Tools
Inspecting requests
CPU profiling our application
Taking heap snapshots

What You Will Learn

  • Build and implement your custom middleware for Express
  • Integrate Socket.IO with Express and use the same authentication
  • Create a secure local store for passwords
  • Use message queues to break down your application into manageable pieces
  • Leverage the power of Redis to create a shared state across many different servers
  • Implement Backbone, Socket.IO, and React together for a fast, dynamic, and real-time frontend
  • Automate your build process with the use of the Grunt.js task runner
  • Build deployment scripts to get servers running your application in the cloud

In Detail

Node.js is a JavaScript runtime-based, scalable platform used to develop web applications and network programs on the server side. It allows web designers to access the backend of their projects while also allowing developers, who are willing to learn JavaScript, a chance to design. There are many frameworks that have popped up in recent years, but what makes Node.js unique is that it opens up a whole new frontier for web development and takes a hybrid approach.

This book will help you get to grips with Node.js and implement the knowledge to build efficient web applications. You start with developing a backend web application followed by a frontend interface, and later on deploy it to the cloud platform. This book takes a holistic approach to server-side programming using Node.js in conjunction with different frameworks and tools.


Read More