Socket IO Rooms Tutorial (Backend part 1)

  Рет қаралды 43,061

Coding With Chaim

Coding With Chaim

Күн бұрын

Пікірлер: 97
@thegoodgolly1465
@thegoodgolly1465 3 жыл бұрын
Seriously appreciate this. Idk if you're just on my wavelength but this makes the most sense out of the socket IO and rooms tutorials I've seen so far. You quickly and perfectly explain what you're doing and why you're doing it without going overboard, and even though I'm working on an app that's not the same as the chat you make in this tutorial, I'm actually able to follow along and pick out or edit as needed without losing functionality.
@atticus2581
@atticus2581 2 жыл бұрын
Damn, ussualy i speed these things up and had to check I hadnt increased playback speed, this guy talks fast! I like it!
@roodyridar2706
@roodyridar2706 4 ай бұрын
me too 😂
@hermitanotherant2930
@hermitanotherant2930 3 жыл бұрын
Just adding a callback to the original socket message is genius. Far more elegant than having to respond with a whole new message. Thanks!
@tahsinalmahi8769
@tahsinalmahi8769 10 ай бұрын
Great tutorial. Thanks a lot!
@p_o_z_e
@p_o_z_e 8 ай бұрын
This is still such a good video, super useful.
@number1neek
@number1neek 3 жыл бұрын
Thanks for the video. Really well explained! One bit of constructive criticism though - I like the fast pace but at times it sounds like you're rushing and some words are hard to understand. I had to check I didn't have you set to 1.5x speed lol
@chriscalver8595
@chriscalver8595 Ай бұрын
That was awesome. Love that you speak fast.
@serjio8781
@serjio8781 4 жыл бұрын
You've totally nailed this socket io stuff! Looking forward to the client side part :)
@CodingWithChaim
@CodingWithChaim 4 жыл бұрын
Thank you! Well I certainly hope the client side part won’t disappoint
@VamsiKrishna-yt5hi
@VamsiKrishna-yt5hi 3 жыл бұрын
I think it is not safe for the server to call a function passed by a client. That function could be anything. Moreover, you are revealing to the client that you are using a Javascript backend.
@brunobuss7005
@brunobuss7005 3 жыл бұрын
this guy speaks so fast, i love it
@aleksandrmatyka3118
@aleksandrmatyka3118 2 жыл бұрын
It's the best explanation that I've seen
@Whitetail
@Whitetail 3 жыл бұрын
Thank you very much. This is an amazing tutorial, very well explained. You helped me save a lot of time.
@christianangelomsulit3759
@christianangelomsulit3759 3 жыл бұрын
Set speed to 0.75 and everything for me is now clear
@thelitterateman
@thelitterateman 3 жыл бұрын
slow down bruhh. M here to learn, but you're on a train.
@eloy_777
@eloy_777 3 жыл бұрын
You can just watch it slowed to x0.75, the video won't be that longer
@sashaikevich
@sashaikevich Жыл бұрын
1337. What a throwback ! Great pace for your vid. What do you do when you’re not making KZbin vids, got a blog or something I can read?
@ozzyfromspace
@ozzyfromspace 3 жыл бұрын
Hey Chaim! This was a magnificent video, thank you so much for putting this beauty together! 🏆🎊🙌🏽 I'd like to voice an educated guess: the client-side defined callback may be a security risk. I'm thinking that a highly motivated attacker could reverse engineer your build js file and alter the callback to do something malicious, and it will run on your server regardless. That's my immediate thought, but I'll have to watch the next video to see how you do the cb. I read it in the docs a few weeks ago but I didn't understand it then. Do you have an opinion on this? Again, phenomenal explanation of the "rooms" concept! 💯😎
@jonahg6564
@jonahg6564 4 жыл бұрын
Amazing! Keep the content flowing!
@yasteelgungapursat8159
@yasteelgungapursat8159 2 жыл бұрын
Explanations are on point👌🏻 but damn I thought the video was sped up🤣
@mentalmodels5
@mentalmodels5 3 жыл бұрын
10:16 wouldn't that be insecure? Since people can modify the client javascript and execute another function?
@williamduncan7401
@williamduncan7401 3 жыл бұрын
if your function is e.g. `console.log` this will not trigger `console.log` on the server, just on the client. it's literally like emitting a response back containing the function name and arguments and the client calling the function, but it's a built-in thing to save you that client-side code
@saadbaig3060
@saadbaig3060 2 жыл бұрын
Very Well Explained! You got a new subscriber, Thanks.
@GHOST-fe3cu
@GHOST-fe3cu 2 жыл бұрын
you make my adhd very happy
@CodingWithChaim
@CodingWithChaim 2 жыл бұрын
Haha happy to help
@gurkanucar
@gurkanucar 2 жыл бұрын
Thanks a lot! By the way, cb(callback) is equal to ack. It may cause confusion because I am applying this in the java spring boot application and I couldn't find anything about the callback. So just i wanted to mention it. Thank you again :)))
@prathameshpatil5860
@prathameshpatil5860 2 жыл бұрын
This is awesome but I have a question if I wanted to remove a user from channel(room) how can I do it??
@ikibkilam8383
@ikibkilam8383 3 жыл бұрын
Very cool! Thank you for doing these videos. Btw, I think the link to the code repository for this video is not correct.
@ikibkilam8383
@ikibkilam8383 4 жыл бұрын
Awesome video. Incredibly lucid.
@deeperealms
@deeperealms 3 жыл бұрын
Really awesome tutorial! I am kind of concerned about the security of letting the client send a callback function to run on the server though. I've just been getting deeper into security, so maybe I'm paranoid, but it seems very vulnerable to some sort of code injection?
@ЖукОбычниик
@ЖукОбычниик 3 жыл бұрын
I don't agree with you passing a callback function from the clinet side this is literally the most dangerous thing you can do because hackers
@ЖукОбычниик
@ЖукОбычниик 3 жыл бұрын
@Amir Moeen Rahmani well you see whet he does is he gets a function from the user and executes it on the backend but the user can put whatever malicious code he want in that function with that the hacker can: crash your backend, make a never ending loop preventing the backend from functioning properly, steal all the data he wants, and the list goes on. This dude is legit letting anyone send a function to the backend that will get executed even I with 0 hacking skills could crash his backend
@CodingWithChaim
@CodingWithChaim 3 жыл бұрын
This is the docs from socket.io talking about this approach. socket.io/docs/v3/emitting-events/ Scroll down to Acknowledgements I should also mention that there is no risk here because this is not code that executes user code. A good example where one more worry about executing user code is with the common xss attack. For example, you have a blog, and then you have comments, now a user can make a comment have a script tag and then add their own javascript to this script which will execute on your website. This works because when you render a script tag, the code within executes. In this case however, you are not taking user entered data and passing it along to an environment that can execute this code. Hope this helps clear things up.
@ЖукОбычниик
@ЖукОбычниик 3 жыл бұрын
@@CodingWithChaim But can I not write a regular node script that will connect to the server and emit an event with the malicious function?
@mindglimpse559
@mindglimpse559 Ай бұрын
@@ЖукОбычниик When the server executes the callback provided by the client, it is essentially sending a message back to the client that triggers the client's function. The server does not run the client's code directly.
@princeanujk
@princeanujk 3 жыл бұрын
Amazing Content...💕 Just Watch @ 0.75x Playback Speed...
@zoksss5323
@zoksss5323 2 жыл бұрын
I have a question. So basically, when user joins, you push its username and id to usernames array, which contains all users. But what happen if user leaves and his info still stays in array? I'm doing something simmilar with pushing room code which is a object with few details and users insde that room eg. "123" = {leaderId: "", isLocked: false, sockets: []} , but when all users leave, i want to destroy that room object, but idk how to do it properly, or is it even possible, or shoud I change whole system for better one, since Im still new to socketio?
@DoctorMandible
@DoctorMandible Жыл бұрын
What's the advantage of using express when you're also using socket?
@ivaylosilovski5529
@ivaylosilovski5529 3 жыл бұрын
Great content! Keep it on going :)
@CodingWithChaim
@CodingWithChaim 3 жыл бұрын
Thanks! Will certainly keep it going
@_MoshikoAz_
@_MoshikoAz_ Жыл бұрын
thank you Chaim, can you please provide git source ?
@rezaulmasum205
@rezaulmasum205 4 жыл бұрын
hey If I would like to access socket in another page like I have multiple controller, how can we pass it to different pages?
@nom21304
@nom21304 3 жыл бұрын
imagine him rapping :o
@nickvelos9571
@nickvelos9571 3 жыл бұрын
Bruf he has surpassed Eminems level of speed speaking
@realzoogies
@realzoogies 2 жыл бұрын
awesome video 👍
@theunknownclone8084
@theunknownclone8084 3 жыл бұрын
Great video!!!
@maheshmahadar4780
@maheshmahadar4780 3 жыл бұрын
in my website i cant use @t on multiple pages. is it valid or not i am doing ?
@ouss
@ouss 4 жыл бұрын
Can you do one with the twilio video rooms API, its easier
@CodingWithChaim
@CodingWithChaim 4 жыл бұрын
Can certainly take a peek into it
@ouss
@ouss 4 жыл бұрын
@@CodingWithChaim It would be great and quick in just 10min
@hanibal43
@hanibal43 4 жыл бұрын
always love your vids! would love to see you make more vids on javascript and react
@CodingWithChaim
@CodingWithChaim 4 жыл бұрын
Thank you! Do you have a specific topic in mind you’d like me to cover?
@hanibal43
@hanibal43 4 жыл бұрын
@@CodingWithChaim personally I would love to see a full react application using all the react features but as practical components something you would see in real life.
@hanibal43
@hanibal43 4 жыл бұрын
Would even be great as a separate course explaining the behind the good of the js side
@capenburbank9307
@capenburbank9307 3 жыл бұрын
new to programming here, but learning fast. This has been the best information so far and exactly what I've looked for! You explain everything in depth and it's really quite helpful, I'll be tuning in much more frequently from now on!
@CodingWithChaim
@CodingWithChaim 3 жыл бұрын
Glad you find the content helpful
@henryho952
@henryho952 3 жыл бұрын
Great Content! Thanks! Subscribed! :)
@josephmenasandoval3419
@josephmenasandoval3419 3 жыл бұрын
why you dont use rooms of socket io ? socket io has a buided function
@andresbr92
@andresbr92 4 жыл бұрын
Very nice video. Thank you a lot
@CodingWithChaim
@CodingWithChaim 4 жыл бұрын
You’re very welcome
@oyerindejoshua9365
@oyerindejoshua9365 2 жыл бұрын
pls where is the part two
@Lordaniel-K
@Lordaniel-K 2 жыл бұрын
מדהים
@ashishafk
@ashishafk 3 жыл бұрын
can you please slow down a little its quite fast for me tbh. otherwise video is very helpful.
@kumar_sanjeevdutta1069
@kumar_sanjeevdutta1069 9 ай бұрын
Really great, but you speak too fast, I am native Hindi speaker and thank God KZbin has this slow video speed feature 🙏🙏
@rezaulmasum205
@rezaulmasum205 4 жыл бұрын
Will you make any video on private chat ?
@CodingWithChaim
@CodingWithChaim 4 жыл бұрын
Would you mind elaborating a little more about what you mean?
@rezaulmasum205
@rezaulmasum205 4 жыл бұрын
@@CodingWithChaim Like there is a list of user in a chat room, but I would like to chat with an specific user. Private chat
@CodingWithChaim
@CodingWithChaim 4 жыл бұрын
This video covers that too
@ayikkathilkarthik4312
@ayikkathilkarthik4312 3 жыл бұрын
That was an awesome explanation.
@martinn1071
@martinn1071 3 жыл бұрын
Great stuff. Thanks! You might wanna add a beat in the background...it would also make a great rap improv.... Just saying.... Thanks again ! Cheers
@ikibkilam8383
@ikibkilam8383 3 жыл бұрын
Simply awesome! Quite easily, the best channel on youtube.
@CodingWithChaim
@CodingWithChaim 3 жыл бұрын
Thank you!!
@x4r7
@x4r7 2 жыл бұрын
this is the first video where i need to slow down to 0.75
@milada424
@milada424 3 жыл бұрын
9:16 dude's a rap god
@evoqqqq
@evoqqqq 3 жыл бұрын
Great tutorial! Could you please update the github repo because the code from part 1 & 2 is not included. Best regards, evoq!
@muhammadhamzahaneefqureshi5016
@muhammadhamzahaneefqureshi5016 4 жыл бұрын
Millions subscribers on the way. Great stuff as usual. 😊
@CodingWithChaim
@CodingWithChaim 4 жыл бұрын
Thanks! I sure hope so 😉
@shiffyfriedman7185
@shiffyfriedman7185 4 жыл бұрын
I agree! Great content!
@MrPoppshot
@MrPoppshot 3 ай бұрын
I thought my video was on 2x speed.
@softultraviolence5673
@softultraviolence5673 2 жыл бұрын
great video! But man, you sound like a texan auctioneer
@jcfiedalan8172
@jcfiedalan8172 3 жыл бұрын
You can beat Eminem :)
@zxcyuu6141
@zxcyuu6141 3 жыл бұрын
Sir, your server.js on github is empty, i wanna know how callback function works.
@blameItleaveit
@blameItleaveit Жыл бұрын
bro is rapping
@ikoLinh
@ikoLinh Жыл бұрын
hablas rapidísimo, pensé que sabia ingles😅
@lucifer4386
@lucifer4386 3 жыл бұрын
im trying to make a clone (on a small scale) of discord and believe me this really helped
@HeyNelsonn
@HeyNelsonn 3 жыл бұрын
Could you teach us how to deploy these apps on Heroku?
@geraldomaga
@geraldomaga 3 жыл бұрын
Are u sure that you belong to this planet earth?
@jackmiddleton2080
@jackmiddleton2080 2 жыл бұрын
1337... My man.
@CodingWithChaim
@CodingWithChaim 2 жыл бұрын
You’re the first person to comment on this easter egg
@Je3f0o
@Je3f0o 2 жыл бұрын
Eminem?
@mod7ex_fx
@mod7ex_fx 2 жыл бұрын
shalom
@shreyanmehta6999
@shreyanmehta6999 2 жыл бұрын
didnt needed to make its speed faster
Socket IO Rooms Tutorial (Part 2 Frontend)
27:21
Coding With Chaim
Рет қаралды 12 М.
Learn Socket.io In 30 Minutes
27:27
Web Dev Simplified
Рет қаралды 506 М.
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 58 МЛН
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 27 МЛН
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 32 МЛН
VAMPIRE DESTROYED GIRL???? 😱
00:56
INO
Рет қаралды 7 МЛН
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 720 М.
Socket.io Introduction - How to Build a Chat App
21:38
Dave Gray
Рет қаралды 41 М.
98% Cloud Cost Saved By Writing Our Own Database
21:45
ThePrimeTime
Рет қаралды 390 М.
A Jr Dev For Life?? | Prime Reacts
21:33
ThePrimeTime
Рет қаралды 312 М.
The cloud is over-engineered and overpriced (no music)
14:39
Tom Delalande
Рет қаралды 654 М.
WebSockets in 100 Seconds & Beyond with Socket.io
8:31
Fireship
Рет қаралды 1 МЛН
Redis за 20 минут
23:22
suchkov tech
Рет қаралды 147 М.
WebSockets Crash Course - Handshake, Use-cases, Pros & Cons and more
47:33
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,5 МЛН
Being Competent With Coding Is More Fun
11:13
TheVimeagen
Рет қаралды 96 М.
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 58 МЛН