marp | theme | class | ||
---|---|---|---|---|
true |
default |
|
Learn about architectural backend design principles, challenges, real-world applications, while offering a detailed understanding of when and how to implement them.
- Senior Software Engineer
- Content Creator (@TheAltF4Stream on Twitch and YouTube)
- Diagram & Flowchart Artist
- Habitual Problem Solver
Find me online:
- Engineering Blog: https://altf4.blog
- Twitch: https://www.twitch.tv/thealtf4stream
- Twitter: https://www.x.com/thealtf4stream
- YouTube: https://www.youtube.com/thealtf4stream
- Started with frontend (2+ years)
- Followed curiosity to backend (2+ years)
- Continued curiosity to fullstack (2+ years)
- Found passion in DevOps & Platform Engineering (4+ years - current)
Take your first steps into DevOps guided from the perspective of a developer! Improve software teams’ ability to build and ship software reliably.
Learn to set up large-scale systems with GitOps and optimized CI/CD workflows. And see strategies to standardize your organization's approach to AWS resource management and dynamic cloud orchestration.
- Define "what" backend system architecture designs are
- Define "when" to use backend system architecture designs
- Define "how" to implement backend system architecture designs
- Explore "common" backend system architecture designs
- Show "evolution" of a backend's system architecture
- Basic understanding of software development
- Basic understanding of backends vs. frontends
- Basic understanding of how to create backends
"Success begins with understanding. Before we lay a single brick, it is crucial that we fully grasp the blueprint, for a thorough comprehension of the foundation leads to a structure that stands the test of time."
- The process of defining the modularity, interfaces, and data flow for a system to satisfy specified requirements.
- Architecture designs provide a structured approach to solving complex problems, making it easier to understand and manage the overall system.
- Architecture designs facilitate communication among team members by providing a common language and reference.
- Architecture designs can improve efficiency and productivity by reducing redundancy and facilitating code reuse.
- Architecture designs play a key role in ensuring that the final product meets user needs and business objectives.
- Modularity
- Scalability
- Robustness
- Flexibility
- Each component of the system should have a specific task.
- Systems should be designed to handle growth of traffic.
- Systems should be able to handle errors or unexpected situations.
- Systems should be designed to accommodate changes or future features.
- Complexity
- Adaptability
- Security
- Technology
- Resources
- Stakeholders
- Handling the intricate details and interdependencies in a system can be complex.
- Designing systems that can adapt to changing business needs is challenging.
- Ensuring the security of data and processes within the system is a constant concern.
- Choosing the right technology stack for the system is crucial and can be difficult.
- Allocating the right resources for the system's development and maintenance can be a challenge.
- Getting all stakeholders to agree on the system's design can sometimes be a difficult task.
"The right time to act is not simply found, but felt. It arises at the intersection of preparation and intuition, where opportunity's whisper becomes too compelling to ignore."
- Understanding "when" to use
- Factoring "when" to use
- Considering "when" to use
- When starting a new project, as "greenfield" scenarios allow for a structured approach from the beginning.
- When scaling an existing system, system designs can be used to identify bottlenecks and areas for improvement.
- When there are complex problems that need to be broken down into manageable parts.
- When there is a need for improved efficiency and productivity - system designs help in reducing redundancy and facilitating code reuse.
- When there is a need for better communication among team members - system designs provide a common language and reference.
- The functionality, performance, security, and scalability needs of the project.
- The experience and skill set of the development team can influence the choice of system design.
- Certain designs may require more resources, affecting the cost of the project.
- Some designs may take longer to implement than others.
- Larger and more complex projects may benefit from certain system designs.
- The ease of maintaining and updating the system can influence the choice of design.
- Keeping track of the latest technological trends can influence the choice of system design.
- Incorporating feedback from users can help improve the system design.
- Understanding the demands and trends of the market can also affect the choice of system design.
- Compliance with laws and regulations may dictate certain aspects of the system design.
"Mastering something isn't a matter of precise science; it's a craft honed through the persistent trial of experience, learning and adapting as we navigate the ever-unfolding journey."
- Research
- Implement
- Iterate
- Identify the primary purpose and scope of the system.
- Understand the needs and expectations of the end-users of the system.
- Determine the functionality that the system needs to provide to meet the end-users' needs.
- Specify the performance levels that the system needs to achieve.
- Identify any constraints or limitations, such as budget, resources, or time.
- Consider the scalability needs of the system - how it can grow and adapt to increased demand.
- Determine any security requirements to protect data and processes within the system.
- Identify any regulatory or compliance requirements that the system needs to meet.
- Specify the requirements for integrating the new system with existing systems.
- Research and testing of new technologies.
- Experimenting with new methodologies and tools.
- Determine if the goal is to improve the system design entirely (innovation) or make small changes where needed (iteration).
- Used for understanding possible explored solutions or ideas which keep the project on path.
- Provide detailed descriptions of the explored systems, including architectures, modules, interfaces, and data relevant to the project.
- Reference for the development team and other stakeholders.
- Facilitate communication and collaboration.
- Chose the appropriate design
- Define the architecture
- Develop the architecture
- Test the architecture
- Deploy the architecture
- Maintain the architecture
- Choose the systems design that best fits the project requirements, team expertise, budget, and time constraints outlined in technical documents mentioned.
- Document the system’s architecture, including its modules, interfaces, and data.
- Begin the development process, ensuring that each component of the architecture is working on its specific task.
- Conduct rigorous testing to identify and fix any bugs or issues and to ensure that the architecture meets the project requirements.
- Once the architecture passes all tests, deploy it in a controlable production environment.
- Regularly update and maintain the architecture to ensure its ongoing effectiveness and to accommodate any changes in project requirements or business needs.
- Involve all stakeholders from the beginning to ensure their needs and expectations are met.
- Use a modular approach to keep the system manageable and understandable.
- Plan for scalability from the beginning to prepare for future growth.
- Design systems to be robust and flexible to handle errors or unexpected inputs and accommodate changes.
- Consider security needs throughout the design and development process.
- Keep up with the latest technological trends to make informed design decisions.
- Incorporate feedback from users to improve the system design.
- Monolithic
- Distributed (service-oriented)
- Serverless
Monolithic architecture is a model where all the necessary code and components for a software application are combined into a single unit.
Monolithic architecture has all functionalities tightly coupled, running in the same system.
This architecture is simple to develop, test, and deploy due to its unified system.
- Simplicity: Easier to develop, test, and deploy due to unified system.
- Consistency: Allows for uniformity in handling requests as every module uses the same set of procedures.
- Efficiency: Since all the functionalities are interconnected, it can be more efficient in terms of inter-process communication.
- Limited Scalability: Scaling specific functions of a system is not possible. The entire system needs to be scaled.
- Lack of Flexibility: Changes to a single component can require the entire system to be redeployed.
- Complexity: The system can become too complex and hard to manage as the application grows.
- Small-scale applications: Given its simplicity, a monolithic architecture is often suitable for small-scale applications or startups where the application's scope is clear and unlikely to drastically change or scale.
- Applications with simple, well-defined business processes: Monolithic architecture can be beneficial in scenarios where the business processes are simple and unlikely to require significant changes or additions.
- Applications where high performance is critical: Since all functionalities are interconnected, a monolithic architecture can provide faster inter-process communication compared to other architectures.
- Generic services and/or microservices architecture is a method of developing software systems that are loosely coupled and independently deployable smaller services, which run in their own processes.
- This architecture allows for continuous delivery and deployment of large, complex applications. It also enhances an organization's capability to innovate and reduces the time to market for new features.
-
"Generic services" often refers to a component of an application that provides specific functionality for the platform.
-
"Generic services" could be part of a monolithic application where all services run within the same process, or it could be part of a distributed system where services may run in separate processes or on separate machines.
-
"Microservices" are a specific style of service-based architecture. In a microservices architecture, each service is small, independent, and loosely coupled.
-
"Microservices" run in their own process and communicate with other "services" using protocols such as HTTP/REST or messaging queues. They can be developed, deployed, and scaled independently, which offers more flexibility than traditional service architectures.
- Independent Development: Each service can be developed independently by a team that is focused on that service.
- Independent Deployment: Services can be deployed independently.
- Fault Isolation: A process failure should not bring the whole system down.
- Mixed Technology Stack: Different services can use different technologies.
- Distributed System Complexity: Developers must deal with the additional complexity of creating a distributed system.
- Development and Testing: Writing and testing applications is more difficult due to it being a distributed system.
- Data Management: Managing data consistency can be challenging.
- E-commerce platforms: They often need to handle high volumes of transactions and user interactions, which can be efficiently managed through independent microservices.
- Social media platforms: The various functionalities like posting, messaging, and notifications can be divided into separate microservices.
- Streaming services: Microservices can help handle the heavy load and deliver smooth streaming experience.
- Online gaming platforms: They can use microservices to manage game logic, player data, and real-time multiplayer interactions separately.
- Large-scale IoT systems: Each device or sensor type can be managed by a dedicated microservice.
Serverless architecture refers to applications that significantly depend on third-party services (backend-as-a-service or "BaaS") or on custom code that's run in ephemeral containers (function as a service or "FaaS").
- Serverless architectures, the app logic is still run on servers, but all the server management is done by the cloud provider (AWS, Azure, GCP, etc). You just need to run your code, and the cloud provider takes care of the rest.
- No server management is required.
- Costs based on usage, not on pre-purchased capacity.
- Automated scaling.
- The architecture can be more expensive for long-term applications.
- Testing can be difficult due to the environment's reliance on the Internet.
- Troubleshooting and debugging is also more complex.
- Real-time file processing: As soon as a file is uploaded in S3, AWS Lambda can trigger a function to process it.
- Real-time stream processing: Perform real-time analytics on data streams using Kinesis.
- Extract, transform, load (ETL): Perform ETL on demand. For example, when a new file is uploaded to S3, AWS Lambda can trigger to process the data and load it into a database.
- Websites: Websites that are purely static (HTML, CSS, JavaScript) can be served from S3 directly.
Most companies and/or projects start with a monolith design for the same benefits mentioned earlier:
- Simplicity
- Consistency
- Efficiency
After a company or project grows there begins the need to "split out" functional logic into units for the following benefits:
- Independent Development
- Independent Deployment
- Fault Isolation
After starting with a monolith, then separating logic with services, a system can further benefit from serverless for:
- No infrastructure management (saves operations costs)
- Costs based on usage (saves resource costs)
- Automated scaling (saves scaling challenges)
Utilizes a microservices architecture to manage its vast operations. Each microservice functions independently, facilitating teams to modify their services without affecting others. This approach has propelled Amazon's scalability and innovation.
Netflix employs a hybrid of serverless and microservices architectures to provide streaming services to millions of users globally. This architecture enables Netflix to manage enormous traffic surges and deliver a smooth user experience.
Cosmos is a computing platform that combines the best aspects of microservices with asynchronous workflows and serverless functions.
Google's search backend engine uses concepts such as monolithic architecture, service-oriented architecture (SOA), and microservices, each of which represents stages in the evolution of backend architectures.
As it expanded worldwide, Uber transitioned from a monolithic to a microservices architecture. Each service, such as ride-hailing, food delivery, and driver-partner services, is managed by a separate microservice. This has enabled Uber to scale and customize its services for different markets.
Effective architecture design is foundational to project success. Emphasize the necessity of thorough planning and understanding of both stakeholder needs and technological capabilities before initiating development.
This ensures alignment with business objectives and user requirements, optimizing both functionality and efficiency.
In the ever-evolving landscape of technology and business, designing architecture with flexibility and scalability at its core is crucial.
These allow a system to adapt to changes in user demand and technological advancements without requiring complete redesigns, thereby saving time, resources, and facilitating sustained growth.
The field of architecture design is dynamic, with new challenges and solutions emerging regularly. Embrace a mindset of continuous learning and openness to innovation.
This approach will not only keep your skills relevant but also enable you to design systems that are robust, adaptable, and forward-thinking.
Find me online:
- Engineering Blog: https://altf4.blog
- Twitch: https://www.twitch.tv/thealtf4stream
- Twitter: https://www.x.com/thealtf4stream
- YouTube: https://www.youtube.com/thealtf4stream