Podcast
Questions and Answers
What is the primary security risk associated with shared kernel vulnerabilities in containerization?
What is the primary security risk associated with shared kernel vulnerabilities in containerization?
Which strategy is NOT a best practice for mitigating risks associated with container breakout?
Which strategy is NOT a best practice for mitigating risks associated with container breakout?
What is the role of the ephemeral read/write layer in a container image?
What is the role of the ephemeral read/write layer in a container image?
Which of the following best describes the function of container runtimes?
Which of the following best describes the function of container runtimes?
Signup and view all the answers
What is the primary purpose of the Open Container Initiative (OCI)?
What is the primary purpose of the Open Container Initiative (OCI)?
Signup and view all the answers
Compromises made in internal quality during system design primarily contribute to which type of technical debt?
Compromises made in internal quality during system design primarily contribute to which type of technical debt?
Signup and view all the answers
Which type of technical debt is most directly associated with shortcuts in testing?
Which type of technical debt is most directly associated with shortcuts in testing?
Signup and view all the answers
Sub-optimal configuration of development-related processes and supporting tools is most representative of which category of technical debt?
Sub-optimal configuration of development-related processes and supporting tools is most representative of which category of technical debt?
Signup and view all the answers
What kind of technical debt is caused by lingering bugs or failures that affect the system's evolution?
What kind of technical debt is caused by lingering bugs or failures that affect the system's evolution?
Signup and view all the answers
What type of technical debt arises from a mismatch between optimal requirements and actual system implementation?
What type of technical debt arises from a mismatch between optimal requirements and actual system implementation?
Signup and view all the answers
What is a primary challenge when migrating a database to PostgreSQL as described in the text?
What is a primary challenge when migrating a database to PostgreSQL as described in the text?
Signup and view all the answers
According to the provided information, what does 'principal' refer to in the context of technical debt?
According to the provided information, what does 'principal' refer to in the context of technical debt?
Signup and view all the answers
What is described as the 'interest' in relation to technical debt?
What is described as the 'interest' in relation to technical debt?
Signup and view all the answers
What best describes the concept of technical debt?
What best describes the concept of technical debt?
Signup and view all the answers
In the face of a challenging database migration, what alternative is mentioned?
In the face of a challenging database migration, what alternative is mentioned?
Signup and view all the answers
According to the provided information, what is the main downside of technical debt?
According to the provided information, what is the main downside of technical debt?
Signup and view all the answers
What potential negative outcome is associated with choosing the second database solution?
What potential negative outcome is associated with choosing the second database solution?
Signup and view all the answers
What was the primary effect of Knight Capital's system experiencing miscopied code related to technical debt?
What was the primary effect of Knight Capital's system experiencing miscopied code related to technical debt?
Signup and view all the answers
What is often a key motivating factor for accumulating technical debt?
What is often a key motivating factor for accumulating technical debt?
Signup and view all the answers
Why might a team choose MariaDB/MySQL as initial database if it lacks all needed features?
Why might a team choose MariaDB/MySQL as initial database if it lacks all needed features?
Signup and view all the answers
Flashcards
Container Image
Container Image
A collection of immutable, layered filesystem bundles used to package software applications and their dependencies.
Container Engine
Container Engine
A tool that manages and runs containers. It provides an interface (CLI, API) and handles tasks like image management and orchestration.
Container Runtime
Container Runtime
A tool that executes containers at a low level and interacts with the OS kernel. It adheres to OCI (Open Container Initiative) for standardization.
Image Registry
Image Registry
Signup and view all the flashcards
Building Container Images
Building Container Images
Signup and view all the flashcards
What is Technical Debt?
What is Technical Debt?
Signup and view all the flashcards
What are symptoms of technical debt?
What are symptoms of technical debt?
Signup and view all the flashcards
What does refactoring help with?
What does refactoring help with?
Signup and view all the flashcards
What trade-off does technical debt represent?
What trade-off does technical debt represent?
Signup and view all the flashcards
Can technical debt be managed?
Can technical debt be managed?
Signup and view all the flashcards
Cost of Change (Technical Debt)
Cost of Change (Technical Debt)
Signup and view all the flashcards
Principal (Technical Debt)
Principal (Technical Debt)
Signup and view all the flashcards
Technical Debt
Technical Debt
Signup and view all the flashcards
Database Migration
Database Migration
Signup and view all the flashcards
Database Migration Challenges
Database Migration Challenges
Signup and view all the flashcards
Architectural Technical Debt
Architectural Technical Debt
Signup and view all the flashcards
Design Technical Debt
Design Technical Debt
Signup and view all the flashcards
Code Technical Debt
Code Technical Debt
Signup and view all the flashcards
Infrastructure Technical Debt
Infrastructure Technical Debt
Signup and view all the flashcards
Test Technical Debt
Test Technical Debt
Signup and view all the flashcards
Study Notes
Advanced Programming (WBCS053-05)
- Course title: Advanced Programming (WBCS053-05)
- Course instructor: Daniel Feitosa
- Subject: Inversion of Control and Spring Beans
Inversion of Control
- Design principle where custom code is executed by external code.
- Control of parts of the code is delegated to another logical unit.
- Requires a predefined interface.
- Think of submitting an assignment to a system like themis. You don't code the tests, but the tests are still run against your assignment, provided input and output handling is correct.
Inversion of Control - Implementations
- Several ways to implement inversion of control.
- Example using a
SimpleProduct
class implementingProduct
interface. This class holds product name and price. - Example of
DecoratorPattern
class implementingProduct
. It holds a reference to aProduct
object. - Where the product object is created: Code A and B.
Dependency Injection
- Example B from previous slide is called Dependency Injection (DI).
- DI is a form of Inversion of Control (IoC).
- In DI, the control being inverted is the creation of dependencies.
- In previous example, the product object (dependency) is not created by the owner (DecoratorPattern). Instead, another class injects it.
Spring Framework
- Framework for enterprise Java development.
- Provides infrastructure support for building Java applications.
- Enables flexibility.
- Developers focus on application logic, framework handles complexities.
- Examples of support features:
- Spring Boot: simplifies setup and configuration (including Web REST APIs)
- Spring Data: tools for data access and manipulation
- Spring Security: security features for applications.
Beans
- Building blocks of Spring applications.
- Similar to stem cells of Spring applications.
- Instantiated, managed, and configured by Spring's IoC container.
- IoC container doesn't run the application. It ensures all components are properly configured and available.
- Application starts by an application server or Spring Boot context.
Configuring Beans
- Configured to assume a specific responsibility.
- Examples using Spring annotations: @Component, @Service, @Repository.
- Examples using Java-based configuration (@Configuration and @Bean methods)
Bean Lifecycle
- Lifecycle of a bean is impacted by its scope.
- Singleton beans are instantiated and destroyed with the IoC container.
- Prototype beans are instantiated for each request but not destroyed.
- Typical lifecycle: Container starts - Bean instantiated - Dependencies injected - Custom init method - Internal Spring Processing - Bean is ready to work - Custom Destroy method - Container stops.
Configuration Management (CM)
- Process of storing, retrieving, uniquely identifying, and modifying artifacts relevant to a project, and their relationships.
- Main goals: managing changes, documenting system evolution, governing team collaboration.
- Example use cases for CM:
- Anyone on the team should be able to replicate the environment (OS version, network, software stack, deployed applications and their configuration)
- Easily find needed information (code, docs, dependencies), change features, check correctness, quality, and deploy changes minimally.
Version Control
- Aims to retain and provide access to all versions, enabling collaboration across time and location.
- Reproduction: Reproduce a precise previous state of the software.
- Auditing: provides a complete history of the application (what, when, why, who).
- Deletion is cheap (rollback or copy from an older state)
- Key aspects in version control systems: retaining all versions, allowing collaboration, and having tools to manage different states.
Using Git
- Useful for tracking source code, tests, documents, database scripts, build/deployment scripts, application configuration files, and development configuration files.
- Generated artifacts (e.g., compiled code) typically aren't controlled by Git.
- Importance of atomic commits, descriptive messages, and merging policies; branching and proper use of branching strategies needed avoiding excess branching.
Semantic Versioning
- Schema for version numbering of software.
- Major version (breaks APIs), Minor version (minor change, doesn't disturb interface, new features), Patch version (bug/security fixes)
- backwards compatible
Managing Configuration
- Treat configuration as code (programmable, scalable, safe).
- Abstract configuration loading from chosen format (e.g., using
getProperty(A)
orgetPropertyA()
). - Using configuration formats: Pkl, JSON, YAML, Property Lists.
Application Environments
- Includes hardware, software, data, infrastructure, and external systems.
- Test environments should be close representations of production environments to identify issues early.
- Example environments: Development, Test, Production.
- Environments also require specific configurations- libraries/dependencies, software versions, database connections, networking configurations, configurations for external services (patch levels, configuration settings), and operating systems.
Effective Configuration Management
- Keep binaries independent from configuration.
- Keep all configuration in one place.
- Using same mechanism for configuration across different environments.
- Importance of automated provisioning and baselines for creating and reliably reproducing environments.
Container Technology
- Aim for replicating a baseline.
- Processes: Instances of executing programs.
- Containers: Lightweight, isolated environments that share the host OS kernel.
- Benefits over VMs: Faster startup, lower resource consumption, simplified deployment.
- Limitations: Potential security issues due to shared kernel.
- Challenges: Complexity, management of layers and resources, security, etc..
- Linux Namespaces: Isolate global system resources.
- Linux Control Groups (cgroups): Limit, monitor and prioritize resource usage.
- Types of namespaces to isolate resources: Mount, PID, Network, IPC, UTS, User, Time and cgroup.
Continuous Software Engineering
- Development dynamics have changed, resulting in differing technology, cycle duration, and risk of failure across different development eras (70s/80s, 90s, 2000-present).
- Development cycle: ensure-compilation-run-test-improve-commit-repository-deploy-feedback-monitor.
- Solution by automating: ensuring good commits and quality checks in the repository, implementing an automated build process, and coordinating multiple containers via orchestration
- The continuous delivery (CD) pipeline: the automated sequence of steps that must be continuously practiced for deployment to be successful, e.g., code-build-test-plan-release-deploy-monitor.
- Common release antipatterns: manual deployments, late deployments to production-like environments, manual configuration management, inconsistencies across environments, other potential problems.
Technical Debt
- Collection of design & implementation decisions that solve problems but create future costs or impossibility in the implementation of new solutions.
- Symptoms of refactoring needs: trade-off between short-term advantages of "cutting corners" and long-term sustainability of a software system.
- Understanding debt timelines: occurrence, identification latency, discussion period, decision, remediation latency, interval
- Typical sources of debt: bad architecture, complex code, obsolete tech, inadequate testing, insufficient testing, inappropriate modularity and dependencies between modules, etc.
- Tools for managing technical debt: SonarQube, CAST, etc.
- Importance of identifying debt early to mitigate potential negative impact.
DevOps
- Combines software development and IT operations to shorten development life cycle and enhance continuous delivery with improved quality.
- Identifying areas of intersection between Dev and Ops phases.
- DevOps is about culture, breaking silos, and fostering better communication.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Test your knowledge on containerization security risks and best practices, as well as various types of technical debt. This quiz covers essential concepts including the roles of container runtimes and the impact of design compromises. Prepare to explore critical challenges in system design and implementation.