This week, I decided to learn about websockets because they are super cool. According to MDN, websockets “make it possible to open an interactive c...
For further actions, you may consider blocking this person and/or reporting abuse
You inspired me to learn about websockets now, thanks for this!
Oh that's a great subject. I've seen situations where it could make for a much more user friendly experience. Thanks for writing and inspiring me to revisit this option!
I just did some research to see what the current options are when using
.Net
.SignalR seems to be a great tool to start with bi-directional communication. It requires a jQuery plugin to get things working. The advantage is that it provides 'fallbacks' for browsers that do not support websockets.
But with websockets adoption improving, a jQuery plugin might be more than your really need. I would rather use a a library that just relies on websockets.
I've found SignalR to be cumbersome and complicated or may be its just me.
I have tried to create a 'Spike' project several years ago and I arrived at the same conclusion, it felt like more than I bargained for.
But it might be worth another try. Perhaps somebody could suggest a lightweight alternative for
.Net
?Great article Ali, I'm very excited for Socket and realtime material.
I coudnt stop my self to debug this live app, It could be possible with the firecamp.app
Thanks again for the sharing your knowledge :clap: :clap: :clap:
I also think Socket.io is fascinating! I completed a course on PluralSight not too long ago. The course although not entirely about Socket.io, introduced it as a module and I found it interesting!
I'll definitely learn more about it! When they describe it as allowing real-time communication... It reminds me of E-Commerce support chats.
Yeah! It's so cool!
I remember tring websockets before release, in draft10 I think, on PHP, it was ..almost working.
Anyway, if you want to learn about websocket why didn't you used vanilla JS? is easy nowdays, at least you would have learned how they are implemented, and then in a commercial project you would use a library like socket.io.
The program I work for teaches socket.io, so I thought it would be most value for me. Maybe a different week I will look into that.
Nice article, I have build a Realtime code editor project using socket.io called Code-Sync.
It offers a real-time collaborative code editor featuring unique room generation, syntax highlighting, and auto-suggestions. Users can seamlessly edit, save, and download files while communicating through group chat
Thanks for the write-up! I was a little intimidated to look into websockets before, but now I feel like maybe it's something I could tackle.
I tried out your app and I was wondering if there was a way to show filled pixels on load, rather than empty pixels that updated with changes after you loaded. So something more similar to the reddit version where a user could come in and see what has already been drawn.
Awesome! It would definitely be do-able, you would just need to connect a database. I didn't feel like doing so for this quick project, but it would be easy enough to read in those initial values! The Reddit one is actually open source if you are interested in it!
Yeah, websockets are really amazing and easy to use. I used it back in 2015, with Python backend, but I always interested learning how to do the same using Node.js, now I know how, thank you :)
For sure! Did you use Django Channels or something else?
I used Tornado, it was simple enough for my purpose. I had no experience with Django back then anyway ;)
Nice! Love it! Thank you.
Great post! thanks!
Ali, you should look into WebRTC next. It enables direct 'peer to peer' communication between clients without a server in between. :)
Ah, awesome, thanks! I hadn't heard of this!
Well written.