
Learn real-time communication with socket.io 3.x and Angular 11.x, delivering live updates across multiple clients without polling through hands-on projects like livestock updates and a Margo DBI server app.
Decide if this course suits you and learn real-time communication with socket.io in Angular apps, covering socket concepts, server and client roles, and API usage.
Prepare your development environment for real-time communication with Socket.IO 3.x and Angular 11.x by installing Visual Studio Code, Angular CLI, and Mongo DBI community server on Windows.
Explore socket.io, a real-time, bi-directional, event-based library for server-browser communication. It offers reliability, auto-reconnect, heartbeat, binary support, multiplexing, and room-based broadcasting via namespaces.
Explore the socket.io api for server and client, covering events, middleware, namespaces, rooms, emitting, and broadcasting messages between server and client.
Develop a first socket io application with express js, creating a server that emits fake stock values for Apple, Google, and Microsoft to a browser client.
Set up a Socket.IO server with Express, create a random stock values module, and emit Apple, Google, and Microsoft stock updates to clients every five seconds.
Build a real-time socket.io client in Angular, wiring a stocks service and component to show Apple, Google, and Microsoft stock values via RxJS observables.
Create an angular application using ng new with no routing and bootstrap styling, install socket io client and bootswatch, and set up a stocks module, service, and component.
Implement real-time stock updates by building a stocks service that uses RxJS observable and a Socket.IO client to listen for Apple, Google, and Microsoft stock events.
Build an Angular component that injects the stocks service, subscribes to Apple, Google, and Microsoft values, and renders real-time updates in a stock table.
Explain why two clients show different stock values in a socket.io angular app due to separate connections and blocking vs non-blocking operations in Node.js, highlighting the event loop and timers.
Broadcast stock updates to all clients by using socket.io namespaces and rooms, creating a default / namespace and a stocks room joined by the angular service.
Modify the Socket.IO server to create a namespace and a stocks room, handle join events, and broadcast periodic stock updates (Apple, Google, Microsoft) to connected clients.
Modify socket.io client to connect to the namespace, join the stocks room, and receive stock values, updating the Angular 11 app to display the stock array with a loading message.
Demonstrate real-time stock updates by broadcasting messages from a socket.io server to all connected Angular clients via a stock namespace, and preview upcoming MongoDB integration for sort and fetch operations.
Migrate socket.io 2.x apps to 3.x by upgrading both client and server and configuring cors, origins, methods, cookie handling, and namespace behavior.
this demo shows avoiding implicit connections to the default namespace in socket.io 3.x by connecting directly to the live namespace, with logs showing default namespace connection and live namespace connection.
Migrate socket.io 2.x to 3.x part II covers removing implicit default namespace, eliminating join/leave callbacks, and replacing with socket.on. Namespace.client's list becomes namespace.allSockets and returns a promise, with 11.x examples.
Demonstrates migrating a simple socket.io server to 3.x, updating dependencies, configuring origin and get/post methods to serve an Angular 11 client, and running the updated server on localhost:4200.
Demonstrate migrating a simple socket.io client from 2.x to 3.x in an Angular 11 app by updating dependencies, registering allowed commonjs dependencies, and using the socket.io 3.x namespace export.
Learn to set up a socket.io 3.x default namespace connection in an angular 11.x project, including middleware, a namespace configuration with origins and allowed methods, and a sample migration-driven workflow.
Demonstrates migrating a client app to socket.io 3.x with Angular 11, updating configuration and dependencies, and shows the default namespace is not connected during migration while retrieving livestock values.
Build a real-time online pizza order app with socket.io and a MongoDB server, using results and pizza orders collections to display live status and counts.
Explore MongoDB as a scalable, document-oriented database with community servers and cloud options. Create databases and collections, insert documents, and leverage indexing and real-time aggregation in a distributed database system.
Learn to write MongoDB queries using the mongo shell: create databases and collections, insert multiple documents, and fetch data with find and findOne, using pretty for readable output.
Create a pizza order socket.io app using Express and Socket.IO. Establish a Baeza namespace, connect to MongoDB, fetch all documents from the exults collection, and emit them to clients.
Build a real-time socket.io pizza orders app by writing an aggregate group-by query on the pizza orders collection and broadcasting counts to the orders room in the pizza namespace.
Create an Angular 9.x pizza order application by creating a new Angular app, installing socket.io client, and building a pizza module with a service and models.
write the service logic to connect to the socket io server, import models, and create observables that listen for bizarre list and example orders, then emit new pizza order events.
Add an Angular component integrated with a Socket.IO service, fetch documents via an observable, and display them in a table with images and currency formatting.
Place an order for the selected pizza and display a live count of orders from customers in a separate table. Use an observable, subscribe, and submit orders via the service.
Test the real-time output of the angular app against a socket server on port 90902, ordering pizza via the order now button, updating counts across two browser instances.
Discover a real-time update challenge in an app used by multiple clients, where order counts fail to refresh across mobile and other apps until a manual refresh.
Migrate the pizza order service from socket.io 2.x to 3.x by updating package.json and configuring cors options with origin and methods, then run the server and ignore the known warning.
Migrate the pizza order ui from socket.io 2.x to 3.x in an angular 11 app, update the client package and services, and adopt new observable syntax to verify real-time updates.
Explore data synchronization with MongoDB change streams, watching a collection to push updates to socket IO dashboard, while a customer app updates data via REST API using replica set.
Discover how to set up a MongoDB replica set, initialize it, create a new database, and add two collections—Engy Questions and Angular Roots—and insert documents into the Energy Questions collection.
Create a rest API with Node.js and Express.js to fetch data from the energy questions collection, send it to a customer app, and store results in the Angular Works collection.
Develop the REST API data access layer by connecting to MongoDB via the mortgages connector, implementing a class with get all Angular questions and insert into Angular collections using promises.
Configure two routes in an Express router to fetch all Angular questions and post votes, using a data access layer and middleware.
Create a client front end using Angular, enable routing, choose the default css, and integrate Bootswatch Bootstrap styles for the end user voting app.
Build a Ward module in angular app by adding a module, service, two components, and two models to fetch questions and voting data, following the folder structure.
Write the service logic by configuring the http client, injecting it into a world service, and connecting to rest endpoints to fetch questions via an observable and post world data.
Build an angular 11 component that loads questions via a service, displays them with radio options in a form, submits a vote object, and navigates to a thank-you page.
Explore the single page application structure with a home component and a navigation menu, using lazy loading, routes, and a router outlet to load modules.
Configure two routes in the routing module and enable lazy loading with loadChildren, updating the app routing module; then wire the navigation router link to the feature path.
Create a socket.io server with express to stream real-time vote aggregates from MongoDB change streams and push updates to the Angular client for display with high charts.
Build an express and socket.io app that runs an aggregate query on the angular warts collection, grouping by technology name and emitting results to the dashboard namespace, with change streams.
Create an in-house client dashboard UI with Angular 9.x to visualize the Angular votes and aggregate data. Install socket.io client, highcharts, and highcharts-angular, and run the app on port 3000.
Create a dashboard module inside the dashboard folder, then add a dashboard service and a dashboard component.
Write the dashboard service logic to connect to the socket IO client, expose an observable of aggregate data received from server events, and handle error events.
Explore the single-page application code for the client dashboard, including the home module, dashboard home component, navigation module, dashboard menu component, bootstrap menu, and the router outlet in Angular routing.
Explore integrating the Highcharts library with an Angular application using the Highcharts Angular wrapper, configuring the options to render bar, line, or area charts.
Visualize real-time Angular vote data using a Highcharts column chart in the dashboard, pulling average votes from the dashboard service via sockets and updating the chart when new data arrives.
Configure the dashboard route and implement lazy loading in an Angular 11.x app by creating a dashboard routing module and wiring a router link in the navigation menu.
Test and visualize real-time dashboard updates using socket.io and angular 11.x, switch chart types, set chart width to 100%, and display KPI chart with colored lines.
Perform a migration of real-time applications from Socket.IO to 3.x using Angular 11.x across voting, dashboard, and client UI, including CORS setup and client-server integration.
Explore real-time communication with socket.io, covering server and client APIs, namespaces, and rooms for live updates across customer facing and organization apps.
Have you ever thought of building real-time communication applications for your clients or in your organization? Are you tired of writing the same old long polling logic to get the updates from your databases? Do you want to share live updates of the data across two or more than two applications? Do you work with live stocks or tweets kind of applications?
As you know our clients or customers would like to get quick and live updates of the information like stocks, currencies, the sales data, tweets etc. Or they want to build live collaborative applications for the customers/in-house applications. This is where we can think of Real-time Communication and we can achieve that using one of the most popular library Socket.IO. Easy to learn and easy to implement.
This course is a complete hands-on course where we will take few real-time scenarios and develop several applications step-by-step. At the end of this course, you will have better understanding of Socket.IO library and you will be able use this library to build RTC applications.
Update - This course has been updated to Socket.IO 3.x and Angular 11.x
All the examples of this course has been updated from Socket.IO 2.x to Socket.IO 3.x. Also, all the client applications have been migrated from Angular 9.x to Angular 11.x.