Great time to watch the tutorial. Gorilla toolkit was archived for the past 8 months. But 2 days ago it became active again after new maintainers took over. No better time to watch this.
Thank you! It's great. In two hours I've learned a lot. It's high quality course. I don't have much experience in coding, but I doubt I could have thought of some things on my own.
@@initialized glad you mentioned I my mic, I know it sucks! I am so happy to say that I have bought a Mic & Lightning ! Just trying to fix a virtual green screen or physical one! Thanks for mentioning it, so that I can improve
Simply Fantastic, helps me a lot.i came here reading your medium post, Thanks a ton brother for the amazing content. I have a question though... I am building an Android game using kotlin in the front end and i am planning to choose Go at the backend and obviously I wil be using websockets, this video helped !!
Great tutorial! Looking forward your other tutorials! Too bad that your mic isn’t great. I think your content is so good that I would gladly swish 30-50 kr towards a new microphone. :)
Hey! Hmm no part 2 planned. I do have an article on using Redis for PubSub, maybe I can update it Abit and Record that video. Only exists as text atm. programmingpercy.tech/blog/redis-as-a-pub-sub-engine-in-go/
@@programmingpercy I'm a junior developer well, i'm still studing this engineering, but you help me a lot!!, i made a CRUD with your tutorial, you are the best
When we say that Gorilla 'Connections only support one concurrent reader and one concurrent writer', does this mean that for *each* client connection we can only have one goroutine reading messages and one gorountine writing messages via a channel? Obviously, if we have multiple clients, there will be an equivalent number of reading and writing goroutines - but I assume this is not what the restriction is referring to?
Great question! To clarify, the gorilla connection is not safe to have concurrent writers. This is only true for writing, data into the connection. They have an example in their source code with a lot of comments that explains this if you'd like a more in depth explanation. So in short, we simply cannot spawn multiple goroutines that all tries to write on the same time. It might work at first glance, but there is a race risk going on. That's why we instead send messages on a Channel, and then send those one at a time. To prevent concurrent writes.
Firstly Thanks and Nice explained !! BTW I have one question, how do we handle the web socket connections in Distributed system (like multiple instance are running for the same service)
Great question. At the point where you start running multiple instances, it is common to include Redis or RabbitMQ to allow distributed messages for the websockets. You would then listen on the PubSub schema used and push messages on RabbitMQ/Redis, then read from those topics and push onto the Websockets.
This is proof that all great coding videos are made by guys with 10$ webcams and 1$ microphones because they're too busy actually working, and most greatly produced content is made by influencers who don't really know what they're talking about.
Gorialla websocket is limiting to only 1 concurrent connection at a time, is this limitation only for Gorilla websocet or its same for other Go web libraries as well ?
I know that the x/net/websocket supports multiple, but that package is also deprecated and frozen. That package has trouble with defragmented frames tho. I can't speak for gobws since I haven't used them.
Let me make this clear, it's only limited to one concurrent WRITE, and this shouldn't pose an issue if implemented correctly, it scales pretty good. So I don't think many people have had an issue with that.
Thanks for this, learnt a lot! I just have one question, how would you structure rooms? I dont want to broadcast mesaages to every client, I just want to send message to clients in a group. One thing I was thinking to do something like `/ws/{room_id}` and then clients will automatically be in a group thenI dont have to do any special in my code to handle rooms. Is this a correct assumption? EDIT- Okay, I just tested this,. it doesn't work this way xD
No way, man! It's not even that hard. You mustn't have coded along with the video. This video is a gem. I spend like a day watching this tutorial for my chat application and I guess I've implemented the websocket part of the application effectively. I implemented something similar after watching the video, an event based websocket system, but with slight differences. Instead of using OTP, I'm using JWT for authorization, MongoDB for storing user details and messages (I'm not using any message queues or stuff for now as it might add unwanted complexity to the program), and gin frame work to stick everything together. If you are not a video person, just read his blog. It's much easier to follow along. Also, try to understand the logic behind websockets and how to utilise it. Then implement it in your own way, which you will find is much easier to maintain the code base. Happy coding!
No worries man, no offense taken. It's really hard to create content that fits everybodies needs. One might find a tutorial progressing too fast whilst others find it way to slow. But if you don't mind me asking, what in particular made it hard for you to follow? Is it to fast? Would you like deeper explaining on what's going on? It would be great to know so I can improve future videos
Bruh The video shows at the beginning that he expects viewers to be ‘somewhat familiar with go’ You need to build your basics before you could reach the skill level for this video No hate is good, you better come back and rewatch after you progress
I like gorilla much, there was a bit trouble when the maintainer decided to archive it. But since then it has gotten a group of new maintainers and is in a good place. I'd stick with Gorilla,
Great time to watch the tutorial. Gorilla toolkit was archived for the past 8 months. But 2 days ago it became active again after new maintainers took over. No better time to watch this.
I would like to thank you for this amazing, detailed tutorial. This is exactly what I'm looking for. You're a lifesaver.
Thank you for letting me know you enjoyed it!
Thank you! It's great. In two hours I've learned a lot. It's high quality course. I don't have much experience in coding, but I doubt I could have thought of some things on my own.
extremely well done and complete example, great job sir!
Thank you sir, glad you enjoyed
@@initialized glad you mentioned I my mic, I know it sucks!
I am so happy to say that I have bought a Mic & Lightning !
Just trying to fix a virtual green screen or physical one!
Thanks for mentioning it, so that I can improve
Hi I`m beginner in websockets and your video helped me to better undestand how to use gorilla building simple messengers.Your video is awesome!!
Thank you Yegor! Glad i could help
best golang ws chat tutorial, thanks a lot !!
Thank you for the kind words
thank you for this tutorial! I really appreciate that you invested your time to make this video.
I think it's now like a sixth time I watch the "this is fairly fairly simple, I believe" part and finally I think I dare to move on. :D
thank you very much i learn a lot thank to your video
This tutorial is awesome and explained so well - thanks
Big thanks for the kind words
Very clear. Very helpful.
Thank you for the kind words, thrilled to hear you enjoyed
Thanks for the step-by-step guide!
Wow ,Thank you so much for sharing the amazing content, liked 👍 and subscribed
This is a great tutorial, thanks you!
Amazing tutorial. Thank you
Simply Fantastic, helps me a lot.i came here reading your medium post, Thanks a ton brother for the amazing content.
I have a question though...
I am building an Android game using kotlin in the front end and i am planning to choose Go at the backend and obviously I wil be using websockets, this video helped !!
Great tutorial! Looking forward your other tutorials!
Too bad that your mic isn’t great. I think your content is so good that I would gladly swish 30-50 kr towards a new microphone. :)
Awesome work bro
This is absolutely amazing, thanks nigga !!!
Oh man, the way you're using Go routines and methods and structs... Struggling to keep up with everything :D
Awesome tutorial! I have one question, your pong/pong handling, from what I can tell its not doing anything if the client stops sending pongs back.
Great video!
Micro from DDD video was definetly better btw
Great video and topic
many thanks
Just what i was looking for, Thanks! is there a Part II? connecting to an external data storage (redis)?...
Hey!
Hmm no part 2 planned.
I do have an article on using Redis for PubSub, maybe I can update it Abit and Record that video. Only exists as text atm.
programmingpercy.tech/blog/redis-as-a-pub-sub-engine-in-go/
@@programmingpercy thanks 🙏 reading it right now
Thanks bro!, yau are the best!
Nah, you're the best!
@@programmingpercy BROOO two weeks developing for my company, and your tutorial was my handbook, you help us a lot with the structure of our system
@@programmingpercy I'm a junior developer well, i'm still studing this engineering, but you help me a lot!!, i made a CRUD with your tutorial, you are the best
When we say that Gorilla 'Connections only support one concurrent reader and one concurrent writer', does this mean that for *each* client connection we can only have one goroutine reading messages and one gorountine writing messages via a channel? Obviously, if we have multiple clients, there will be an equivalent number of reading and writing goroutines - but I assume this is not what the restriction is referring to?
Great question!
To clarify, the gorilla connection is not safe to have concurrent writers.
This is only true for writing, data into the connection.
They have an example in their source code with a lot of comments that explains this if you'd like a more in depth explanation.
So in short, we simply cannot spawn multiple goroutines that all tries to write on the same time. It might work at first glance, but there is a race risk going on.
That's why we instead send messages on a Channel, and then send those one at a time. To prevent concurrent writes.
Firstly Thanks and Nice explained !!
BTW I have one question, how do we handle the web socket connections in Distributed system (like multiple instance are running for the same service)
Great question.
At the point where you start running multiple instances, it is common to include Redis or RabbitMQ to allow distributed messages for the websockets.
You would then listen on the PubSub schema used and push messages on RabbitMQ/Redis, then read from those topics and push onto the Websockets.
@@programmingpercy thanks👍
This is proof that all great coding videos are made by guys with 10$ webcams and 1$ microphones because they're too busy actually working, and most greatly produced content is made by influencers who don't really know what they're talking about.
Wow those are some really nice words!
Thanks!!!
Gorialla websocket is limiting to only 1 concurrent connection at a time, is this limitation only for Gorilla websocet or its same for other Go web libraries as well ?
I know that the x/net/websocket supports multiple, but that package is also deprecated and frozen. That package has trouble with defragmented frames tho.
I can't speak for gobws since I haven't used them.
Let me make this clear, it's only limited to one concurrent WRITE, and this shouldn't pose an issue if implemented correctly, it scales pretty good. So I don't think many people have had an issue with that.
Hi, I want to use go to connect to the asterisk server.
I want to ask in what moment data insert to c.egress in ReadMessages 1:10:00?
Thanks for this, learnt a lot! I just have one question, how would you structure rooms? I dont want to broadcast mesaages to every client, I just want to send message to clients in a group. One thing I was thinking to do something like `/ws/{room_id}` and then clients will automatically be in a group thenI dont have to do any special in my code to handle rooms. Is this a correct assumption? EDIT- Okay, I just tested this,. it doesn't work this way xD
sound is sick but good presentation
I am making sure to fix the sound for future videos! Thanks!
Gorilla? It is deprecated.
Yeah! Video was made before that!
I have in mind to create a new one but I haven't decided on which OS solution I like best amongst the others.
@@programmingpercy It's archived, but so what. It hasn't changed for many years, and it works. I wouldn't worry about using it.
It's just if there is any RFCs that gets out that might be scary.
@@programmingpercy cant wait, this video got me to understand websockets in go
It is active again
old stuff 🎉
Gorilla is dead.
Actually that's not true
www.reddit.com/r/golang/comments/1528e25/gorilla_web_toolkit_new_maintainers_announcement/?
It's alive again
Thanks brother, have a good day
didn't understand anything even after spending 3 days to watching this tutorial
No way, man! It's not even that hard. You mustn't have coded along with the video. This video is a gem. I spend like a day watching this tutorial for my chat application and I guess I've implemented the websocket part of the application effectively. I implemented something similar after watching the video, an event based websocket system, but with slight differences. Instead of using OTP, I'm using JWT for authorization, MongoDB for storing user details and messages (I'm not using any message queues or stuff for now as it might add unwanted complexity to the program), and gin frame work to stick everything together. If you are not a video person, just read his blog. It's much easier to follow along. Also, try to understand the logic behind websockets and how to utilise it. Then implement it in your own way, which you will find is much easier to maintain the code base. Happy coding!
@@codeunited5905 no I was coding alongside the video but didn't understand anything. It's my personal opinion, no hate to you or your channel.
No worries man, no offense taken.
It's really hard to create content that fits everybodies needs.
One might find a tutorial progressing too fast whilst others find it way to slow.
But if you don't mind me asking, what in particular made it hard for you to follow?
Is it to fast? Would you like deeper explaining on what's going on?
It would be great to know so I can improve future videos
@@programmingpercy I'm a beginner in golang, so most of the concepts were confusing for me
Bruh
The video shows at the beginning that he expects viewers to be ‘somewhat familiar with go’
You need to build your basics before you could reach the skill level for this video
No hate is good, you better come back and rewatch after you progress
Man what do I use gorilla mux or socket io for golang ?
I like gorilla much, there was a bit trouble when the maintainer decided to archive it.
But since then it has gotten a group of new maintainers and is in a good place.
I'd stick with Gorilla,