Introduction to Backend Architectures

Distributed Use Cases

Erik Reinert

Erik Reinert

TheAltF4Stream
Introduction to Backend Architectures

Check out a free preview of the full Introduction to Backend Architectures course

The "Distributed Use Cases" Lesson is part of the full, Introduction to Backend Architectures course featured in this preview video. Here's what you'd learn in this lesson:

Erik provides use cases for distributed service-oriented architecture such as e-commerce platforms, social media platforms, streaming services, online gaming platforms, and large-scale IoT systems. He explains how decoupling systems and dividing functionalities into separate microservices can improve performance, scalability, and user experience in these different use cases.

Preview
Close
Get $100 Off
Get $100 Off!

Transcript from the "Distributed Use Cases" Lesson

[00:00:00]
>> Eric: So, we left off on the pros and cons of distributed services and why they're helpful, why they're not. Let's talk about the use cases now. So, distributed service-oriented architecture is really great for at least a few of the ones that I'm gonna be mentioning. But to be honest with you, I encourage all of you to apply these principles and these designs to your own challenges or your own projects that you're trying to do.

[00:00:29]
Like I said, it's not just like a one-size-fits-all here. I'm not telling you that your best opportunity of creating an e-commerce platform is because it's a service-oriented approach, right? Even Amazon started as a monolith, right? It's about understanding where you are and understanding where you wanna be, right?

[00:00:49]
So in a distributed service-oriented design, e-commerce platforms can be very beneficial to use backend system architectures that are distributed. They often need to handle a high volume of transactions and user interactions which can efficiently manage throughout independent microservices. Now, this is a little bit spoiler when we get to it, but this is exactly what Amazon did.

[00:01:15]
[LAUGH] This is exactly why Amazon is so powerful. Is because they slowly started decoupling these systems giving them to different teams, and now Amazon is a multi-billion whatever dollar company, I don't even know what they're worth now, but they're worth a lot. And a big reason for that is coz they moved fast with microservices.

[00:01:37]
They realized where their bottlenecks were. They gave those teams those ownerships, and then they were able to iterate really quickly. Another company that was able to do that is Netflix. That's another reason why both of these platforms have such good user experiences around them. How many times have you seen Amazon's storefront go down?

[00:01:58]
>> Eric: Exactly. And that's why you keep using it. It's kinda the quote from the Social Network, if anyone has seen that movie, I would imagine most of us had, where, what's his name, playing Zuckerberg's character is, do you know what the most important part of the system is?

[00:02:16]
Not going down. Anytime we go down, we lose customer confidence. And that's true especially when you're talking about something that is you wanna buy and sell items, or you wanna have a social network or something like that. If you go down, you lose the confidence of the user.

[00:02:35]
And I'm sure each of us here have dealt with websites or other platforms that went down once and you're, I'm not gonna use this again. Once, that's all it takes, one time, and you lose a user, right? So distributed systems can help with that, especially if you wanna make sure that you have high availability, high uptime, and have good processing within your systems.

[00:02:58]
As I just mentioned, social media platforms are also really beneficial to this too. The various functionalities like posting, messaging, notifications can be divided into separate microservices. For example, every time you get a notification on Facebook or TikTok or whatever, those are all more than likely handled in the background asynchronously under through massive distributed systems so that those don't block other interactions on the platform.

[00:03:27]
Like posting, you don't want to have to wait for a post because a notification is being sent out, right? And so decoupling those systems makes it a lot easier to have a more social, real-time experience, right? Also streaming services. So Twitch, Twitch is a microservice and service-based company.

[00:03:49]
A lot of the things that provide things like the streaming capabilities to what you guys are watching right now on Twitch is a specific part of the infrastructure that processes just the video feed. You don't want your video being interrupted by processing requests on the front end, right?

[00:04:07]
And so that's why they decouple these systems and make it so that they can run independently, so that they can also work on them independently, scale them independently. And in all honesty, scaling video is a much different beast than scaling normal HTTP transactions and things like that. So it helps with the architecture and the design of what you're trying to approach or trying to do.

[00:04:34]
I think overall kind of consensus here is if you're doing a lot of stuff. If your platform is doing a lot of things, then microservice and service distribution or architecture could be valuable to you. Because you don't wanna have one system impact the performance of another system, which impacts your user experience, right?

[00:04:59]
So this is why some of the biggest things out right now, like e-commerce, again, Amazon, social media platforms like Facebook or whatever else. And streaming services like Twitch and YouTube have these separations and these different logical components is to make it so that they can scale to the amount of people that are using them.

[00:05:23]
Twitter as well, I guess, [LAUGH] I'll mention Twitter. [LAUGH] One other thing is also online gaming platforms. Now I wanna note with this one, and why I'm not directly including these, because I know for a fact that there are a lot of game developers potentially watching right now that would go, that is not accurate.

[00:05:45]
If you're building a game server that's gonna go to one service and you're not wrong, right? You're not wrong, however, you can build a distributed gaming platform and it could be beneficial if so. Even games like what World of Warcraft or highly MMOs, multiplayer games, things that require a lot of servers and a lot of different regions and sharding and things like that.

[00:06:13]
Those do require distribution still because of the scale that they're trying to produce for. And so that is equally its own challenge of how do you synchronize game state across services? How do you make sure that users go to the right most local server to be able to have the best player experience?

[00:06:30]
But they're still distributed in the sense that they're separating like game logic from player data from real-time data interactions and stuff like that. So even games like Call of Duty, right, things like that will have a certain level of distribution in how they work. But I wouldn't be surprised if gaming platforms still had monoliths in specific places that make sense, right?

[00:06:56]
Right, okay, cool, yeah. Just to make sure. Cuz again, if you're talking about a video game, movements are requests to the server. Every time you move that's a request, every time you shoot something, that's a request, every time you do whatever, that's a request as well. And scaling that vertically versus horizontally can be easier to do, especially if you're trying to make sure performance is key.

[00:07:23]
Also, large-scale IoT systems, so this is something that's kind of really getting out in the world. We still haven't really fully gotten comfortable yet with IoT systems, but yeah, any kind of device or sensor type can be managed by a dedicated microservice. If you've ever been curious about like Alexa and its system, it's very distributed.

[00:07:46]
And it's also very microservice-oriented because of the interactions and how they happen. They utilize things like serverless as well for that. So each interaction is in its own nice service or serverless function. And so again, we're talking about scale, the key overall theme here is scale, right? You're doing a lot, you're working with a lot, and so distributed services can really help with that if that's what you're trying to solve for.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now