Course: COMP 293F
Time: 12:30 PM - 01:25 PM on Monday, Wednesday, Friday
Location: Benerd School of Education 208
Week | Topic | Assignment (Canvas + GitHub) | Project | Comment |
---|---|---|---|---|
1 (Jan 13, 15, 17) | Introduction to Industry 4.0 Ecosystems | Lab 1 + Homework 1 (2w) | ||
2 (Jan 22, 24) | Requirements Engineering for Industry 4.0 Applications | Backlog MVP | Holiday on Monday | |
3 (Jan 27, 29, 31) | Team Structure for Industry 4.0 Applications | Lab 2 + Homework 2 (2w) | Backlog Complete, Purchase HW ✓ | |
4 (Feb 3, 5, 3, 7) | Development Processes in Industry 4.0 | Project Part 1 (4w) | Design UI/UX | |
5 (Feb 10, 12, 14) | Architectural Design for Industry 4.0 Applications | Design Architecture | ||
6 (Feb 19, 21) | Legal Constraints for Industry 4.0 Applications | Install Servers, CI/CD | Holiday on Monday | |
7 (Feb 24, 26, 28) | Testing, Verification, Validation in Industry 4.0 | MVP Implementation | ||
8 (Mar 3, 5, 7) | Midterm Preparation | Midterm (Mar 7) | MVP I Release | |
9 ( - ) | Holiday Week | |||
10 (Mar 17, 19, 21) | Resource Constraints and Sustainability in Industry 4.0 | Lab 3 + Homework 3 (2w), Project Part 2 (4w) | End-to-End Integration | |
11 (Mar 24, 26, 28) | Cyber Security in Industry 4.0 Ecosystems | End-to-End Integration | ||
12 (Mar 31, Apr 2, Apr 4) | Software Release Process in Industry 4.0 | Lab 4, Homework 4 (2w) | Testing | |
13 (Apr 7, 9, 11) | Course Review, Project Testing + Bug Fixing | Testing + Bug Fixing | ||
14 (Apr 14, 16, 18) | Final Preparation / Team Presentation | Lab 5, Homework 5 (2w) | MVP II Release | |
15 (Apr 21, 23, 25) | Team Presentation | Final Preparation / Team Presentation | ||
16 (Apr 28) | Early Final on Apr 28 at 12:30 - 1:30 PM | Classes End on Tuesday (Apr 29) | ||
17 (May 7) | Final (May 7, 10-11 AM) |
The IoT-enabled system should allow users to rent bikes easily through smart connectivity and real-time tracking
The IoT-enabled system should allow registered users to rent a bike by selecting a location using a GPS-enabled app, unlocking the bike via a smart lock, and completing payment seamlessly within three steps
Purpose: IoT-Improved Bike Rental System to manage rentals and track customers, bikes, and transactions in real-time
Epics are broad categories of work that can be broken down into smaller, actionable tasks or user stories
Examples:
User stories are specific features or tasks that can be completed within a short time frame, often within a sprint
As a [user role],
I want to [desired action],
Because [reason or benefit]
Implementation tasks are specific, actionable steps required to complete a user story or feature. They include:
The product backlog is a prioritized list of user stories, features, and tasks that need to be completed for the product. It includes:
git commit -m "Implements #3 - Bike Selection UI"
What is needed for the software product?
Ensures the product is built as per specifications. ("Are we building the product right?")
Purpose: Acts as a quality gate to ensure readiness for the next stage
Confirms the product meets user needs. ("Are we building the right product?")
Requirement ID | Requirement | Verification Ticket | Validation Ticket | Verification Method | Validation Method |
---|---|---|---|---|---|
REQ-001 | System must measure soil moisture levels | #VT-001 | #VD-001 | Unit Test: Sensor data accuracy | Functional Test: Moisture detection in real soil |
REQ-002 | System must water plants when moisture is below threshold | #VT-002 | #VD-002 | Integration Test: Sensor-to-actuator response | Acceptance Test: Ensure plants are watered correctly |
REQ-003 | System must notify users of low water levels in the tank | #VT-003 | #VD-003 | System Test: Notification accuracy | User Test: Validate notifications received |
REQ-004 | System must allow users to set custom thresholds | #VT-004 | #VD-004 | Interface Test: Threshold input functionality | Usability Test: Confirm thresholds match user input |
Requirement | REQ-001 | REQ-002 | REQ-003 | REQ-004 |
---|---|---|---|---|
REQ-001 | - | X | X | - |
REQ-002 | X | - | - | X |
REQ-003 | X | ? | - | - |
REQ-004 | - | X | X | - |
Requirement | REQ-001 | REQ-002 | REQ-003 | REQ-004 |
---|---|---|---|---|
REQ-001: Measure soil moisture | - | X | X | - |
REQ-002: Water plants when moisture is low | X | - | - | X |
REQ-003: Notify user when water levels are low | X | - | - | - |
REQ-004: User can set watering thresholds | - | X | X | - |
Requirement | Description |
---|---|
REQ-001 | Purchase moisture sensors to detect soil moisture levels |
REQ-002 | Order Raspberry Pi devices for controlling the system and running the software |
REQ-003 | Develop system plan for sensor and device integration |
REQ-004 | Ensure all components meet quality standards for outdoor usage |
REQ-005 | Test sensors and Raspberry Pi setup for functionality and connectivity |
Requirement | REQ-001 | REQ-002 | REQ-003 | REQ-004 | REQ-005 |
---|---|---|---|---|---|
REQ-001 | - | - | - | - | - |
REQ-002 | X | - | - | X | - |
REQ-003 | X | - | - | - | X |
REQ-004 | - | X | X | - | - |
REQ-005 | - | - | X | - | - |
Project: Automated Plant Watering System
Requirement | REQ-001 | REQ-002 | REQ-003 | REQ-004 | REQ-005 |
---|---|---|---|---|---|
REQ-001: Measure soil moisture | - | X | X | - | - |
REQ-002: Water plants when moisture is low | X | - | - | X | - |
REQ-003: Notify user when water levels are low | X | - | - | - | X |
REQ-004: User can set watering thresholds | - | X | X | - | - |
REQ-005: Test sensors and Raspberry Pi | - | - | X | - | - |
Requirement Ticket | LT Task | Verification Tickets | Validation Tickets |
---|---|---|---|
REQ-001: Purchase moisture sensors | LT-001: Purchase Sensors | VT-001: Verify sensor functionality | VT-002: Validate sensor accuracy in real-world conditions |
REQ-002: Order Raspberry Pi devices | LT-002: Order Raspberry Pi | VT-003: Verify compatibility with sensors | VT-004: Validate Raspberry Pi performance under load |
REQ-003: Develop system integration plan | LT-003: Develop System Plan | VT-005: Verify integration of sensors and Raspberry Pi | VT-006: Validate system flow against project requirements |
REQ-004: Ensure quality standards for components | LT-004: Ensure Quality Standards | VT-007: Verify component durability and reliability | VT-008: Validate quality compliance with industry standards |
REQ-005: Test sensors and Raspberry Pi | LT-005: Test Sensors and Raspberry Pi | VT-009: Verify sensors' response to moisture levels | VT-010: Validate system functionality after testing |
What is the primary purpose of verification in software development?
What does a Requirements Traceability Matrix (RTM) help with?
Which of the following best describes an Epic?
What is the main purpose of verification and validation tickets?
What is the role of tasks in project management?
+----------------+ +-----------------+
| Component | ------ | Component 2 |
+----------------+ +-----------------+
+------------+ +------------+
| Entity | ------- | Entity 2 |
+------------+ +------------+
@startuml
[Component 1] --> [Component 2]
@enduml
@startuml
entity "Entity" {
+ID: int
+Name: string
}
entity "Entity2" {
+ID: int
+Details: string
}
"Entity" -- "Entity2"
@enduml
name: Create Weekly Issue
on:
schedule:
- cron: '0 0 * * 5' # Every Friday
jobs:
create-issue:
...
Conway's Law: "Organizations design systems that mirror their team and communication structures."
Team members from different disciplines (hardware, software, data) collaborate in a single team to ensure all aspects of the project are covered from the start. This approach promotes continuous communication and immediate problem-solving
function waterPlants(plant) {
if (plant.needsWater) {
// QA ensured proper moisture checks
water(plant); // Dev implemented watering logic
}
// Product defined watering schedule
logWateringEvent(plant); // UX/UI tracked user interactions
}
Separate teams are assigned to distinct components (e.g., one for embedded, one for frontend, and one for backend). Regular communication between teams ensures integration and smooth collaboration between modules
Organize teams around specific features or outcomes (e.g., automated watering or data analytics). This structure ensures focus and clear ownership of specific deliverables, allowing for targeted development efforts
function waterPlants(plant) {
if (featureFlags.isWateringEnabled) {
if (plant.needsWater) {
water(plant); // Product team feature flag logic
}
} else {
// Feature is disabled, no action taken
console.log("Watering feature is off");
}
logWateringEvent(plant); // Product team tracking
}
Teams work in iterative cycles (sprints), with regular stand-ups and sprint reviews to ensure continuous feedback and collaboration across all parts of the project. This flexible approach allows teams to quickly adapt to changes and feedback
function waterPlants(plant) {
if (sprint3FeatureFlags.isWateringEnabled) {
if (plant.needsWater) {
water(plant); // Sprint 3: Dev tasks for watering logic
}
}
// Sprint 5: Log watering event
sprint5LogWateringEvent(plant); // Sprint 5: QA task to ensure logging
}
Create a project lead who oversees sub-teams for different components. The lead facilitates communication and integration between sub-teams, ensuring that the overall project vision is aligned with individual component developments
function waterPlants(plant) {
if (managerFeatureFlag.isWateringEnabled) {
if (plant.needsWater) {
water(plant); // Senior Dev writes watering logic
}
} else {
// Feature is turned off, no action taken
console.log("Watering feature is off");
}
// Tracking handled by Product Lead
logWateringEvent(plant);
}
Team Structure | Pros | Cons |
---|---|---|
Cross-functional Teams |
|
|
Modular Teams |
|
|
Product-Oriented Teams |
|
|
Agile/Scrum Teams |
|
|
Hierarchical Teams |
|
|
Communication and Risks
Team > Communication > ⚠ > Software > Product
Team Communication and Escalations
V-Model Phase | Escalation Responsibility | When to Escalate |
---|---|---|
Requirements Analysis | Management | Escalate unclear or incomplete requirements |
System Design | Architecture | Escalate design inconsistencies or integration risks |
Implementation | Frontend/Backend/Embedded | Escalate coding errors, unresolved bugs |
Unit Testing | Testing | Escalate failed unit tests or code issues |
Integration Testing | Quality | Escalate integration issues, non-functional components |
System Testing | Testing | Escalate system-wide failures or unexpected behavior |
Acceptance Testing | Client | Escalate client acceptance concerns or issues |
Escalation Level | Responsibility | When to Escalate |
---|---|---|
1 | Management | Escalate blockers and resource allocation issues |
2 | Quality | Escalate incomplete features, unresolved bugs, or missed deadlines |
3 | Algorithms | Escalate logic errors, performance issues in algorithms |
4 | Architecture | Escalate issues related to tech stack, integration or design |
5 | Embedded | Escalate hardware/software integration issues |
6 | Backend | Escalate API or data processing errors |
7 | Frontend | Escalate UI/UX issues, display bugs or broken features |
8 | Testing | Escalate test failures, unresolved issues from QA |
9 | Sensor | Escalate sensor failures or issues with sensor integration |
10 | Logistics | Escalate delays in hardware procurement or availability |
11 | Client | Escalate client feedback, product usage concerns |
12 | DevOps | Escalate build/deployment pipeline failures |
Reduce Escalation - Norming
Reduce Escalation - Performing
Biggest Challenge: Lack of adequate skill sets
Aspect | Requires Scrum | Requires V-Model |
---|---|---|
Legal Compliance | ||
UI/UX Design | ||
System Updates | ||
Sensor Data Collection | ||
Integration Testing | ||
Hardware Development | ||
Functional Specifications | ||
Iterative Feature Development | ||
End-to-End Testing | ||
Quality Assurance | ||
Purchase Hardware | ||
Communication with Stakeholders |
According to Conway’s Law, how do software systems tend to be structured?
Answer B)
During the "Norming" stage in Tuckman’s team development model, how do teams establish stability?
Answer B)
How are requirements structured in Software Engineering?
Answer A)
What generally comes first in Software Engineering?
Answer C)
What is a unique challenge for IoT/CPS software?
Answer D)
Which team structure is most likely to have written this code?
Answer B) Cross-functional team (e.g., IoT, backend, data analysis)
function processHydrationData(data) {
let validData = [];
data.forEach(entry => {
if (
entry.isValid() &&
entry.humidityLevel > 20 &&
entry.humidityLevel < 80) {
validData.push(entry);
}
});
return validData;
}
Aspect | Requires Scrum | Requires V-Model |
---|---|---|
Legal Compliance | ||
UI/UX Design | ||
System Updates | ||
Sensor Data Collection | ||
Integration Testing | ||
Hardware Development | ||
Functional Specifications | ||
Iterative Feature Development | ||
End-to-End Testing | ||
Quality Assurance | ||
Purchase Hardware | ||
Communication with Stakeholders |
Aspect | Requires Scrum | Requires V-Model |
---|---|---|
Legal Compliance | Ensured through regulatory testing and verification | |
UI/UX Design | Developed incrementally in sprints based on feedback | Defined at the start, no major changes during development |
System Updates | Iterative updates based on user feedback and testing | Updates are planned and finalized during the testing phase |
Sensor Data Collection | Handled incrementally in sprints, with testing at each phase | Specifically defined during requirements phase and verified in testing |
Integration Testing | Tested continuously with each sprint cycle | Performed after development, with verification steps in the V phase |
Hardware Development | Prototypes developed and tested during sprints | Hardware specification created early and tested at the end |
Functional Specifications | Developed iteratively, refined during each sprint | Fully defined at the start and validated during testing |
Iterative Feature Development | Incremental feature delivery, prioritizing immediate needs | Defined upfront, with all features designed and tested before deployment |
End-to-End Testing | Tested throughout the development cycle | Tested at the end of the development cycle in the validation phase |
Quality Assurance | Ongoing throughout sprints, with continuous feedback loops | Tested at the end of the development phase, following strict requirements |
Purchase Hardware | May be managed during the sprint as necessary | Planned and acquired early, before development begins |
Communication with Stakeholders | Frequent communication through Slack and regular sprint reviews | Communicated mainly at the start and end of the development cycle |
💡Scrum is ideal for managing iterative and independent tasks in our IoT Plant Watering System project, such as feature development, sensor integration, and system design
💡The V-Model is more rigid, following a sequential flow where system critical requirements are verified and validated before proceeding, ensuring that the system meets all specifications and requirements before deployment
git submodule add backend
cd backend
git checkout develop
git add
git commit -m "[ticket number] Implemented feature API v2"
git push origin develop
git checkout main
git pull origin main
git merge develop
git push origin main
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git submodule add backend
cd backend
git clone
cd
git checkout develop
git add
git commit -m "[ticket number] Implemented feature API v2"
git push origin develop
git checkout develop
git pull origin develop
git merge upstream/develop
git push origin develop
git checkout main
git pull origin main
git merge develop
git push origin main
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git submodule add backend
cd backend
git checkout feature-api-v2
git add
git commit -m "[ticket number] Implemented feature API v2"
git push origin feature-api-v2
git checkout develop
git pull origin develop
git merge feature-api-v2
git push origin develop
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
git checkout develop
git pull origin develop
git merge main
git push origin main
V-Model | Scrum | |
---|---|---|
GitFlow | + Main & Develop reflect structured phases | + Feature branches for iterative development |
Forking | + Forks represent separate validation environments | + Pull requests enable collaborative sprint integration |
Feature Branch | + Branches align with specific verification steps | + Short-lived branches support rapid iteration |
git init main-repo
git submodule add embedded
git submodule add backend
git submodule add frontend
git add
git commit -m "Added submodules"
git push origin main
Aspect | Apply Scrum | Apply V-Model |
---|---|---|
Legal Compliance | After requirements phase | During requirements phase |
UI/UX Design | Minor changes | Major requirements |
System Updates | As early as possible | Implementation phase |
Sensor Data Collection | As early as possible | Implementation/testing/production phase |
Integration Testing | As early as possible | Testing phase |
Hardware Development | As early as possible | Implementation phase |
Functional Specifications | Minor function changes at any phase | At requirements phase |
Iterative Feature Development | Minor feature changes at any phase | At requirements phase |
End-to-End Testing | As early as possible | Testing/production phase |
Quality Assurance | Every sprint | Testing/production phase |
Purchase Hardware | As early as possible | Implementation phase |
Communication with Stakeholders | Weekly at sprint demo | System testing phase |
Please start visual studio
git clone https://github.com/SE4CPS/PlantWaterSystem.git
git checkout -b feature-ticket-123-add-refresh-button
git commit -m "Added flower data refresh functionality"
git push origin feature-ticket-123-add-refresh-button"
Performing through automated ticket closing
git commit -m "Closes #123: Added flower data refresh functionality"
git commit -m "Fixes #123: Added flower data refresh functionality"
git commit -m "Resolves #123: Added flower data refresh functionality"
Software architecture represents a shared understanding among developers of the system's design
Ralph Johnson, "Software Architecture: A Shared Understanding"The decisions you wish you could get right early in a project...
Ralph Johnson, "Software Architecture: A Shared Understanding"Architecture defines the application boundaries by specifying which components belong to the system and which are external.
A RESTful API (Representational State Transfer) is a set of guidelines for building web services that interact over HTTP, using a stateless architecture and standard HTTP methods (GET, POST, PUT, DELETE) to perform operations
In REST, resources are represented by URLs. These URLs should be descriptive, hierarchical, and correspond to the underlying data or object. Example: /users/{id} to access a specific user
Each request from the client to the server must contain all the information needed to understand and process the request. The server does not store any client context between requests
RESTful APIs commonly use JSON (JavaScript Object Notation) to exchange data, offering a lightweight and human-readable format for data transfer
RESTful APIs use standard HTTP status codes to indicate the success or failure of an API request. Example: 404 for "Not Found," 200 for "OK," 400 for "Bad Request."
RESTful APIs often use token-based authentication, such as OAuth or JWT (JSON Web Tokens), to ensure secure communication between clients and servers
RESTful APIs can improve performance through caching mechanisms like HTTP cache headers, which store responses to reduce redundant requests
/users
)
GET /api/flowers
Retrieves all flowers' watering status.
GET /api/flowers/<flower_id>
Retrieves a specific flower's watering status by ID.
PUT /api/flowers/<flower_id>
Updates the watering status of a specific flower by ID.
GET /api/users
Retrieves all users' data.
GET /api/users/<user_id>
Retrieves a specific user's data by ID.
PUT /api/users/<user_id>
Updates a specific user's data by ID.
Feature Toggles (often also referred to as Feature Flags) are a powerful technique that allows teams to modify system behavior without changing code. By enabling or disabling specific features, teams can control which functionality is available in a live environment without deploying new code. This technique enables easier A/B testing, gradual rollouts, and quick rollback in case of issues.
Feature Toggles (also known as Feature Flags) allow us to modify system behavior without changing the code. In this example, we use feature toggles to control different features of the plant watering system.
class FeatureToggles {
constructor() {
this.toggles = {
"automatic_watering": false,
"send_alerts": false,
"log_watering_activity": false
};
}
isEnabled(feature) {
return this.toggles[feature] || false;
}
enableFeature(feature) {
this.toggles[feature] = true;
}
disableFeature(feature) {
this.toggles[feature] = false;
}
}
const featureToggles = new FeatureToggles();
if (featureToggles.isEnabled("automatic_watering")) {
console.log("Watering plants automatically...");
} else {
console.log("Automatic watering is disabled.");
}
if (featureToggles.isEnabled("send_alerts")) {
console.log("Sending watering alerts...");
} else {
console.log("Alert sending is disabled.");
}
Layer | Responsibilities |
---|---|
Sensor | Collects data from the physical environment (e.g., water level, temperature) |
Operating System | Manages hardware resources and provides basic services for the embedded system |
Presentation | Handles user interface, user input |
Application | Handles business logic, request routing |
Business Logic | Defines the core operations and services |
Data Access | Handles communication with data sources, APIs |
Database | Stores persistent data and ensures data consistency |
Attribute | Description |
---|---|
Performance | System's responsiveness and resource usage efficiency |
Scalability | Ability to handle increased load by scaling resources |
Reliability | System's ability to operate without failure over time |
Maintainability | Ease of making changes to the system, fixing bugs, and adding features |
Security | Protection from unauthorized access, attacks, and vulnerabilities |
Usability | Ease of use for end users and administrators |
Accessibility | Ensuring the system is usable by people with disabilities |
Step | Description |
---|---|
1. Requirement Gathering | Understand the system’s functional and non-functional requirements |
2. Architecture Planning | Define the high-level structure, components, and relationships |
3. Design Components | Design individual system components and their interactions |
4. Evaluate Design Alternatives | Analyze different architectural styles and patterns to choose the best fit |
5. Prototyping | Create a prototype or proof-of-concept to validate the design |
6. Document Architecture | Document the architecture using diagrams and descriptions for future reference |
7. Review and Refinement | Review the architecture with stakeholders and make necessary refinements |
The Flower Care app integrates sensors to collect real-time data on soil moisture, temperature, and light. Users can monitor plant health, set watering schedules, and receive alerts. The app requires scalable, fault-tolerant architecture for handling growing data and user interactions. Key options include monolithic (simple, all-in-one), layered architecture (separation of concerns), microservices (independent services for scalability), and event-driven architecture (real-time, event-based processing). Which architecture is optimal for performance, scalability, and maintainability?
1. What is the main advantage of using microservices architecture?
Correct Answer: Option B
2. Which architecture pattern focuses on the separation of concerns and layers?
Correct Answer: Option B
3. In which architecture is the system organized into independent, loosely-coupled components that communicate via events?
Correct Answer: Option B
4. Which architectural style is best suited for applications that require high performance and direct client interaction?
Correct Answer: Option C
5. Which of the following is a key characteristic of a layered architecture?
Correct Answer: Option D
Why prioritize Data Pipeline before Software Architecture?
How Data Pipeline Architecture improve scalability?
Why good data flow critical before software architecture?
Raw Sensor Data | Device +----+----------+------+---------+ | id | sensor | water_hydration | +----+----------+----------------+ | 1 | SensorA | 45 | +----+----------+----------------+ +----+----------+------+---------+ | id | sensor | water_hydration | +----+----------+----------------+ | 2 | SensorB | 38 | +----+----------+----------------+ +----+----------+------+---------+ | id | sensor | water_hydration | +----+----------+----------------+ | 3 | SensorC | 40 | +----+----------+----------------+
Data Lake +----+----------+-----------+ | id | raw_data | timestamp | +----+----------+-----------+ | 1 | {JSON} | 12:01:30 | | 2 | {JSON} | 12:02:10 | | 3 | {JSON} | 12:02:10 | | 1 | {JSON} | 09:08:10 | | 2 | {JSON} | 11:10:10 | | 3 | {JSON} | 01:06:10 | | 1 | {JSON} | 04:05:10 | | 2 | {JSON} | 12:04:10 | | 3 | {JSON} | 01:06:10 | | 1 | {JSON} | 04:05:10 | | 2 | {JSON} | 12:04:10 | | 3 | {JSON} | 01:06:10 | | 1 | {JSON} | 04:05:10 | | 2 | {JSON} | 12:04:10 | +----+----------+-----------+
Data Warehouse +----+----------+--------------+ | id | sensor | avg_hydration | +----+----------+--------------+ | 1 | SensorA | 46 | | 2 | SensorB | 39 | +----+----------+--------------+
Dashboard +----------+------------------+ | Sensor | Avg Hydration (%)| +----------+------------------+ | SensorA | 46 | | SensorB | 39 | +----------+------------------+
Raw Sensor Data | SQLite
Data Lake | MongoDB
Data Warehouse | MySQL
Dashboard | IndexedDB
Sensor Cache | SQLite
Lake Persisted | MongoDB
Warehouse Cache | MySQL
Dashboard Cache | IndexedDB
Sensor Cache | SQLite
Lake Persisted | MongoDB
Warehouse Cache | MySQL
Dashboard Cache | IndexedDB
Trigger Type | Description |
---|---|
Time-based | Data is loaded at specific time intervals (e.g., every 5 minutes) |
Event-based | Data is loaded when a specific event occurs (e.g., user action, system change, value changed) |
Business Logic +------------------------+ | Handle IoT device | | interactions, data | | processing, and | | communication | +------------------------+
Error Logs +------------------------+ | Logs errors from | | Business Logic | | component, including | | device failure, | | performance issues, | | and system faults | +------------------------+
Public Endpoints +------------------------+ | Expose data to | | external clients or | | third-party services | | (e.g., weather, | | monitoring systems) | +------------------------+
Private/Internal Endpoints +------------------------+ | Handle sensitive data | | (e.g., device control, | | authentication, and | | configuration) | | Restricted to | | internal services and | | devices | +------------------------+
Public Endpoints +------------------------+ | Provide external data | | (e.g., weather forecast| | for plant hydration) | | Accessible by external | | users or services (e.g.| | mobile app, monitoring)| +------------------------+
Private/Internal Endpoints +------------------------+ | Manage device control | | (e.g., soil moisture | | threshold, water valve | | activation) | | Handle authentication | | and device status | +------------------------+
Authentication Method | Lifetime Option | Description |
---|---|---|
UUID | Permanent | UUID remains valid until it is manually revoked or changed |
UUID | Time-limited | UUID expires after a predefined period, requiring re-authentication |
Username/Password | Session-based | Valid for the duration of the session, requiring re-authentication after expiration. |
Username/Password | Time-limited | Expires after a predefined period, and requires re-login to access |
Username/Password | Multi-factor (MFA) | Requires additional authentication factors after the initial login, often with time-based tokens |
We are considering two endpoints for a sensor data retrieval system. Please propose the appropriate endpoint signatures:
Parameter | Details |
---|---|
Endpoint URL | [Propose URL structure] |
HTTP Method | [Propose HTTP method] |
Input | [Propose input parameters] |
Output | [Propose output format, e.g., JSON] |
GET http://localhost:3000/auth/user?username=user1&password=password1
{"message": "User user1 authenticated"}
GET http://localhost:3000/auth/sensor?uuid=UUID-123
{"message": "Sensor UUID-123 authenticated"}
Priority | Epic | Description |
---|---|---|
1 | Legal Requirements | Ensure compliance with data protection and user privacy laws |
2 | User Authentication | Implement secure user login and access control mechanisms |
3 | Watering Automation | Automate the watering schedule based on plant needs |
4 | Soil Moisture Monitoring | Integrate sensors to monitor soil moisture levels |
5 | Mobile Application | Develop a user-friendly app for monitoring and controlling the system |
6 | Notifications and Alerts | Send alerts for low moisture levels or system failures |
7 | Data Analytics | Analyze watering patterns and plant health for optimization |
Task | Responsible | Accountable | Consulted | Informed |
---|---|---|---|---|
Define Project Scope | Project Manager | Stakeholders | Team Leads | All Team Members |
Design System Architecture | System Architect | Project Manager | Developers | Stakeholders |
Implement Sensors | Developers | System Architect | Technicians | Project Manager |
Test System | QA Team | Project Manager | Developers | Stakeholders |
Deploy System | IT Team | Project Manager | All Team Members | Stakeholders |
function validateTemperature(temp) {
if (typeof temp !== "number" || temp < 0 || temp > 100) {
throw new Error("Invalid temperature value");
}
return temp;
}
try {
let data = fetchData();
} catch (error) {
console.error("Data fetch failed:", error.message);
}
function hashPassword(password) {
return crypto.createHash("sha256").update(password).digest("hex");
}
const MAX_TEMP = 100;
if (sensorValue > MAX_TEMP) {
alert("Temperature too high!");
}
function calculateWaterNeed(plantType) {
const needs = { cactus: 1, fern: 5, rose: 3 };
return needs[plantType] || 2;
}
function getSensorData(sensor) {
return sensor?.read() ?? "No Data Available";
}
function fetchData() {
return api.get("/data");
}
function processData(data) {
return data.map(cleanData);
}
function logEvent(event) {
console.log(`[${new Date().toISOString()}] Event: ${event}`);
}
{
"data": [
{
"sensorId": "sensor_003",
"timestamp": "2025-02-19T10:10:00Z",
"moistureLevel": -5,
"temperature": null
}
]
}
{
"data": [
{
"sensorId": "sensor_001",
"timestampInstallation": "2024-05-19T10:00:00Z",
"timestampLastValue": "2025-02-19T10:00:00Z",
"moistureLevel": 45,
"temperature": 22.5,
"status": "active"
}
]
}
{
"data": [
{
"sensorId": "sensor_001",
"location": "Benerd 208",
"timestampInstallation": "2024-05-19T10:00:00Z",
"timestampLastValue": "2025-02-19T10:00:00Z",
"moistureLevel": 45,
"temperature": 22.5,
"batteryLevel": 85,
"signalStrength": -65,
"calibrationDate": "2025-01-10T12:00:00Z",
"status": "active",
"alerts": []
}
]
}
Define internal standards
Task | Responsible | Accountable | Consulted | Informed |
---|---|---|---|---|
Define Update Criteria | Project Manager | Stakeholders | Team Leads | All Team Members |
Monitor Software Dependencies | Developers | Project Manager | System Architect | Stakeholders |
Assess Impact of Updates | QA Team | Project Manager | Developers | Stakeholders |
Test Updates | QA Team | Project Manager | Developers | Stakeholders |
Deploy Updates | IT Team | Project Manager | All Team Members | Stakeholders |
class PlantWateringSystem:
def __init__(self):
self.user_data = [] # Stores user data without consent
self.water_count = 0 # Tracks number of waterings per day
def collect_user_data(self, user_name, email):
self.user_data.append({'name': user_name, 'email': email}) # No consent
def water_plants(self, amount):
self.water_count += 1
print(f"Watered plants with {amount} liters.")
class PlantWateringSystem:
def __init__(self):
self.user_data = [] # Stores user data without consent
self.sensors = {'sensor1': 0, 'sensor2': 0} # Different sensors
def update_sensor_reading(self, sensor, reading):
self.sensors[sensor] = reading
class PlantWateringSystem:
def __init__(self):
self.user_data = [] # Stores user data without consent
self.last_watered_days = 0 # Days since last watering
def check_watering_interval(self):
# self.last_watered_days
Aspect | Verification | Validation | Testing |
---|---|---|---|
Definition | Ensures the product is being built correctly according to specifications | Ensures the right product is being built to meet user needs | Checks the actual execution of software to detect defects |
Focus | Process-oriented (reviews, inspections, static analysis) | End-user requirements and overall functionality | Finding bugs by executing the software |
When? | Before coding (design, documentation, planning stages) | After implementation but before deployment | During and after development |
Examples | Code reviews, design reviews, requirement analysis | User acceptance testing (UAT), system testing | Unit testing, integration testing, regression testing |
Outcome | Ensures the software conforms to design and requirements | Ensures the software meets business needs | Finds defects and ensures software functions correctly |
Test Type | Developer | Tester | QA Engineer | Management | Client/User |
---|---|---|---|---|---|
Unit Testing | R | A | C | I | I |
Component Testing | R | A | C | I | I |
Integration Testing | C | R | A | I | I |
System Testing | - | R | A | I | I |
Acceptance Testing | - | C | R | I | I |
Regression Testing | - | R | A | I | I |
Verification Activity | Developer | Tester | QA Engineer | Management | Client/User | Requirements Engineer | UI/UX Designer |
---|---|---|---|---|---|---|---|
Requirements Review | - | C | A | I | I | R | - |
Design Review | A | C | - | I | I | - | R |
Code Review | R | - | C | I | I | - | - |
Static Analysis | - | R | A | I | I | - | - |
Test Case Review | - | R | C | I | I | - | - |
Validation Activity | Developer | Tester | QA Engineer | Management | Client/User |
---|---|---|---|---|---|
System Analysis Validation | R | - | - | I | - |
System Design Validation | - | R | - | I | - |
Component Design Validation | - | - | R | I | - |
User Acceptance Testing | - | - | - | I | R |
Field Testing | - | - | A | I | R |
Final Product Review | - | C | A | I | R |
Test Case → Implementation → Testing
Implementation → Test Case → Testing
+----------------+ +----------------+ +----------------+
| Input | ---->| Function | ---->| Output |
+----------------+ +----------------+ +----------------+
+----------------+ +----------------+ +----------------+
| Arrange | ---->| Act |----> | Assert |
+----------------+ +----------------+ +----------------+
// Arrange: Input data
const a = 2;
const b = 3;
// Act: Function to sum two numbers
function sum(a, b) {
return a + b;
}
// Assert: Test using console.assert
console.assert(sum(a, b) === 5, "Test failed: Expected 5"); // Output: No output if the test passes
// Arrange: Input data
const a = 2;
const b = 3;
// Act: Function to sum two numbers
function sum(a, b) {
return a + b;
}
// Assert: Test using Jest
test('sum adds numbers', () => {
expect(sum(a, b)).toBe(5); // Output: Passes if the sum is correct
});
// Arrange
const soilMoistureLevel = 20; // Moisture level in percentage
const expectedOutput = "Watering required"; // Expected output
// Act
const result = checkWaterNeed(soilMoistureLevel); // Function to test
// Assert
console.assert(result === expectedOutput, "Test failed: Expected 'Watering required'");
// Arrange
const plant = { type: "Cactus", soilMoisture: 15 };
const expectedMessage = "Cactus needs watering";
// Act
const result = waterPlant(plant); // Function that integrates soil moisture check and watering
// Assert
console.assert(result === expectedMessage, "Test failed: Expected 'Cactus needs watering'");
// Arrange
const plantData = [{ type: "Fern", soilMoisture: 30 }, { type: "Cactus", soilMoisture: 10 }];
const expectedStatus = "All plants checkeWatering required for 1 plant.";
// Act
const result = manageWateringSystem(plantData); // Function to manage watering for all plants
// Assert
console.assert(result === expectedStatus, "Test failed: Expected 'All plants checked.'");
function checkWaterLevel(current, required) {
console.assert(current >= required,
`Not enough water! Required: ${required}L, Current: ${current}L`);
}
checkWaterLevel(5, 3); // Passes
checkWaterLevel(1, 3); // Fails
# Install Jest
npm install --save-dev jest
# Create a test file (e.g., sum.test.js)
function sum(a, b) {
return a + b;
}
test('adds 1 + 2 to equal 3', () => {
expect(sum(1, 2)).toBe(3);
});
# Run the tests
npx jest
+-------------+ REST API +--------------+ Database Queries +-------------+ | Frontend | <-----------> | Backend | <------------------> | Database | | (Web/Mobile)| | (API, Logic) | | (SQL/NoSQL) | +-------------+ +--------------+ +-------------+ ^ | REST API | | +-------------+ | IoT Device | | (Sensors) | +-------------+
Method | Meaning | Uploads Data? | Downloads Data? |
---|---|---|---|
GET | Retrieve data from the server | No | Yes |
POST | Create a new resource | Yes | Yes (Response) |
PUT | Update/replace an existing resource | Yes | Yes (Response) |
PATCH | Partially update an existing resource | Yes | Yes (Response) |
DELETE | Remove a resource | No | Yes (Response) |
Code | Category | Meaning |
---|---|---|
200 | Success | OK – Request succeeded |
201 | Success | Created – Resource successfully created |
204 | Success | No Content – Request succeeded, no content to return |
400 | Client Error | Bad Request – Invalid request from client |
401 | Client Error | Unauthorized – Authentication required |
404 | Client Error | Not Found – Resource doesn’t exist |
429 | Client Error | Too Many Requests – Rate limit exceeded |
500 | Server Error | Internal Server Error – Something went wrong |
503 | Server Error | Service Unavailable – Server is overloaded or down |
Parameter | Description | Example |
---|---|---|
HTTP Method | The type of request (e.g., GET, POST) | POST |
URL | The endpoint of the API specifying the resource | https://sproutly.com/plants/watering |
Headers | Metadata sent with the request for context | Content-Type: application/json |
Query Parameters | Optional parameters for filtering or modifying requests | ?plantId=123&status=watered |
Path Parameters | Parameters included in the URL path to specify a resource | /plants/123 |
Request Body | Data sent with POST, PUT, or PATCH requests | { "plantId": 123, "waterAmount": "500ml" } |
Response Codes | Status codes indicating the outcome of the request | 200 OK |
Response Body | The data returned by the server, typically in JSON format | { "status": "success", "message": "Plant watered successfully." } |
POST https://sproutly.com/plants/watering
Content-Type: application/json
{
"plantId": 123,
"waterAmount": "500ml"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "success",
"message": "Plant watered successfully."
}
POST https://sproutly.com/plants/watering
Content-Type: application/json
{
"plantId": 999, // Non-existent plant ID
"waterAmount": "500ml"
}
HTTP/1.1 404 Not Found
{
"error": {
"code": 404,
"message": "Plant not found.",
"details": "No plant found with the ID 12345.",
"suggestion": "Please check the plant ID and try again."
}
}
This error object provides:
{
"error": {
"code": 404,
"message": "Plant not found.",
"details": "No plant found with the ID 12345.",
"suggestion": "Please check the plant ID and try again.",
"customer_id": "CUST-98765",
"timestamp": "2025-02-26T12:34:56Z"
}
}
This error object provides:
GET /plants/{id}
Description: Retrieves detailed information about a specific plant by its ID.
Parameters: - id (path): The unique identifier of the plant.
Response: {
"id": 123,
"name": "Plant A",
"description": "A beautiful indoor plant.",
"status": "available"
}
Example Request: curl -X GET "https://api.sproutly.com/plants/123"
POST /plants
Description: Adds a new plant to the inventory.
Request Body: {
"name": "Plant B",
"description": "A lovely outdoor plant.",
"status": "available"
}
Authentication: Requires Bearer token in the Authorization header.
Parameters:
- name (query, optional): The name of the plant.
- type (query, optional): The type of plant (e.g., indoor, outdoor).
- status (query, optional): Availability status of the plant (e.g., available, sold out).
Response: {
"results": [
{
"id": 123,
"name": "Plant A",
"type": "indoor",
"status": "available"
},
{
"id": 124,
"name": "Plant B",
"type": "outdoor",
"status": "sold out"
}
],
"total": 2
}
Example Request: curl -X GET "https://api.sproutly.com/plants/search?name=Plant&type=indoor"
POST /plants
Description: Adds a new plant to the inventory.
Request Body: {
"name": "Plant B",
"description": "A lovely outdoor plant.",
"status": "available"
}
Authentication: Requires Bearer token in the Authorization header.
// Unit Test: Testing a single function
function calculateWaterNeed(plantType) {
const needs = { cactus: 1, fern: 5, rose: 3 };
return needs[plantType] || 2;
}
// Test
const result = calculateWaterNeed('cactus');
console.assert(result === 1, `Expected 1, but got ${result}`);
// Component Test: Testing a component that uses multiple functions
function checkWaterNeed(plant) {
const waterNeed = calculateWaterNeed(plant.type);
return plant.soilMoisture < waterNeed ? 'Watering required' : 'No watering needed';
}
// Test
const plant = { type: 'fern', soilMoisture: 2 };
const result = checkWaterNeed(plant);
console.assert(result === 'Watering required', `Expected 'Watering required', but got ${result}`);
// Integration Test: Testing the interaction between multiple components
function manageWateringSystem(plants) {
return plants.map(plant => ({
...plant,
status: checkWaterNeed(plant)
}));
}
// Test
const plants = [
{ type: 'fern', soilMoisture: 2 },
{ type: 'cactus', soilMoisture: 3 }
];
const expected = [
{ type: 'fern', soilMoisture: 2, status: 'Watering required' },
{ type: 'cactus', soilMoisture: 3, status: 'No watering needed' }
];
const result = manageWateringSystem(plants);
console.assert(JSON.stringify(result) === JSON.stringify(expected), `Expected ${JSON.stringify(expected)}, but got ${JSON.stringify(result)}`);
Midterm Practice Questions
Why is software engineering important in the development of IoT/CPS systems?
E
What are some key differences between traditional software engineering and software engineering in IoT/CPS?
All of the above
What are the different levels of requirements in software engineering?
E
Why are requirements important for IoT/CPS systems?
E
What are the differences between Unstructured Requirements, Epics, User Stories, and Tasks in software engineering?
C
What is the difference between User Stories and Tasks?
D
What components does a User Story typically have in software engineering?
E
What is the typical structure of a User Story in software engineering?
E
What is a key difference between the Waterfall model and the V-Model in software development?
B
What is a key difference between the V-Model and Agile Model in software development?
C
What are the phases of the V-Model in software development?
B
Why can Scrum be integrated into the V-Model in software development?
E
How does Conway's Law relate to team structure and software architecture?
A
Why can Scrum be integrated into the V-Model in software development?
B, C, D
How does the V-Model mitigate the risks associated with Conway's Law?
B
How does the V-Model mitigate the risks with the Form, Storm, Norm, and Perform?
E
Does the V-Model natively support cross-functional teams in software development?
B
Which aspects require the V-Model?
What is a key difference between the Incremental Model and the Sequential (Waterfall) Model?
B
What is the definition of software architecture?
B
Which of the following are architectural decisions in software development?
A, B, C
What is the API-first approach in architectural design?
C
What is the role of feature toggles in architectural design?
A
How do feature toggles support the V-Model in real applications?
A
Why does the event-driven model match well with IoT/CPS systems?
A, C
Why is the layered model a good model for IoT/CPS systems?
C
Why are IoT/CPS systems impacted by legal constraints?
A, B, C
In theory, are legal requirements more aligned with the Sequential or Incremental Model?
A
How does the V-Model align with legal requirements?
C
In a RACI chart, who is legally chargeable?
Accountable
Do legal requirements prevent errors in software, hardware, or data?
B
What mechanism do accountable roles use to mitigate risks in software development?
A
What is the difference between testing, verification, and validation?
All of the above
RACI Chart for a Software Development Project
Task | Responsible | Accountable | Consulted | Informed |
---|---|---|---|---|
Requirement Gathering | ? | Project Manager | Stakeholders | ? |
Design | Architect | Project Manager | ? | Stakeholders |
Implementation | Developers | Technical Lead | Architect | Project Manager |
Testing | QA Team | QA Lead | Developers | Project Manager |
Deployment | DevOps Engineer | Technical Lead | QA Team | Stakeholders |
In a RACI chart, who is responsible for the Implementation task?
Developers
How much of the V-Model's effort is typically allocated to testing?
50%
Does testing in the V-Model happen in parallel with implementation or after implementation?
After implementation
Which test levels in the V-Model require coding skills?
Unit Testing
What are the steps in the Arrange, Act, Assert (AAA) pattern for unit tests?
All of the above
Will this unit test case be OK or NOK?
// Arrange
const a = 2;
const b = 3;
const expectedSum = 5;
// Act
const result = a + b - 1;
// Assert
console.assert(result === expectedSum, `Expected ${expectedSum}, but got ${result}`);
What does Test-Driven Development (TDD) mean in software development?
Writing tests before the code is implemented
How does Test-Driven Development (TDD) align with the V-Model in software development?
Both emphasize early testing and validation
Why is Test-Driven Development (TDD) considered difficult in software development?
It demands a thorough understanding of the requirements and design upfront
As a tester, if the software fails, do you go test levels down or up?
Down
Which test levels in V-Model for IoT/CPS can be more/less automated?
More automated: Unit Testing, Component Testing, Integration Testing
Less likely to be automated: System Testing, Acceptance Testing
How can sensor errors be identified and mitigated during testing in IoT/CPS systems?
All of the above
During testing, the sensor is occasionally not working correctly. Please a paragraph with a plan how to find the error?
A legal regulation states that from March/2025 indoor plants cannot be watered using our system. How do you recommend addressing the issue in the current (MVP 1) plant watering project? How does it impact our process? Please provide a paragraph.
Why are unit tests easier to automate compared to component tests?
Correct Answer: All of the above.
Will the following unit test pass or fail?
function add(a, b) {
return a + b + b;
}
function unittests() {
// Arrange
const a = 10, b = 5;
// Act
const result = add(a, b);
// Assert
console.assert(result === 15, `Test failed: expected 15, got ${result}`);
}
unittests();
Will the following unit test pass or fail?
function multiply(a, b) {
return a * b;
}
function unittests() {
// Arrange
const a = 4, b = 3;
// Act
const result = multiply(a, b);
// Assert
console.assert(result === 12, `Test failed: expected 12, got ${result}`);
}
unittests();
Will the following unit test pass or fail?
function subtract(a, b) {
return a - b;
}
function unittests() {
// Arrange
const a = 10, b = 5;
// Act
const result = subtract(a, b);
// Assert
console.assert(result === 4, `Test failed: expected 4, got ${result}`);
}
unittests();
Our flower inventory management system will be installed for outdoor plants in a different climate zone. Please list five ways it will impact our current prototype and why?
In a flower inventory management system, where multiple features such as stock tracking, price updates, and order management are being developed simultaneously, there is little capacity for extensive review processes before merging. The need to push frequent updates quickly—such as adding new flowers to the database, adjusting prices based on seasonal demand, or managing promotions—requires a workflow that can handle continuous integration and deployment
Please explain three reasons why Feature GitFlow might not be suitable for this system?
When adding one feature to the flower inventory management system, what type of issue should you create?
Correct Answer: User Story Issue.
When planning a major upgrade to the flower inventory management system, which will include multiple related features, what type of issue should you create?
Correct Answer: Epic Issue.
The flower inventory management system is expanding to support multiple locations, each with its own stock, pricing, and order processing. The system must be scalable, allow independent deployment of features, and handle high availability. Which architecture—Layered Architecture, Microservices, or Client-Server—would be the most suitable choice, and why?
Which is a key difference between software engineering for IoT and traditional software development?
IoT software must handle constrained resources and real-time constraints, unlike most traditional software
Which of the following is a more critical requirement for IoT software compared to traditional software?
Managing intermittent connectivity and energy efficiency constraints
At the beginning of the V-Model process, what type of requirements are primarily defined?
High-level epics and user stories
According to Conway’s Law, if a software is built by two teams, what is the expected architecture?
Two interacting components
In the V-Model, if a user story validation fails after implementation, what is the correct next step?
Escalate to requirements verification phase
Why is the V-Model a good software engineering process for IoT software?
It links requirements, design, and quality effectively for IoT
Why is the V-Model often extended with Agile/Scrum Model?
Agile adds incremental development to the V-Model
Why is the sequential V-Model not strictly sequential?
Bug fix implementation throughout the process
Which architecture does the plant watering system app have?
Layered design with embedded, frontend, and backend
How does the V-Model address compliance with legal requirements?
Through emphasis on verification, validation, and testing
What is the difference between verification, validation, and testing?
Verification checks requirements, validation checks the right problem, and testing checks errors
Which of the following best describes the "Arrange, Act, Assert" (AAA) pattern in testing?
Arrange test data, act on the system, and assert the outcome
Why is the AAA testing principle useful?
It provides structured tests for all levels
How does Test-Driven Development (TDD) align with the V-Model?
TDD writes tests before code, aligning with V-Model’s early validation
When does software testing happen in the V-Model?
After software implementation
How can you test if a plant water sensor is defective even if the value is valid?
By checking if the sensor provides consistent readings over time
What do stakeholders do after completing their phase in the V-Model?
They prepare for the validation phase and support other teams in the meantime
Why can requirements be estimated, but bug fixes cannot be easily estimated for IoT software?
In the V-Model, requirements are well-defined, while bug fixes are unpredictable
Data Structure | Options to Re-use Data |
---|---|
Ring List |
|
Array |
|
Linked List |
|
Hash Table |
|
Queue |
|
class RingBuffer:
def __init__(self, size):
self.size = size
self.data = [None] * size
self.index = 0
def append(self, value):
self.data[self.index] = value
self.index = (self.index + 1) % self.size
def get(self):
return self.data
ring = RingBuffer(5)
for i in range(7):
ring.append(i)
print(ring.get())
Software designed to optimize energy consumption in battery-powered devices by reducing power usage while maintaining functionality
Adaptive Sync Interval: Adjusts data transmission frequency based on watering time
function getSyncInterval(lastWatered) {
const now = new Date();
const hoursSinceWatered = (now - lastWatered) / (1000 * 60 * 60);
if (hoursSinceWatered < 6) {
return 6 * 60 * 60 * 1000; // 6 hours
} else if (hoursSinceWatered < 24) {
return 2 * 60 * 60 * 1000; // 2 hours
} else {
return 30 * 60 * 1000; // 30 minutes
}
}
const lastWatered = new Date('2025-03-15T08:00:00');
const syncInterval = getSyncInterval(lastWatered);
console.log(`Next sync in ${syncInterval / (60 * 1000)} minutes.`);
navigator.getBattery().then(battery => {
function monitorTemperature() {
const temperature = battery.temperature;
console.log(`Battery Temperature: ${temperature}°C`);
if (temperature > 40) { // Example threshold
console.log('Warning: Battery temperature is too high!');
// Trigger alert or cooling system here
}
}
setInterval(monitorTemperature, 5000); // Check every 5 seconds
});
Proper disposal of batteries is essential to protect the environment and comply with regulations.
navigator.getBattery().then(battery => {
console.log(`Battery Level: ${Math.round(battery.level * 100)}%`);
console.log(`Charging: ${battery.charging ? 'Yes' : 'No'}`);
battery.addEventListener('levelchange', () => {
console.log(`Updated Battery Level: ${Math.round(battery.level * 100)}%`);
});
battery.addEventListener('chargingchange', () => {
console.log(`Charging Status: ${battery.charging ? 'Yes' : 'No'}`);
});
});
Connectivity Type | Typical Bandwidth (Mbps) |
---|---|
Bluetooth Low Energy (BLE) | 0.1 - 2 Mbps |
Bluetooth Classic | 1 - 3 Mbps |
4G LTE | 10 - 100 Mbps |
Wi-Fi (802.11ac) | 100 - 1000 Mbps |
// Example: Display GPS coordinates
const coordinates = [
{lat: 37.7749, lng: -122.4194}, // San Francisco
{lat: 34.0522, lng: -118.2437} // Los Angeles
];
console.log(coordinates); // Output: GPS values
JSON (Human-readable) | Protobuf (Compact Binary) |
---|---|
|
|
json_data = '{"flower_id": 101, "last_watered": "2025-03-15", "water_amount_ml": 200}'
data = json.loads(json_data)
flower = flower_pb2.FlowerWatering(**data)
protobuf_data = flower.SerializeToString()
flower_parsed = flower_pb2.FlowerWatering()
flower_parsed.ParseFromString(protobuf_data)
protobuf_json = json.dumps({
"flower_id": flower_parsed.flower_id,
"last_watered": flower_parsed.last_watered,
"water_amount_ml": flower_parsed.water_amount_ml
})
Data Format | Original Size | Compressed Size | Compression Percentage |
---|---|---|---|
JSON | 1024 KB | 1024 KB | 0% (No Compression) |
Protobuf | 1024 KB | 256 KB | 75% Compression |
Identify the browser and device type using JavaScript
console.log(navigator.userAgent);
navigator.userAgent
provides browser and device details
if (/Mobi|Android/i.test(navigator.userAgent)) {
console.log("Mobile device detected");
} else {
console.log("Desktop detected");
}
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Gecko/20100101 Firefox/115.0
Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/605.1.15
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0
Mozilla/5.0 (Linux; Android 13; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/95.0.0.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Brave/120.0.0.0
Mozilla/5.0 (iPad; CPU OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/605.1.15
Mozilla/5.0 (Linux; Android 13; SM-G998U) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/22.0 Chrome/120.0.0.0 Mobile Safari/537.36
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
// Define API endpoints
const API_ENDPOINTS = {
desktop: "https://api.sproutly.com/full-weather-data",
mobile: "https://api.sproutly.com/compact-weather-data",
embedded: "https://api.sproutly.com/basic-sensor-data"
};
Based on the device type, different endpoints serve the appropriate data response
let selectedEndpoint;
if (userAgent.includes("Mobile") || userAgent.includes("Android") || userAgent.includes("iPhone")) {
selectedEndpoint = API_ENDPOINTS.mobile; // Send compact data
} else if (userAgent.includes("ESP32") || userAgent.includes("RaspberryPi")) {
selectedEndpoint = API_ENDPOINTS.embedded; // Send only essential sensor data
} else {
selectedEndpoint = API_ENDPOINTS.desktop; // Send full weather data
}
console.log("Using API:", selectedEndpoint);
Based on the user agent, the correct API endpoint is selected to optimize the data response
Mobile devices may have limited battery life and slower network speeds, so updates should be less frequent
// Mobile devices update every 30 minutes
if (userAgent.includes("Mobile") || userAgent.includes("Android") || userAgent.includes("iPhone")) {
setInterval(() => {
// Fetch compact weather data for mobile
fetch(API_ENDPOINTS.mobile)
.then(response => response.json())
.then(data => console.log("Mobile Data:", data))
.catch(error => console.error("Mobile API Error:", error));
}, 30 * 60 * 1000); // Update every 30 minutes
}
Media queries adjust CSS based on device features like screen size, resolution, and orientation.
@media (max-width: 768px) {
/* Styles for small screens */
}
@media (max-width: 600px) {
body { font-size: 14px; }
.container { padding: 10px; }
}
The viewport defines the visible area of a web page on the screen
The viewport meta tag sets the visible area of the web page on mobile devices
<meta name="viewport" content="width=device-width, initial-scale=1">
Media queries use the viewport's size to apply different styles for various devices
The viewport meta tag can control zoom behavior on mobile devices
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
Flexbox is a layout model that makes it easier to design responsive layouts without using floats or positioning
To create a flex container, set the container's display property to `flex`
<div class="flex-container">
<div class="flex-item">Item 1</div>
<div class="flex-item">Item 2</div>
<div class="flex-item">Item 3</div>
</div>
<style>
.flex-container {
display: flex; /* Turn container into flexbox */
}
</style>
window.onscroll = function() {
if (elementInView()) {
loadContent();
}
};
function elementInView() {
// Check if the element is in the viewport
return element.getBoundingClientRect().top < window.innerHeight;
}
function loadContent() {
// Logic to load content (e.g., images, data)
console.log('Content loaded');
}
Zero Trust assumes no device, user, or network is trusted by default, ensuring tighter security in IoT environments
Aspect | Our Plant Water Device |
---|---|
Device Identification | |
Device Configuration | |
Data Protection | |
Cybersecurity State Awareness | |
Logical Access to Interfaces | |
Software Update |
Controls who can access data
Restrict DB/API access via unique API keys
postgresql://username:password@host:port/database?sslmode=require
Restrict DB/API access to specific IP addresses
Model | Who Controls Access? | Access Logic | Example | Supported by Relational DBs |
---|---|---|---|---|
RBAC | System (via Roles) | User has role with permission | Doctor role can read patient record | ✅ Widely Supported |
DAC | Record Owner | Owner grants access | Patient grants doctor access | ✅ Partially Supported |
MAC | System (via Labels) | Access requires clearance | Only staff with "Confidential" clearance can read | ❌ Rarely Supported |
GRANT SELECT ON patient_records TO doctor_alex;
CREATE ROLE physician;
CREATE USER dr_smith WITH PASSWORD 'secure123';
GRANT physician TO dr_smith;
GRANT READ ON soil_moisture TO watering_system;
REVOKE READ ON soil_moisture FROM watering_system;
REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA public FROM PUBLIC;
Database | RBAC Support | IP-Based Access | API Key Control |
---|---|---|---|
SQLite | ❌ | ❌ | External Only |
PostgreSQL | ✅ Column-Level | ✅ via pg_hba.conf | External Only |
MariaDB | ✅ Roles + Fine-Grained | ✅ via host-based grants | External Only |
OracleDB | ✅ RBAC + VPD | ✅ via network ACLs | External Only |
Plain Text | Encrypted Text |
---|---|
Device ID: PlantWater_01 | U2FsdGVkX1+gTx4kV7K9Zw== |
Soil Moisture Level: 45% | 8b1a9953c4611296a827abf8c47804d7 |
Watering Schedule: Every 6 hours | 5d41402abc4b2a76b9719d911017c592 |
CREATE TABLE plant_data (
id SERIAL,
plant_id TEXT,
soil_moisture_level TEXT ENCRYPTED FOR STORAGE,
watering_schedule TEXT
);
Plain Text | Encrypted Text |
---|---|
Device ID: PlantWater_01 | U2FsdGVkX1+gTx4kV7K9Zw== |
Soil Moisture Level: 45% | 8b1a9953c4611296a827abf8c47804d7 |
Watering Schedule: Every 6 hours | 5d41402abc4b2a76b9719d911017c592 |
Database | Encryption at Rest | Encryption in Transit | Column-Level | TDE Support |
---|---|---|---|---|
SQLite | ❌ (via extensions) | ❌ | ❌ | ❌ |
PostgreSQL | ✅ (manual) | ✅ (SSL) | ✅ (PGCrypto) | ❌ |
MariaDB | ✅ | ✅ | ✅ (via functions) | ✅ |
OracleDB | ✅ | ✅ | ✅ | ✅ |
user = input("Enter username: ")
query = f"SELECT * FROM users WHERE name = '{user}'"
cursor.execute(query)
Input: alice' OR '1'='1
Query: SELECT * FROM users WHERE name = 'alice' OR '1'='1'
Bypasses authentication and returns all users
user = input("Enter username: ")
query = "SELECT * FROM users WHERE name = %s"
cursor.execute(query, (user,))
Using parameters prevents SQL injection
import logging
logging.basicConfig(level=logging.INFO)
query = "SELECT * FROM patients"
logging.info(f"Running query: {query}")
cursor.execute(query)
query = "SELECT * FROM patients WHERE name = %s"
params = ("Alice",)
logging.info("Query: %s | Params: %s", query, params)
cursor.execute(query, params)
log_statement = 'all'
general_log = ON
An IoT-enabled plant watering app is compromised when a hacker gains access to a user's device and manipulates watering schedules. The device was not properly secured and had default credentials. What security measure would have reduced the risk?
The plant watering app detects an unusual spike in watering requests from a single account, causing overwatering and potential damage to plants. What monitoring or anomaly detection strategy should be implemented?
Connectivity Technology | Market Share (%) |
---|---|
Wi-Fi | 31% |
Bluetooth | Approximately 27% |
Cellular IoT (2G, 3G, 4G, 5G, LTE-M, NB-IoT) | Approximately 22% |
Other Technologies (e.g., Zigbee, LoRa) | Approximately 20% |
Bluetooth Version | Release Year | Security Features |
---|---|---|
Bluetooth 1.0 & 1.0B | 1999 | Basic encryption (weak security), no pairing method |
Bluetooth 2.0 + EDR | 2004 | Improved Data Rate, basic encryption and pairing |
Bluetooth 3.0 + HS | 2009 | High-Speed transfer, improved security with AES encryption |
Bluetooth 4.0 & 4.1 | 2010 & 2013 | Low Energy (LE) with stronger encryption, secure simple pairing |
Bluetooth 4.2 | 2014 | Improved security with better privacy features, improved LE encryption |
Bluetooth 5.0 & 5.1 | 2016 & 2019 | Improved range and connection security, more robust LE encryption |
Bluetooth 5.2 | 2020 | Support for LE Audio, improved encryption, and secure data transfer |
A plant watering system’s point-to-point Wi-Fi connection was compromised, allowing attackers to intercept and manipulate watering data. This disruption caused the system to water plants incorrectly. What security measures should have been implemented?
CREATE EXTENSION IF NOT EXISTS pgcrypto;
Technical Aspect | PGP Encryption (Asymmetric) | Symmetric Encryption (AES, DES) |
---|---|---|
Key Type | Public-Private Key Pair | Single Shared Secret Key |
Encryption Speed | Slower; computationally intensive | Faster; suitable for large data |
Key Management | Complex; public key distribution required | Simpler; secure key sharing essential |
Security Strength | High; secure over insecure channels | Medium to High; risk if key compromised |
Use Case Examples | Email encryption, digital signatures | File encryption, database encryption |
Reference: PostgreSQL pgcrypto Documentation
DROP TABLE secure_data;
CREATE TABLE IF NOT EXISTS secure_data(
id SERIAL PRIMARY KEY,
sensitive_info BYTEA NOT NULL
);
INSERT INTO secure_data (sensitive_info)
VALUES (pgp_sym_encrypt('Secret Information', 'my_strong_password'));
SELECT id, ENCODE(sensitive_info, 'hex') AS encrypted_info
FROM secure_data;
SELECT id, pgp_sym_decrypt(sensitive_info, 'my_strong_password')
AS decrypted_info
FROM secure_data;
Key Concept: Diffie-Hellman allows two parties to establish a shared secret over an insecure channel, used for symmetric key encryption
SET password_encryption = 'scram-sha-256';
CREATE ROLE username WITH LOGIN PASSWORD 'your_secure_password';
SELECT rolname, rolsuper, rolcreaterole, rolcreatedb, rolcanlogin
FROM pg_roles;
SET password_encryption = 'md5';
CREATE ROLE username WITH LOGIN PASSWORD 'your_secure_password';
CREATE USER Bob PASSWORD 'bob_pass_123!';
CREATE USER Alice PASSWORD 'alice_pass_123!';
-- Grant full access to Bob
GRANT ALL PRIVILEGES ON Flowers TO Bob;
-- Grant read-only access to Alice
GRANT SELECT ON Flowers TO Alice;
-- Show all users and roles
SELECT rolname FROM pg_roles;
-- Switch user temporarily
SET ROLE Alice;
-- Switch back
RESET ROLE;
-- Switch to user 'Alice' (read-only)
SET ROLE Alice;
-- Successful query (Alice can SELECT)
SELECT * FROM flowers;
-- Failed query (Alice cannot DELETE)
DELETE FROM flowers WHERE id = 1;
RESET ROLE;
-- Switch to user 'bob' (full access)
SET ROLE Bob;
-- Successful query (Bob can DELETE)
DELETE FROM flowers WHERE id = 1;
RESET ROLE;
REVOKE INSERT ON flowers FROM Bob;
CREATE ROLE viewer;
CREATE ROLE manager;
CREATE USER alice PASSWORD 'alice_pass';
CREATE USER bob PASSWORD 'bob_pass';
GRANT viewer TO alice;
GRANT manager TO bob;
GRANT SELECT ON flowers_core TO viewer;
GRANT SELECT, INSERT, UPDATE ON flowers_pricing TO manager;
GRANT alice TO current_user;
SET ROLE alice;
SELECT * FROM flowers_core;
SELECT * FROM flowers_pricing;
RESET ROLE;
CREATE TABLE flowers_core (
id INTEGER PRIMARY KEY,
name TEXT
);
CREATE TABLE flowers_pricing (
id INTEGER PRIMARY KEY,
price REAL
);
INSERT INTO flowers_core (id, name) VALUES (1, 'Rose');
INSERT INTO flowers_pricing (id, price) VALUES (1, 2.99);
GRANT SELECT ON flowers_core TO viewer;
GRANT SELECT, INSERT, UPDATE ON flowers_pricing TO manager;
Technical Area | Importance of Logging |
---|---|
Query Performance | Identify slow queries and optimize them |
Security | Track unauthorized access attempts |
Error Diagnosis | Understand and debug failed operations |
Auditing | Maintain compliance and trace changes |
Replication & Backup | Ensure consistency and troubleshoot issues |
-- In postgresql.conf:
logging_collector = on
log_directory = 'log'
log_filename = 'postgresql-%Y-%m-%d.log'
log_statement = 'all'
log_min_error_statement = error
log_min_messages = warning
GRANT USAGE ON SCHEMA public TO Alice;
GRANT SELECT ON team1_flowers TO Alice;
-- GRANT ALL PRIVILEGES ON team1_flowers TO Alice;
GRANT Alice TO current_user;
SET ROLE Alice;
SELECT * FROM team1_flowers;
RESET ROLE;
sqlite3 mydatabase.db
.echo ON
.tables
.schema
sqlite3 mydatabase.db
.echo ON
.output my_log.txt
.schema
Technical Aspect | SQLCipher | Standard SQLite |
---|---|---|
Encryption Method | Transparent AES-256 Encryption | No built-in encryption |
Data-at-rest Security | Strong; protects database files on disk | Weak; plaintext data storage |
Performance Impact | Moderate overhead due to encryption operations | Minimal; faster access (unencrypted) |
Use Cases | Mobile apps, sensitive data storage | General-purpose lightweight storage |
Key Management | Application-managed passphrase | Not applicable |
Reference: SQLCipher GitHub Documentation
sqlcipher mydatabase.db
sqlite> PRAGMA key = 'your_secure_password';
sqlite> CREATE TABLE flowers(id INTEGER, name TEXT);
sqlite> INSERT INTO flowers VALUES (1, 'Rose');
sqlite> .quit
Term | Description | Example |
---|---|---|
Vulnerability | A weakness in a system, application, or network that can be exploited by attackers. | Buffer overflow, SQL injection, Cross-Site Scripting (XSS). |
Zero-Day Vulnerability | A security flaw that is exploited before the vendor has issued a patch or fix. | Stuxnet worm exploited multiple zero-day vulnerabilities in Siemens SCADA systems. |
Zero-Day Attack | An attack that targets a zero-day vulnerability, often before it is discovered by the vendor. | Exploiting an unknown flaw in a browser before the vendor releases a patch. |
Patch | A software update designed to fix vulnerabilities, bugs, or other issues in a system or application. | Security patch to fix a vulnerability in Windows OS. |
Patch Management | The process of acquiring, testing, and deploying patches to systems and applications. | Regular updates to fix known vulnerabilities in server software. |
CVE (Common Vulnerabilities and Exposures) | A publicly disclosed list of known cybersecurity vulnerabilities, each assigned a unique identifier. | CVE-2021-34527: Microsoft PrintNightmare vulnerability. |
Exploit | A piece of software or code that takes advantage of a vulnerability to cause unintended behavior. | Exploiting a buffer overflow to gain remote code execution. |
Vulnerability Scanner | Tools used to identify potential vulnerabilities in systems, applications, or networks. | Nessus, OpenVAS, Qualys. |
Security Advisory | A notification from the vendor or organization about a discovered vulnerability and available patches. | Microsoft Security Advisory for the Windows SMBv1 vulnerability. |
Security Flaw | A weakness or defect in a system or software that can be exploited to cause harm. | Outdated cryptographic algorithms in a secure communication protocol. |
Security Update | An update aimed specifically at fixing security-related vulnerabilities. | Update to fix a vulnerability in Apache web server's SSL/TLS configuration. |
A security flaw unknown to the vendor, leaving systems exposed until a patch is released.
IoT sensors track soil moisture and sync data from on-device SQLite to a PostgreSQL server.
Orders are tracked in PostgreSQL, while IoT delivery boxes log temperature and humidity.
A smart thermostat was remotely accessed without user consent.
What authentication and logging controls should prevent this?
An attacker replaced an IoT device’s firmware update with malicious code.
How should update mechanisms be secured?
Testing Type | Environment | Testers | Purpose |
---|---|---|---|
Alpha Testing | In-house (Lab environment) | Developers & Internal QA | Detect major bugs before external release |
Beta Testing | Limited real-world environment | End-users (selected group) | Gather user feedback & identify usability issues |
Gamma Testing | Final pre-release stage | End-users (public or wider audience) | Ensure system stability before full deployment |
Item | Plant Watering App |
---|---|
Alpha, Beta, and Gamma Testing | |
Release Channels (App Store, .apk) | |
Staged Releases and Rollbacks | |
Feedback Channels and User Analytics | |
V-Process Model for Validation and Verification | |
Continuous Integration & Continuous Deployment (CI/CD) | |
Over-the-Air (OTA) Updates for IoT Devices | |
Canary Releases for Risk Mitigation | |
Security & Compliance Checks (IEC 62443, NIST Guidelines) | |
Digital Twin Testing for Virtual Release Simulation |
Tagging versions for testing phases in PlantWaterSystem
v1.0.0-alpha
- Alpha testingv1.0.0-beta
- Beta testingv1.0.0-rc.1
- Gamma (Release Candidate) testing
# Create and push an Alpha tag
git tag v1.0.0-alpha
git push origin v1.0.0-alpha
# Create and push a Beta tag
git tag v1.0.0-beta
git push origin v1.0.0-beta
# Create and push a Release Candidate (Gamma) tag
git tag v1.0.0-rc.1
git push origin v1.0.0-rc.1
v1.0.0
)
# Create a tag locally
git tag -a v1.0.0 -m "Version 1.0.0 - Initial Alpha Release"
git push origin v1.0.0
# Create a GitHub release using GitHub CLI
gh release create v1.0.0 \
--title "Version 1.0.0" \
--notes "Initial alpha release of PlantWaterSystem."
gh release create v1.0.0 \
--title "Version 1.0.0 - Initial Release" \
--notes "Release Notes:
## 🚀 Features
- Added support for automatic plant watering (#45)
- Implemented real-time soil moisture monitoring (#52)
## 🔧 Improvements
- Optimized sensor data processing for better performance
- Enhanced UI for better usability
## 🐛 Bug Fixes
- Fixed API timeout issue (#60)
- Resolved UI bug in dashboard settings (#65)
## 🔒 Security Patch
- Patched vulnerability in authentication system (#70)
"
winget
brew install gh
sudo apt install gh
or
brew install gh
gh --version
from flask import Flask, jsonify
import random
app = Flask(__name__)
@app.route('/')
def homepage():
if random.random() <= 0.1:
return jsonify({"feature": "NewFeature"})
return jsonify({"feature": "CurrentFeature"})
app.run(debug=True)
from flask import request
import geocoder
@app.route('/')
def check_geolocation():
g = geocoder.ip('me') # Get location based on IP
country = g.country
if country == 'United States':
# Stage 1: U.S. only
return "Feature available in U.S."
else:
# Full rollout
return "Feature available globally"
navigator.geolocation.getCurrentPosition(function(position) {
var lat = position.coords.latitude;
var lon = position.coords.longitude;
fetch(`https://api..?lat=${lat}&lng=${lon}`)
.then(response => response.json())
.then(data => {
if(data.countryName === 'United States') {
// Stage 1: Available in U.S.
console.log("Feature available in U.S.");
} else {
// Full release: Global rollout
console.log("Feature available globally.");
}
});
});
Title: "Watering schedule not triggering"
Description:
- Expected watering at 10 AM, but no action occurred.
- Soil moisture reading: 18% (should trigger watering).
- Logs show no errors.
Steps to reproduce:
1. Set watering threshold to 20%.
2. Wait for moisture to drop below 20%.
3. Observe no watering action.
🚀 Feature Request
@dev-team Please add notification if soil moisture low?
Currently, users have to check manually.
🔍 Steps to reproduce:
1. Set up a plant with a low moisture threshold.
2. Observe that no notification is sent.
<script src="googletagmanager.com/gtag/js?id=G-"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX'); // Replace with your GA ID
</script>
V-Model Phase | Guiding Questions | Details / Status |
---|---|---|
Requirements Analysis |
What are the forest’s watering needs? Who uses the system and how? Are there legal or environmental regulations? |
|
System Design |
Which sensors are needed (moisture, humidity, etc.)? How often should data sync? What communication protocol is best (BLE, LTE)? Which modules / teams are required? |
|
Architectural Design |
How will modules communicate? What if the network fails? Where and how is data stored? |
|
Module Design |
How is watering logic triggered? Do we use schedule-based or sensor-driven watering? How is power optimized in remote sensors? |
|
Coding |
Which language suits the hardware (e.g. C++, Python)? Which database fits: time-series or document? Are there data handling laws to comply with? |
|
Unit Testing |
How to test individual sensors/actuators? What edge cases or sensor errors should we simulate? |
|
Integration Testing |
Do all modules work together in real time? How does the system perform with poor signal or delays? |
|
System Testing |
Can the system survive outdoor weather? What are peak load conditions? How are errors reported/logged? |
|
Acceptance Testing |
Does it meet user and regulatory expectations? What tests run outdoors vs. indoors? Is the system reliable unattended? |
V-Model Phase | Guiding Questions | Details / Status |
---|---|---|
Requirements Analysis |
What areas of the glacier should be monitored? What environmental conditions are most critical (e.g., temperature, melt rate)? Are there specific legal or environmental regulations to follow? |
|
System Design |
Which sensors are needed (e.g., temperature, pressure, moisture)? How often should data be synchronized with the central system? What communication protocol should be used (e.g., LTE, satellite)? What teams or modules are involved in data collection and processing? |
|
Architectural Design |
How will sensors communicate with the central server? What happens if the network connection is lost for long periods? Where will the data be stored (cloud, on-site servers)? |
|
Module Design |
How will data collection be triggered (e.g., time-based, sensor-based)? Will data be stored locally before being transmitted or directly sent in real-time? How will power be managed, especially in remote locations with solar or wind energy? |
|
Coding |
What programming languages are best for hardware (e.g., C++, Python)? Which database system is ideal for time-series or environmental data (e.g., InfluxDB, MongoDB)? Are there data privacy or regulatory compliance issues (e.g., GDPR)? |
|
Unit Testing |
How to test individual sensors for calibration and accuracy? What scenarios (e.g., extreme cold, power outages) should be simulated? |
|
Integration Testing |
Do all modules (sensors, storage, communication) work together smoothly? How does the system perform when there are delays or poor connectivity? |
|
System Testing |
Can the system endure extreme environmental conditions (e.g., sub-zero temperatures,
heavy snow)? How does the system handle high traffic periods, like during a storm or rapid glacier movement? |
|
Acceptance Testing |
Does the system meet the expected accuracy and reliability thresholds? What tests are done outdoors versus indoors (e.g., power checks, weather resistance)? Is the system able to operate autonomously for extended periods? |
V-Model Phase | Guiding Questions | Details / Status |
---|---|---|
Requirements Analysis |
What areas in the office need lighting control? What are the energy savings and comfort goals? Are there any workplace safety or lighting regulations? |
|
System Design |
Which types of sensors are needed (motion, light, energy)? How often should lighting be adjusted or monitored? Will the system work independently or via building-wide integration? |
|
Architectural Design |
How will sensors connect to the lighting controller or hub? What happens during a network or power failure? Where will usage and sensor data be stored? |
|
Module Design |
How is lighting triggered—by motion, schedule, or daylight? Will lights dim gradually or switch instantly? How will energy usage be tracked for each zone or room? |
|
Coding |
What firmware is needed for sensor nodes? What backend language or framework (e.g., Node.js, Python)? Will data be formatted in JSON for the dashboard? |
|
Unit Testing |
Can each sensor detect movement/light accurately? Are power consumption readings calibrated correctly? |
|
Integration Testing |
Do sensors and lights respond in sync? How does the system react when multiple users enter or leave? |
|
System Testing |
Can the system adapt to different office layouts? How does it perform under full occupancy during daylight? |
|
Acceptance Testing |
Is lighting smooth and responsive across office zones? Are energy savings within expected thresholds? Does it meet user comfort and usability expectations? |
# | Team | Paper | Date |
---|---|---|---|
1 | Management | IoT methodologies: comparative study | Apr 18 (Fri) |
2 | Architecture | An overview of IoT architectures, technologies, and existing open-source projects | Apr 18 (Fri) |
3 | Database | Enterprise architecture of IoT-based applications: A review | Apr 21 (Mon) |
4 | Frontend | A methodology for the systematic design of storytelling dashboards applied to Industry 4.0 | Apr 21 (Mon) |
5 | Backend | IoT-enabled smart agriculture for improving water management: A smart irrigation control using embedded systems and Server-Sent Events | Apr 21 (Mon) |
6 | Embedded | Internet of Intelligent Things: A convergence of embedded systems, edge computing and machine learning | Apr 21 (Mon) |
7 | Algorithms | A resilient consensus algorithm with inputs for the distributed monitoring of cyber-physical systems | Apr 23 (Wed) |
8 | Testing | Regression testing for large-scale embedded software development – Exploring the state of practice | Apr 23 (Wed) |
9 | DevOps | DevOps Contract for Assuring Execution of IoT Microservices in the Edge | Apr 23 (Wed) |
10 | Quality | A review of graph-powered data quality applications for IoT monitoring sensor networks | Apr 25 (Fri) |
11 | Client | Customer perception, integration behavior, and loyalty of internet of things enterprises | Apr 25 (Fri) |
Class Schedule:
Time: 12:30 PM – 1:25 PM on Monday, Wednesday, Friday
Location: Benerd School of Education 208
In this course on Software Engineering within Industry 4.0 ecosystems, we will explore the integration and application of IoT and Cyber-Physical Systems (CPS). The course takes a dual perspective approach.
Teaching Assistant: | Mr. Makwana Prashant Lnu |
Email: | m_lnu17@u.pacific.edu |
Office Location: | Student Support Center |
Office Hours: | By appointment |
Instructor: | Dr. Solomon Berhe |
Email: | sberhe@pacific.edu |
Zoom: | Zoom Meeting Link |
Office: | CTC 117 |
Office Hours: | Mon/Wed/Fri, 2:00–3:15 PM (or by appointment) |
Textbooks:
Homework: | Includes written exercises and programming assignments. Submit via Canvas or GitHub. |
Team Projects: | Two projects (design, development, and application integration) |
Exams: | One midterm and one final. Students may bring one handwritten note sheet (8.5x11) |
All course materials, announcements, and assignments will be posted on Canvas. Check regularly for updates
Students are expected to act with integrity, honesty, and responsibility. Violations of the Honor Code will be reported to the Office of Student Conduct and Community Standards
For more details, see the University Academic Honesty Policy
Source Document: Course Syllabus
Table of Contents | DMS | Office Hours: Mon, Wed, Fri 2:00 PM - 3:30 PM, CTC 117 | sberhe@pacific.edu | m_lnu17@u.pacific.edu | Syllabus | Join Zoom | GitHub Repository | Docs | Project