Stateful vs Stateless Applications (Explained by Example)
Vložit
- čas přidán 11. 06. 2024
- If you ever wondered the difference between stateless and stateful applications, REST, horizontal scaling versus vertical scaling? We tackle those in a small example. Hope you guys enjoy this quick video. We explain the advantages and disadvantages of each application.
0:00 Intro
1:14 Stateful Application
8:40 Stateless Application
Online diagram tool used in this video: Http://www.gliffy.com
Checkout the rest of the content for more software engineering topics by example.
🏭 Software Architecture Videos
• Software Architecture
💾 Database Engineering Videos
• Database Engineering
🛰 Network Engineering Videos
• Network Engineering
🏰 Load Balancing and Proxies Videos
• Proxies
🐘 Postgres Videos
• PostgresSQL
🧮 Programming Pattern Videos
• Programming Patterns
🛡 Web Security Videos
• Web Security
🦠 HTTP Videos
• HTTP
🐍 Python Videos
• Python by Example
🔆 Javascript Videos
• Javascript by Example
Stay Awesome
-Hussein Nasser
www.husseinnasser.com - Věda a technologie
If you were my professor, I would be ready to sit in your lecture for hours. Beautiful explanation
Nikhil Balwani im humbled ❤️ thanks
If he were my professor, I would be sitting at FAANG now.
And you would land any job you want, he exolains concerts with simplicity and efficiency
Check out my new video about stateful apps czcams.com/video/EKCM1oQQrCM/video.html
Watch the new 2019 video Stateless vs Stateful python 🐍 application code examples czcams.com/video/nhwZn6v5vT0/video.html
Even 3 years later this explanation is one of the best on the web. Thanks a bunch mate!
Check out my udemy Introduction to Database Engineering course
database.husseinnasser.com
Learn the fundamentals of database systems to understand and build performant backend apps
Man am I glad I found someone that really knows how to really explain something. Great video ! 👍🙋♀️
Thank you Claire 🙏 I am glad you enjoyed the content and found it helpful
This video makes a lot of other web app concepts so much more clearer. Thanks a mil!
I work full time as a software developer, I stumbled across this while doing some research, and what can I say? you have an amazing character. Well explained :)
Matthew Spiteri Thank you so much for your wonderful comment. Glad to see fellow software developers here. Best of luck !
Been programming over a year and never realized the correlation between REST and Stateless. Mind = blown. THANK YOU.
nice video! i really appreciate videos like this that talk about real concepts/use cases in a simple way that you can watch on down time. keep at it cause it looks like the videos you're making are really cool!
mollycrime Thanks! I try to give examples where I can from my personal experience working with a technology. Appreciate it!
2:44
4:41 introduction to the problem of stateful application
5:50 problem: impossible to scale up
6:10
6:51 stateful with load balancer
8:36 stateless example
8:52 Alice is using REST, State transfer
11:14 server sends Alice a *token*
11:34 then Alice will send request always with the token
wow, indented sub-chapters. CZcams should support MD for comments. 🔥🔥
you sounded like u're having a great time explaining this! i can really listen to you speak in a lecture . awesome job!
Thanks Shi! And Yes I absolutely enjoy software engineering. Thanks for your comment ❤️
This is the best tutorial I have ever seen in my life. I'm awed!.
I can listen to on any topic you teach, I love your teaching style and voice. I am so glad I came across this channel.
Brilliantly and Concisely explained! Thanks a Lot HN!
dude just thanks, really helped to quickly get a grasp of it
Stateful Example: 1:10
Stateless Example: 8:30
Stateless vs Stateful pros and cons: 13:30
ونعم ابوعلي
I am hooked to your videos and as a junior back end developer i am learning a lot seeing things from different perspectives in my job. Thankyou so much
It's no longer over my head. Thanks
Brilliant explanation champ! I've watch about 3 or other videos (each being 2 or 3 times longer) and NOT ONE of them came close to explaining it this comprehensively! Well don and a sub from me!
I'm on a marathon of your videos man. Awesome content
Enjoy 😊
This was amazing man!! Loved the way you impart things to the viewers!! High Five!
Plain and simple. Thanks Hussein
Sending a long ass token of appreciation all the way from India !! Great & Interesting explanation.Thank you !!
Shubham Batham sending a signed and time-stamped response token of love to all my subscribers in india ❤️ passcode to decrypt “stay awesome” thanks for your comment!!
This is the best explaination on youtube
Your explanation is far more better than my college lecturer
God bless you sir, when no one could explain me this thing...u did it in such a simple way. And yeah that accent of ur's its awesome....I can listen to your lectures for hours
Great video Hussein. Thanks for the example.
It is worthy of investing 14 minutes of your life. Thanks Hussein
your channel is a gem!
Thank you very much for your videos , I dare anyone to watch you explaining a concept whatever the complexity of the concept and not understand it ❤❤❤
just learned about load balancers too bless you ser!!!!!!!!
Thank you for simple explanation
very clear and easy to understand by the excellent explanation. Thank you so much.
I finally understand this! Thank you
Very well explained! keep the videos coming!
very well explaining, thank you man !
You explained nicely.. Thanks a lot.
This is outrageously good. Thank you, mate!
15 mins of awesome ! Thank you !
Very well explained. Good Job Bro. It clears my concept for stateful and stateless 🌹
Best explain ever..Many thanks
🙏
Very helpful video, thank you!
Excellent explanation! Good job.
Just amazing explanation bro!
Thank you for a great explanation
Wow ! Simply an amazing explanation, now only I understand what it means 'State Transfer' in ReST, thanks, keep explaining.
Awesome Video ! Glad I found this - I am VERY NEW to Web Dev and this broke this complex subject down easily :) THANKS
Natalie Schulz Glad you find was useful, checkout the rest of the content in the channel where we explain other software engineering topics by example. Cheers :)
Really beautiful explanation !! Thank you so much
I enjoyed it, simple and clear explanation.,
loved it. You made it clear to me. Thanks and yes, I subscribed.
Mukesh Singh Rawat thanks Mukesh! Glad I could help and welcome to the community!! Enjoy the content
Good Explanation..Thank you
Just logged in to comment a word of appreciation. Glad I found this channel. Beautiful content
Appreciate it ❤️❤️
Very well made. Thanks for the explanation.
Thanks so much for this video tutorial.
Nice work, appreciate the overview.
Wonderful explanation
Thanks a lot! It was crystal and clear explanation. Easy to understand. Subscribing you!
Thanks for the sub! appreciate you dear enjoy the content
I am from Electrical background still understand it, nice explanation with diagram.
Nice explanation ..Thank you
thank you so much that's so helpful
That's some cool explanation.
Very good explanation, i want you to teach a whole class of everything i want to learn!!!!
best teacher man.
Hi Hussein, thanks for your channel. I really appreciate the work you are doing on this.
For this video, I would like to know if in the case of stateful app, is it possible to use an "intelligent" LB such that the requests for a given user go always to the same server. In this way we can also have a cache into the servers for their users given that we know they will always use the same one? Something like consistent hashing?
Thanks!
Awesome video, I understand most of the good points of stateless, I guess making a web application whether a session is an important concern but not important at scaling we probably would use php session as a way to maintain the session or any other programming that gives us this set of tools. but regarding the we wouldn't scale horizontal, thanks man
Kevin Montalvo Flores exactly well said. It is a trade off that you as a software engineer/architect make.
Your explanation made me feel really "cool" and "lit" because I was able to understand this 😂 Definitely giving this video a like! 👍
Jordan Theisen Jordan you are cool and definitely lit 🔥 thanks for your comment!
Very well explained, thank you ;)
Great video!!! Thanks a ton Sir!
You are a great teacher many thanks!
I try! thank you so much for your lovely comment
Sir, you really explained well. I am a 9th-grade student and I was completely able to understand what you meant.
Interesting explanation!
You’re the man! Great video my dude, the examples were spot on. Are you independent or do you work at a software company?
Hantzley Audate thanks buddy for the nice comment! I work at a software company called Esri. I do these videos on the side :) glad you like the content!
Great Vids and Great explanation , Love From Indonesia
Steven Humam thanks! Much love to all my Indonesian subs you guys rock!
this is amazing channel
Great..... friend your teaching is very GOOD..... Thanks.
Jk Sharma :) :) glad You like it! Thanks!!
Nicely explained in simple way... with real time login application use case scenario.....
Glad you enjoyed it! I made another video about how Amazon Alexa is stateless maybe you will enjoy that as well czcams.com/video/zhwMv5RxGew/video.html
very good explanation, thanks
❤️
Oh, man...Wonderful!
outrageously good l:D like it ! best way to spend my component afternoon at work on something ludicrous lol
Imad Amahmid haha glad I could provide education and entertainment thanks for watching
Thank you for this
But in a stateful app, the server still has to use cookies to authenticate or recognize the user, and when you meant we have to hit the db every time to query for the token, it sounds pretty bad, but isn't that information also cached somewhere to tie in with the cookie expiry, because if were to really look at it sometime a single page might send around 20 to 30 requests to get different information from a stateless backend(REST) but it cannot afford to authenticate the user 20 times right ?
Excellent explanation Hussein.....
تسلم علي مجهودك
شكرا بلال
Good Explanation.. keep up the good work :)
Nagendra Babu thanks dude! Appreciate it
love it..explain so clear
Santosh G glad it was clear to understand! Thanks for your comment
Such a cool teacher! :D
Thanks very much you are amazing
Great explanatio I think nowadays JWT solved the problem of querying db each time we make request.🤔
Thanks for the video -- this is helpful .
Is oAuth stateless since there we are using token ?
Arijit Nag Chowdhury with OAuth2 yes the protocol became easier at achieving statelessness using JWT (Json Web Token) :)
Done ✔️ thanks for knowledge 🙏
great explanation
Great..... Thank you
Very nicely explained thankyou...
gaurav vijan thanks for your nice comment sir! Glad you enjoyed the video
Great video!
If you replacte the DB and using the same DB replications for the same Microservice replication the statefull-problem will be solved?
Hey Nasser, your video is simply superb. Hatsoff. As your voice is BOLD and STRONG, one thing i visualised you as you will look like "Vin Diesel". By seeing your DP, then i realise you. Take a Bow.God bless you....:-)
Raghu Vardhan Saripalli Raghu 😍😍 thanks my friend
Doesn't something like "Reliable Collections" solve the scaling issue for stateful (at least for Service Fabric devs)?
What if we use Sticky connections in the load balancer ? Could it work properly if we scale Stateful applications horizontally ? Putting aside eventually crashes on servers that may not occur frequently.
Augusto Napuri that would work and would scale nicely. As you said if the server crash the client will have to login again since they will hit a new server.
Another disadvantage is if the server is overloaded and latency dropped as a result its difficult to move client to another server in a smooth manner.
Great video! Thanks
Toufik Kannab :)