Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Real-time Communication using Socket.IO 3.x and Angular 11.x
Rating: 4.3 out of 5(26 ratings)
230 students

Real-time Communication using Socket.IO 3.x and Angular 11.x

Learn how to use Socket.IO 3.x library for RTC with Angular 11.x Client applications
Last updated 3/2021
English

What you'll learn

  • Basics of Socket IO library
  • Understand Socket IO Server and Client APIs
  • Understand the problems which you will face while building RTC applications and solutions for each problem
  • Database communication using Socket IO
  • How to broadcast messages when data is updated out of Socket IO applications
  • Learning Server and Client side Socket IO APIs by build number of applications using Express and Angular 9.x frameworks

Course content

4 sections59 lectures6h 48m total length
  • Introduction3:32

    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.

  • Who should take this course?2:25

    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.

  • Tools and Software required for this course1:31

    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.

  • Introduction to Socket.IO11:00

    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.

  • Let's understand Socket.IO API10:38

    Explore the socket.io api for server and client, covering events, middleware, namespaces, rooms, emitting, and broadcasting messages between server and client.

  • Simple example of Socket.IO - Theory5:01

    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.

  • Demo - Simple example of Socket.IO13:39

    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.

  • Creating client application using Angular 9.x - Theory5:48

    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.

  • Demo - Creating client application using Angular 9.x7:08

    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.

  • Demo - Writing service logic6:00

    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.

  • Demo - Writing component logic11:38

    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.

  • Do you see a problem?5:24

    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.

  • Introduction to Namespace and Room5:03

    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 Socket.IO server application6:57

    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 application8:16

    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.

  • Final test of Fake stock update application2:13

    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.

  • Migrating Socket.IO 2.x to 3.x - Part - I8:36

    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.

  • Demo - Default Namespace Connection in Socket.IO - 2x7:00

    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.

  • Migrating Socket.IO 2.x to 3.x - Part - II2:54

    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.

  • Demo - Migrating Simple example of Socket.IO Server3:14

    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.

  • Demo - Migrating Simple example of Socket.IO Client7:02

    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.

  • Demo - Default Namespace Connection in Socket.IO - 3x2:34

    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.

  • Demo - Default Namespace Connection client app in Socket.IO - 3x3:56

    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.

Requirements

  • Good knowledge of Angular 7/8.x and should have experience of building REST APIs using Express framework
  • Basic understanding of Bootstrap framework [Optional]

Description

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.

Who this course is for:

  • Students who want to learn Real-time communication using Socket IO library to enable various scenarios in their applications
  • Students who want to understand why, where and how to use Socket IO library using various examples