5:17 - 6:42 I was listening without watching and I thought I was having a stroke or deja vu lol Had to go back and check that I wasn't crazy
@Michael-ri8sg4 жыл бұрын
Hahahahahha I was watching at 2x speeds sounds funny as hell
@re0xey4 жыл бұрын
I think he was supposed to edit that part out but he didn't.
@popey45254 жыл бұрын
Hahahaha
@packagemain4 жыл бұрын
LOL, I am really sorry for that. Yes, this had to be cut out :)
@asadawadia4 жыл бұрын
More so than the actual tutorial what stood out to me was that you write some really really clean code
@honeywu6862 Жыл бұрын
should have met your videos earlier! i'm new to Go, didn't expect how clean and elegant to implement the server in Go. It should cost much much more time dealing with Linux-C apis if i do it in C++, and not to mention the messy things with poll/select stuffs. GO for the future!!
@squ34ky3 жыл бұрын
This was fantastic! More like this, please. Thank you.
@aa-gc9wc4 жыл бұрын
I need more of your tutorials, they are very high quality
@slicken3 жыл бұрын
cmon Alex.. miss your videos. Please dont give up on uss! make more GO videos
@acronproject Жыл бұрын
Thanks for this useful content Me. Pliutau
@bikhoda65083 жыл бұрын
Excellent tutorial. BTW, what are the pros and cons of tcp over websokets for making a chatroom?
@dingdong27524 жыл бұрын
Love your content! Please come back and create more golang content,. thank you!!
@김기범-i4d2 жыл бұрын
Thank you very much :) You are my God
@mtdrip95234 жыл бұрын
how would this approach scale if you had 10.000 clients ? i know its abit strange with a chatroom with 10.000 members but thinking if theres a smarter way of doing broadcast () than running from start to end as the last members would experience some delay if we assume ex the chat was sending an image or something larger than a text ?
@gyuyoungpark55092 жыл бұрын
it is the best TCP chat example!
@imagineabout41532 жыл бұрын
Amazing tutoria. Just a curioisty... are the go routines getting closed after quitting?
@packagemain2 ай бұрын
yes
@imagineabout41532 ай бұрын
@@packagemain cool thanks
@dmitryvozniuk3 жыл бұрын
Great! Thank you man.
@MINGLI-w1h Жыл бұрын
This is a great video! What are you use font, tell me please~~~ Thank you.
@jesuszunigaamador32262 жыл бұрын
I don't understand how to execute it at the end. you have to download the telnet package I guess but how or where? I'm lost I'm new to GO.
@TuxGnome4 жыл бұрын
love this your channel, if you have plans on making a course on Go (with hands on real world stuff), you def got me!
@packagemain4 жыл бұрын
What are thinking of? Series of articles?
@TuxGnome4 жыл бұрын
@@packagemain video courses, maybe start something on Udemy to build up audiences and then move to your own platform or if you already have an audience try teachable.com. Personally I couldn't find any quality videos on Go and specially the topics you cover such as this one or the previous video on how to create an API client.
@packagemain4 жыл бұрын
Sounds good. Need to plan the course and what would go there
@venuarremsetty24254 жыл бұрын
@@packagemain Firstly, I really appreciate the content you have published, it 's much needed content. Thank You. A course which is a quick refresh for a beginner and then provides all the things that enables a beginner go programmer to transition from learning basics to implementation of the concepts to Pursue as a CAREER. Most of the beginner level courses; presents concepts, examples and more examples. SO, what next? is starting a server in Go termed advanced concepts? Creating a file, opening a file, reading a file advanced concept? Deploying a simple app using Heroku advanced concept? and many more... May be a mini project of a web app from start to finish? Create blueprint for common use cases pertaining to work with files, work with databases, algorithms and etc. With focus on teaching production ready code? Following could be the end goals of your course for the student: 1. Make job ready (within an year) 2. Make easy transition from other programming language to Go But surely, there is a gap and there is a need for a course to happen.
@connor55672 жыл бұрын
Would it be possible to use a proxy library to route communications over Tor?
@packagemainАй бұрын
Yes, I believe so.
@cubiccode38675 ай бұрын
Great video man, thanks for the content. One thing that I think would be better is if you made a more iterative process, running and testing as you build the application.
@packagemain3 ай бұрын
Thanks for the idea!
@MaximRovinsky2 жыл бұрын
Крутое видео, понравилось. Спасибо Алекс
@ScalpingTradingSchoolReal2 жыл бұрын
You are great man!!! СПАСИБО!
@soaring_dove4 жыл бұрын
yu awesome human being, COME BACK WITH THE NEXT ONE SOON !
@iamundefinedv4 жыл бұрын
Great content. Keep it up.
@alfonsovargas8578 Жыл бұрын
How we can add authentication for securing the connection?
@packagemain2 ай бұрын
Good question. I think you can implement it yourself and ask for password first before continuing.
@giorgizazadze13372 жыл бұрын
It doesn't work on my end :(
@shun62843 жыл бұрын
Can you make tutorials for UDP also?
@ScalpingTradingSchoolReal2 жыл бұрын
Please make more videos for newbies!!!)))
@abiodun68974 жыл бұрын
Please create a course for golang for beginners ❤️
@JoseMonteverde3 жыл бұрын
watching the advanced stuff sometimes helps you understand more, but only sometimes
@zeldris62183 жыл бұрын
Thanks a lotttt
@anjalipc86494 жыл бұрын
Thank you Sir.
@rsrini74 жыл бұрын
Thanks for good content and explanations. Please show us first demo how the chat application works and then do code, may help to catch quickly while watching the coding part.
@stokeslmao8272 Жыл бұрын
quality stuffs
@UAStriker4 жыл бұрын
thank you!
@vladimirm11264 жыл бұрын
Great montage!
@aa-gc9wc4 жыл бұрын
If you type '/join' I think the server crashes
@avechess3 жыл бұрын
It's right.
@packagemain3 жыл бұрын
ok, I have fixed the issue. We didn't validate the args slice. Added some simple validation.
@avechess3 жыл бұрын
@@packagemain Thanks for editing. Are there any other questions. Can this chat simultaneously serve 1,000,000 clients? 1. How much RAM is needed for this? 2. What processor frequency is required? 3. Does this Go chat account for the number of CPU cores? There is another problem with the program. When a client completes a connection other than "/quit", the client socket remains in memory. Memory is not cleared, there is a memory leak.
@packagemain3 жыл бұрын
Good question. I didn’t run tests. For a high load it’s better to use some centralized DB instead of in-memory map. So we can deploy multiple instances of this server.
@avechess3 жыл бұрын
@@packagemain The database introduces its own performance limits.
@ardiansyahrukua30203 жыл бұрын
Awesome
@viczking85202 жыл бұрын
thank you for your code
@hhellohhello4 жыл бұрын
very nice
@jarriabidi14384 жыл бұрын
thanks for setting up gofmt lol
@Matt-xs1xt4 жыл бұрын
Can you run this on Windows?
@packagemain4 жыл бұрын
Yes, TCP and telnet are not specific to Unix only
@avechess3 жыл бұрын
Thanks for the nice Go tutorial! But there is a remark. This Chat Server on Go keeps the connection of clients only in the local network stably. If the client connects from the global network, then the connection lasts for about one minute and is terminated. Tell me who knows how to avoid this. Этот чат-сервер на Go поддерживает стабильное соединение клиентов только в локальной сети. Если клиент подключается из глобальной сети, то соединение длится около одной минуты и завершается. Подскажите, кто знает, как этого избежать.
@avechess3 жыл бұрын
Adding. If the client periodically (for example, every 5 seconds) sends a short message, the connection is not dropped. As far as I understand it has to do with global routers. Can the server itself maintain a connection without messages from the client? Добавление. Если клиент периодически (например, каждые 5 секунд) отправляет короткое сообщение, соединение не разрывается. Насколько я понимаю, это связано с глобальными роутерами. Может ли сам сервер поддерживать соединение без сообщений от клиента?
@ricochetojosdemiel4 жыл бұрын
Interesante
@alexandervasilenko77734 жыл бұрын
Rooms and members in memory? Not so good idea because of the service limitations as a whole... Probably it's the reason for such implementation - educational only. Am I right? At least all the rooms should be persisted. For example in redis (cluster). In addition it's nice to have an interface for persistent storage with the appropriate implementation(s). In addition, broadcast messaging is havy operation so it would be nice to 'go' using by some strategy pattern impl?
@packagemain4 жыл бұрын
Totally agree, memory for educational purpose only, I mentioned this at the end. Calling broadcast in he background is a good idea also!
@baxiry.4 жыл бұрын
I guess there is not much difference between storing it on a map of Golang or Redis. Both are stored in RAM. Yes, redis can store on disk In case of production, a disk copy must be made I think a key/value store like Badger would be more useful.