KEMBAR78
System Analysis & Design | PDF | Computer Security | Security
0% found this document useful (0 votes)
32 views14 pages

System Analysis & Design

The document discusses CI/CD (Continuous Integration/Continuous Delivery/Deployment) pipelines, which automate software development and delivery to enhance speed, quality, and reliability. It outlines the key components, benefits, and best practices of CI/CD, as well as the challenges and security considerations involved in implementation. Additionally, it highlights the importance of data partitioning techniques in system design for scalability and performance.

Uploaded by

pkjdalal891
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views14 pages

System Analysis & Design

The document discusses CI/CD (Continuous Integration/Continuous Delivery/Deployment) pipelines, which automate software development and delivery to enhance speed, quality, and reliability. It outlines the key components, benefits, and best practices of CI/CD, as well as the challenges and security considerations involved in implementation. Additionally, it highlights the importance of data partitioning techniques in system design for scalability and performance.

Uploaded by

pkjdalal891
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

CI/CD Pipelines: Automating Software Development and Delivery

Previous
Quiz AI Version
Next
Introduction
Modern software development relies on speed, quality, and reliability. CI/CD
(Continuous Integration/Continuous Delivery/Deployment) enables teams
to deliver software faster and more efficiently through automation.
CI/CD is a DevOps practice that automates−
 Integration− Code merges and builds.
 Delivery− Packaging and testing software for production.
 Deployment− Automated release of software to production
environments.
With CI/CD pipelines, teams adopt iterative development, ensuring that every
change is tested, integrated, and deployed seamlessly.
Understanding Continuous Integration (CI)
Definition
Continuous Integration (CI) is a practice where developers frequently merge their
code into a shared repository, triggering automated builds and tests.
Goals of CI
1. Early Detection of Bugs− Frequent integrations catch issues early.
2. Improved Collaboration− Developers integrate and resolve conflicts
daily.
3. Faster Development Cycles− Code integration is automated.
Key Processes in CI
1. Code Commit− Developers push changes to a version control system like
Git.
2. Build Automation− Tools like Maven or Gradle build the software.
3. Automated Testing− Unit tests, integration tests, and static code
analysis run.
4. Code Quality Checks− Tools like SonarQube analyze code quality.
Example− A team uses Jenkins for CI. Each Git commit triggers a build, runs unit
tests, and generates reports for developers.

Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.

Understanding Continuous Delivery and Continuous Deployment


Continuous Delivery (CD)
Continuous Delivery ensures that the software is always in a deployable state. It
automates the packaging and testing of software, requiring manual approval
before deployment.
Continuous Deployment
In Continuous Deployment, every successful change is automatically deployed to
production without manual intervention.
Differences
Sr.No
Feature Continous Delivery Continous Deployment
.
Deployme
1 Manual approval needed Fully automated
nt
Enterprise software, SaaS, startups, fast-moving
2 Use Case
compliance teams
Benefits of CI/CD Pipelines
1. Faster Releases− Teams can release code changes frequently (multiple
times a day).
2. Improved Code Quality− Automated testing catches errors early.
3. Reduced Risks− Small, incremental changes are easier to test and
deploy.
4. Consistent Environments− CI/CD pipelines ensure consistency across
development, staging, and production.
5. Developer Productivity− Automating builds and testing reduces manual
effort.
Example− Facebook deploys code thousands of times a day using CI/CD,
reducing deployment risks.
Key Components of CI/CD Pipelines
1. Version Control System− Example: Git, GitHub, GitLab, Bitbucket.
2. Build Tools− Example: Maven, Gradle, or NPM (for JavaScript projects).
3. Testing Frameworks−
o Unit Tests− JUnit, PyTest, Mocha.
o Integration Tests− Selenium, Postman.
4. CI/CD Orchestration Tools− Example: Jenkins, GitHub Actions, GitLab
CI/CD, CircleCI.
5. Artifact Repository− Example: JFrog Artifactory, Nexus Repository.
6. Deployment Tools− Example: Kubernetes, Docker, Terraform, AWS
CodeDeploy.
7. Monitoring and Logging− Tools: Prometheus, ELK Stack, Grafana.
Popular CI/CD Tools and Platforms
Sr.No
Tools Features Use Case
.
Open-source, customizable, large Versatile for
1 Jenkins
plugin ecosystem. enterprises.
GitHub Native CI/CD for GitHub, integrates Seamless for GitHub
2
Actions with repositories. users.
Integrated GitOps
3 GitLab CI/CD Built-in CI/CD, powerful pipelines.
workflows.
Fast builds, supports Docker and Startups and cloud-
4 CircleCI
Kubernetes. native projects.
AWS Cloud-native apps on
5 Fully managed CI/CD by AWS.
CodePipeline AWS.
Example Jenkins Pipeline
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'mvn clean package'
}
}
stage('Test') {
steps {
sh 'mvn test'
}
}
stage('Deploy') {
steps {
sh 'scp target/app.jar user@server:/deployments/'
}
}
}
}
Designing a CI/CD Pipeline
1. Define Stages−
o Build− Compile code and resolve dependencies.
o Test− Run unit tests, integration tests, and security checks.
o Package− Package application into artifacts or containers.
o Deploy− Deploy to staging or production.
2. Choose Tools− Select tools like Jenkins, GitLab, or AWS CodePipeline.
3. Automate Workflows−
o Trigger pipelines on code commits.
o Use YAML files for configuration (e.g., .gitlab-ci.yml, Jenkinsfile).
4. Set Up Monitoring− Add logging and error notifications.
CI/CD Pipeline Best Practices
 Commit Code Frequently− Encourage small, frequent code commits.
 Run Automated Tests− Include unit, integration, and performance tests.
 Parallelize Workloads− Run builds and tests in parallel to save time.
 Fail Fast− Stop the pipeline immediately if a stage fails.
 Environment Consistency− Use containers (Docker) to standardize
environments.
 Monitor Pipeline Health− Visualize pipeline status and logs with tools
like Grafana.
Challenges in CI/CD Implementation
 Tool Complexity− Learning tools like Kubernetes and Jenkins can be
challenging.
 Flaky Tests− Intermittent test failures delay pipelines.
 Legacy Systems− Integrating CI/CD with older codebases.
 Security Risks− Poorly configured pipelines can expose systems to
attacks.
Security in CI/CD Pipelines (DevSecOps)
 Static Code Analysis− Tools like SonarQube detect vulnerabilities.
 Secrets Management− Use HashiCorp Vault to store credentials
securely.
 Container Scanning− Scan Docker images for vulnerabilities (e.g., Trivy,
Clair).
 Security Gates− Block deployments if vulnerabilities exceed thresholds.
CI/CD for Microservices
 Each microservice has its own CI/CD pipeline.
 Containers and Kubernetes manage deployments.
 Use service meshes like Istio for traffic management.
Example− Netflix uses CI/CD pipelines for its 1,000+ microservices to automate
builds, testing, and deployments.
Case Studies of CI/CD in Action
 Amazon− Deploys code every 11.7 seconds using CI/CD.
 Netflix− Automates deployments to its cloud infrastructure with
Spinnaker.
 Airbnb− Uses GitHub Actions and Kubernetes to deploy new features.
Future Trends in CI/CD
 AI/ML in CI/CD− Predicting test failures and automating optimizations.
 GitOps− Using Git as a single source of truth for deployments.
 Serverless CI/CD− Simplifying pipelines with serverless platforms.
 Security-First CI/CD− Integrating security throughout the pipeline.
Conclusion
CI/CD pipelines are the backbone of modern software delivery, enabling teams to
release faster, reduce errors, and improve collaboration. By adopting CI/CD tools,
best practices, and automation, organizations can achieve continuous innovation
and meet customer expectations effectively.

System Design - Data Partitioning Techniques

Previous
Quiz AI Version
Next
Introduction
Data partitioning, also known as sharding, involves dividing a large dataset into
smaller, manageable segments (partitions) to optimize storage, improve query
performance, and enhance scalability. Partitioning is particularly useful in
distributed systems and large-scale applications.
Why Partition Data?
1. Scalability− Distributed storage across multiple servers.
2. Performance− Faster queries and reduced response time.
3. Cost Optimization− Efficient resource utilization.
Example− A global e-commerce platform might partition user data by region to
improve latency for users in different parts of the world.
Benefits of Data Partitioning
Scalability
Partitioning allows data to scale horizontally by adding more nodes to the
system.
Improved Performance
Queries operate on smaller datasets, reducing search and processing time.
High Availability
Data replication across partitions ensures minimal downtime during node
failures.
Cost Efficiency
By partitioning less-accessed data to cheaper storage solutions, organizations
can optimize costs.

Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.

Challenges in Data Partitioning


Data Skew
Uneven data distribution among partitions can lead to hot spots and degraded
performance.
Complexity in Querying
Partitioning may require rewriting queries to handle distributed data.
Rebalancing Overhead
When new partitions are added, rebalancing data across partitions is resource-
intensive.
Cross-Partition Queries
Queries spanning multiple partitions can increase latency.
Example− Inconsistent hash functions might cause some partitions to store
disproportionately large datasets.
Horizontal Partitioning (Sharding)
Horizontal partitioning involves splitting a table into rows and storing subsets of
rows in different partitions.
How It Works
Each partition contains rows that meet specific criteria.
Example− A user table might be divided by geographical regions−
 Partition 1− Users from North America.
 Partition 2− Users from Europe.
Advantages
 Supports horizontal scaling.
 Easier to manage growing datasets.
Disadvantages
 Rebalancing data when partitions grow can be costly.
Diagram Idea− Show a table divided into multiple partitions based on region.
Vertical Partitioning
Vertical partitioning splits a table into columns and stores subsets of columns in
separate partitions.
How It Works
Each partition contains a specific subset of columns.
Example
 Partition 1− User ID, Name, Email.
 Partition 2− User ID, Preferences, Settings.
Advantages
 Improves query performance for specific fields.
 Reduces I/O for queries targeting selected columns.
Disadvantages
 Joins across partitions can be expensive.
Range-Based Partitioning
Range partitioning involves dividing data into partitions based on a range of
values.
How It Works
Define ranges for partition keys. Data is stored in partitions corresponding to the
range.
Example
 Partition 1− Orders with OrderDate from Jan–Jun.
 Partition 2− Orders with OrderDate from Jul–Dec.
Advantages
 Intuitive and easy to implement.
 Efficient for range queries.
Disadvantages
 Can result in data skew if ranges are uneven.
Hash-Based Partitioning
Hash partitioning uses a hash function to determine the partition for each data
item.
How It Works
A hash function is applied to a partition key (e.g., UserID) to distribute data
evenly across partitions.
Example
 Partition 1− hash(UserID) % 3 == 0
 Partition 2− hash(UserID) % 3 == 1
Advantages
 Ensures even distribution.
 Prevents data skew.
Disadvantages
 Rebalancing requires rehashing, which is resource-intensive.
Key-Based Partitioning
Key-based partitioning assigns data to partitions based on specific keys.
How It Works
Data is assigned to a partition using predefined keys.
Example
 Partition 1− Users with IDs 1–1000.
 Partition 2− Users with IDs 1001–2000.
Advantages
 Simple and predictable.
Disadvantages
 Requires manual rebalancing when partitions are added.
Directory-Based Partitioning
Directory-based partitioning uses a lookup table to determine the partition for
each data item.
How It Works
The lookup table maps keys to specific partitions.
Example
Sr.No
Key Partition
.
1 User1 Partition1
2 User2 Partition2
Advantages
 Flexible and adaptable to changes.
Disadvantages
 Requires maintaining the lookup table.
Dynamic Partitioning Techniques
Dynamic partitioning adjusts partitions automatically based on load or data
changes.
Techniques
1. Auto-Sharding− Databases like MongoDB dynamically create shards.
2. Time-Based Partitioning− Create partitions based on time intervals.
Advantages
 Reduces manual intervention.
 Adapts to changing workloads.
Real-World Use Cases
 E-Commerce Platforms− Partition user data by region to reduce query
latency.
 Social Media− Shard posts by UserID for balanced distribution.
 IoT Systems− Use time-based partitioning for sensor data.
Conclusion and Future Trends
Data partitioning is a cornerstone of scalable system design, enabling distributed
systems to handle growing datasets efficiently.
Future Trends
1. AI-Driven Partitioning− Automatically optimize partitions based on
usage patterns.
2. Serverless Partitioning− Integration with serverless architectures for
elastic scalability.
As data grows exponentially, mastering partitioning techniques is essential for
building resilient and high-
System Design - Essential Security Measures

Previous
Quiz AI Version
Next
Introduction to Security in System Design
Security in system design ensures the protection of data, resources, and
operations from unauthorized access and malicious attacks. It is a critical aspect
of modern application development, where threats continue to evolve.
Why Security Matters?
 Protect User Data− Safeguard sensitive information like personal details
and financial records.
 Ensure Business Continuity− Prevent downtime from security breaches.
 Maintain Trust− A secure system builds user confidence.
Example− Data breaches, like those affecting social media platforms, highlight
the importance of robust security measures.
Principles of Secure System Design
Defense in Depth
Employ multiple layers of security to protect systems.
Example− Firewalls, encryption, and user authentication.
Least Privilege
Grant users and services the minimum permissions needed to perform their
tasks.
Fail Securely
Design systems to fail in a way that doesnt expose vulnerabilities.
Regular Updates
Ensure that all software components are patched against known vulnerabilities.

Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.

Authentication Mechanisms
Authentication verifies the identity of users or systems.
Password-Based Authentication
Enforce strong password policies (minimum length, complexity, expiration).
Multi-Factor Authentication (MFA)
 Combine at least two factors−
o Something you know (password).
o Something you have (OTP).
Biometric Authentication
Use fingerprints, facial recognition, or voice authentication.
Example Code: Spring Security Password Authentication
@Bean
public UserDetailsService userDetailsService() {
return new InMemoryUserDetailsManager(
User.withDefaultPasswordEncoder()
.username("user")
.password("password")
.roles("USER")
.build()
);
}
Authorization and Access Control
Role-Based Access Control (RBAC)
Assign roles to users and restrict access to resources based on roles.
Attribute-Based Access Control (ABAC)
Access decisions based on attributes like time, location, or device.
Zero Trust Architecture
Verify every access request, regardless of origin.
Example− An admin role can access /admin/* endpoints, while a user role is
restricted to /user/*.
Data Encryption
Encryption protects data in transit and at rest by converting it into an unreadable
format.
Symmetric Encryption
 Single key for encryption and decryption.
 Example− AES (Advanced Encryption Standard).
Asymmetric Encryption
 Public and private key pairs.
 Example− RSA for secure key exchanges.
Hashing
 One-way encryption for storing sensitive data like passwords.
 Example− SHA-256.
Code Snippet: Encrypting Data with AES in Java
Cipher cipher = Cipher.getInstance("AES");
SecretKey key = new SecretKeySpec("MySecretKey12345".getBytes(), "AES");
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] encrypted = cipher.doFinal("Sensitive Data".getBytes());
Secure APIs
APIs are critical communication channels between systems and must be secured.
Use HTTPS
Encrypt API communications using TLS.
API Authentication
Use OAuth 2.0 or API keys to authenticate API requests.
Input Validation
Prevent injection attacks by validating API inputs.
Example− Implement rate limiting to protect APIs from denial-of-service (DoS)
attacks.
Network Security
Network security ensures that the infrastructure connecting systems remains
secure.
Firewalls
 Block unauthorized traffic.
 Example− Web Application Firewalls (WAF) protect against common web
threats.
VPNs
Securely connect users to internal systems.
Segmentation
Divide networks into segments to limit the spread of attacks.
Logging and Monitoring for Security
Logging and monitoring help detect suspicious activities and respond to threats.
Log Critical Events
Log user logins, failed authentication attempts, and resource access.
Use Monitoring Tools
Tools like Splunk, ELK Stack, and Prometheus help monitor systems in real time.
Alerting
Set up alerts for unusual activities like high login failure rates.
Example− Configure Spring Boot to log user activity with an
AuditEventRepository.
Security Testing and Vulnerability Management
Penetration Testing
Simulate attacks to identify vulnerabilities.
Static Code Analysis
Analyze source code for security flaws.
Dependency Scanning
Identify vulnerabilities in third-party libraries.
Tools− Snyk, Dependabot.
Example− Automate vulnerability scanning in CI/CD pipelines.
Incident Response and Recovery
Incident Response Plan
Prepare a plan to handle security breaches, including−
 Identifying the breach.
 Containing the attack.
 Recovering systems.
Backup and Recovery
Regularly back up critical data and test recovery procedures.
Post-Incident Analysis
Review incidents to identify root causes and prevent recurrence.
Compliance and Legal Considerations
Compliance Standards
 GDPR (General Data Protection Regulation).
 HIPAA (Health Insurance Portability and Accountability Act).
Data Protection
Ensure user data is handled securely and in compliance with regulations.
Audits
Regular audits ensure adherence to security policies.
Example− A financial service must comply with PCI DSS for secure payment
processing.
Future Trends in System Security
AI-Driven Security
Machine learning models detect threats in real time.
Zero Trust Evolution
Adoption of Zero Trust for complete end-to-end security.
Quantum-Resistant Encryption
Prepare for future quantum-computing threats.
Decentralized Security
Blockchain-based systems for immutable data verification.
Conclusion
Secure system design is a fundamental requirement for modern applications. By
adopting a layered approach, implementing best practices, and staying updated
with evolving threats, organizations can protect their systems and user data.
Future advancements in security technologies will further empower developers
to build resilient,

Input / Output & Forms Design

Previous
Quiz AI Version
Next
Input Design
In an information system, input is the raw data that is processed to produce
output. During the input design, the developers must consider the input devices
such as PC, MICR, OMR, etc.
Therefore, the quality of system input determines the quality of system output.
Well designed input forms and screens have following properties −
 It should serve specific purpose effectively such as storing, recording, and
retrieving the information.
 It ensures proper completion with accuracy.
 It should be easy to fill and straightforward.
 It should focus on user’s attention, consistency, and simplicity.
 All these objectives are obtained using the knowledge of basic design
principles regarding −
o What are the inputs needed for the system?
o How end users respond to different elements of forms and screens.
Objectives for Input Design
The objectives of input design are −
 To design data entry and input procedures
 To reduce input volume
 To design source documents for data capture or devise other data capture
methods
 To design input data records, data entry screens, user interface screens,
etc.
 To use validation checks and develop effective input controls.
Data Input Methods
It is important to design appropriate data input methods to prevent errors while
entering data. These methods depend on whether the data is entered by
customers in forms manually and later entered by data entry operators, or data
is directly entered by users on the PCs.
A system should prevent user from making mistakes by −
 Clear form design by leaving enough space for writing legibly.
 Clear instructions to fill form.
 Clear form design.
 Reducing key strokes.
 Immediate error feedback.
Some of the popular data input methods are −
 Batch input method (Offline data input method)
 Online data input method
 Computer readable forms
 Interactive data input
Input Integrity Controls
Input integrity controls include a number of methods to eliminate common input
errors by end-users. They also include checks on the value of individual fields;
both for format and the completeness of all inputs.
Audit trails for data entry and other system operations are created using
transaction logs which gives a record of all changes introduced in the database
to provide security and means of recovery in case of any failure.
Output Design
The design of output is the most important task of any system. During output
design, developers identify the type of outputs needed, and consider the
necessary output controls and prototype report layouts.
Objectives of Output Design
The objectives of input design are −
 To develop output design that serves the intended purpose and eliminates
the production of unwanted output.
 To develop the output design that meets the end users requirements.
 To deliver the appropriate quantity of output.
 To form the output in appropriate format and direct it to the right person.
 To make the output available on time for making good decisions.
Let us now go through various types of outputs −
External Outputs
Manufacturers create and design external outputs for printers. External outputs
enable the system to leave the trigger actions on the part of their recipients or
confirm actions to their recipients.
Some of the external outputs are designed as turnaround outputs, which are
implemented as a form and re-enter the system as an input.
Internal outputs
Internal outputs are present inside the system, and used by end-users and
managers. They support the management in decision making and reporting.
There are three types of reports produced by management information −
 Detailed Reports − They contain present information which has almost
no filtering or restriction generated to assist management planning and
control.
 Summary Reports − They contain trends and potential problems which
are categorized and summarized that are generated for managers who do
not want details.
 Exception Reports − They contain exceptions, filtered data to some
condition or standard before presenting it to the manager, as information.
Output Integrity Controls
Output integrity controls include routing codes to identify the receiving system,
and verification messages to confirm successful receipt of messages that are
handled by network protocol.
Printed or screen-format reports should include a date/time for report printing
and the data. Multipage reports contain report title or description, and
pagination. Pre-printed forms usually include a version number and effective
date.

Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.

Forms Design
Both forms and reports are the product of input and output design and are
business document consisting of specified data. The main difference is that
forms provide fields for data input but reports are purely used for reading. For
example, order forms, employment and credit application, etc.
 During form designing, the designers should know −
o who will use them
o where would they be delivered
o the purpose of the form or report
 During form design, automated design tools enhance the developer’s
ability to prototype forms and reports and present them to end users for
evaluation.
Objectives of Good Form Design
A good form design is necessary to ensure the following −
 To keep the screen simple by giving proper sequence, information, and
clear captions.
 To meet the intended purpose by using appropriate forms.
 To ensure the completion of form with accuracy.
 To keep the forms attractive by using icons, inverse video, or blinking
cursors etc.
 To facilitate navigation.
Types of Forms
Flat Forms
 It is a single copy form prepared manually or by a machine and printed on
a paper. For additional copies of the original, carbon papers are inserted
between copies.
 It is a simplest and inexpensive form to design, print, and reproduce,
which uses less volume.
Unit Set/Snap out Forms
 These are papers with one-time carbons interleaved into unit sets for
either handwritten or machine use.
 Carbons may be either blue or black, standard grade medium intensity.
Generally, blue carbons are best for handwritten forms while black
carbons are best for machine use.
Continuous strip/Fanfold Forms
 These are multiple unit forms joined in a continuous strip with perforations
between each pair of forms.
 It is a less expensive method for large volume use.
No Carbon Required (NCR) Paper
 They use carbonless papers which have two chemical coatings (capsules),
one on the face and the other on the back of a sheet of paper.
 When pressure is applied, the two capsules interact and create an image.

You might also like