Simple Notes Unit 01.pdf
Simple Notes Unit 01.pdf
What is REST? REST stands for Representational State Transfer. It’s a set of guidelines or principles for
designing web services (Web APIs) that focus on how resources are handled and transferred on the web.
REST APIs follow a request-response communication model, meaning the client sends a request to the
server, and the server responds. Key Principles of REST (Architectural Constraints)
1. Client-Server o Separation of Concerns: The client and server are separate. o The client
handles user interactions (UI), while the server manages data storage and processing.
o This allows independent development and updating of both the client and server.
2. Stateless o Every request from the client to the server must include all the information
needed to process it.
o The server does not store any information about previous requests. Each request is
independent.
o The session state is kept only on the client side, not on the server.
o If a response is cache-able, clients can store the data and reuse it later to avoid sending
the same request multiple times.
o This improves efficiency and scalability by reducing the load on the server.
4. Layered System
o The system is designed with layers, and each component interacts only with the layer it’s
connected to.
o The client doesn’t need to know if it’s talking to the server directly or if there are
intermediary servers. o This helps improve scalability by allowing intermediaries to
handle requests on behalf of the server.
5. Uniform Interface o Communication between the client and server must be uniform
(standardized).
o Resources are identified through URLs (Uniform Resource Locators), and the server’s
data is separate from the resources themselves.
When a client gets data, it can use that information to update or delete resources (if it
has the right permissions).
6. Code on Demand (Optional) o Servers can send executable code (scripts or programs) for
clients to run.
o
o This is optional and is the only REST constraint that is not required. RESTful Web Service
• A RESTful web service is a Web API that follows the REST principles and uses HTTP for
communication.
• REST is especially popular for Internet of Things (IoT) communications because of its simplicity
and scalability.
In Short:
RESTful APIs make it easy to build efficient, scalable, and independent systems where the client and
server work separately, but communicate in a standardized way.
REST-Based Communication APIs are tools that allow different software applications to talk to each other
over the internet using a simple and standardized method called REST (Representational State Transfer).
1. HTTP Requests: These APIs use common internet protocols like HTTP to send requests and
receive responses. The requests can ask for data, send data, or perform actions on a server.
2. Data Formats: Data is usually exchanged in formats like JSON or XML, which are easy to
understand and process.
3. Stateless: Every time a request is made, it’s independent. The server doesn’t remember
anything about previous requests, which makes it simple and scalable.
4. CRUD Operations: REST APIs typically allow four basic actions: Create, Read, Update, and Delete
(CRUD), which are used to interact with data.
In short, REST-Based Communication APIs enable software to communicate over the web in a
straightforward, efficient, and flexible way.
1. Connection Setup:
o
o After the handshake, the connection is established. o Both the client and
• Reduced Network Traffic: No need to repeatedly set up and terminate connections for every
message.
• Low Latency & High Throughput: Faster communication, making WebSocket ideal for systems
that need quick responses (like IoT).
• WebSocket is particularly suited for IoT (Internet of Things) applications due to its low latency
and ability to handle high throughput.
In Short:
WebSocket is an efficient, real-time communication protocol, making it perfect for IoT applications
where fast and continuous data exchange is necessary.
o How it works: These sensors collect data and send it wirelessly to other devices or
systems for processing. For example, sensors in a smart home might monitor
temperature and send that data to a central system.
2. Cloud Computing o What it is: Cloud computing means using online servers to store and
process data instead of relying on local computers.
o How it works: IoT devices send their data to the cloud where it's stored and analyzed.
This helps devices work more efficiently without needing a lot of local storage or
processing power.
3. Big Data Analytics o What it is: Big data analytics is the process of analyzing large
amounts of data to find useful patterns and insights.
o
o How it works: IoT devices generate a lot of data, and Big Data tools help make sense of
that data. For example, by analyzing temperature data from multiple IoT devices, we can
predict when to adjust heating or cooling in a building.
4. Embedded Systems
What it is: Embedded systems are small, specialized computers built into devices to
control them.
o How it works: These systems handle specific tasks in IoT devices. For example, the
microcontroller in a smart thermostat makes decisions about when to turn on the
heating or cooling based on the temperature readings.
5. Security Protocols and Architectures o What it is: Security protocols are rules that ensure
data is protected from being hacked or accessed without permission.
o How it works: IoT devices use encryption and secure communication methods to keep
data safe while it's being sent or stored, ensuring privacy and security.
6. Communication Protocols o What it is: Communication protocols are the rules that allow
different IoT devices to talk to each other.
o How it works: Devices follow specific rules to send and receive data. Examples include
MQTT (lightweight messaging protocol) and HTTP (used for web communication). These
protocols ensure data is transmitted correctly between devices.
7. Web Services o What it is: Web services are tools that let IoT devices interact with
other systems over the internet.
o How it works: Devices use the internet to send and receive information through web
services. For example, a smart light might use a web service to allow you to turn it on or
off using a phone app.
8. Mobile Internet o What it is: Mobile internet connects IoT devices to the internet
using mobile networks (like 4G, 5G).
o How it works: This allows users to control or monitor IoT devices remotely using their
smartphones or tablets. For example, you can check your security cameras or adjust the
thermostat from anywhere using your phone.
9. Semantic Search Engines o What it is: Semantic search engines help computers
understand the meaning of data, not just the words.
o How it works: When you search for something, semantic search engines help find the
most relevant results by understanding the context of your search. For IoT, this means
devices can better interpret and act on the data they receive. For example, a
smart speaker can better understand commands based on the context, like "turn up the heat" or "play
music."
In Short:
These technologies work together to make IoT smart and efficient. Sensors collect data, the cloud stores
and processes it, and security ensures everything is safe. Communication protocols help devices talk to
each other, while big data and search engines analyze and make sense of it all. Mobile internet and web
services enable remote control, making IoT more accessible and powerful.
1. End Nodes:
o These are the main sensor devices that collect data like temperature, humidity, or
motion. They may also function as routers, helping pass data to other devices.
2. Routers:
o These devices route (forward) data from end nodes to the coordinator. Routers help
ensure that data travels efficiently through the network.
3. Coordinator:
o The coordinator collects all the data from the end nodes and routers.
o It also acts as a gateway to connect the WSN to the internet or other networks, allowing
remote monitoring and control.
o Use WSNs to collect data on temperature, humidity, and other weather-related factors.
The collected data is then analyzed for forecasting or research.
o WSNs are used to monitor air quality inside buildings, checking the concentration of
gases like carbon dioxide or pollutants.
o These systems use WSNs to check soil moisture levels at different locations, helping in
agriculture to manage irrigation and water usage efficiently.
4. Surveillance Systems:
o WSNs are used for motion detection and security surveillance by collecting data from
cameras or sensors placed in various locations.
5. Smart Grids:
o WSNs help monitor the electric grid by collecting data on energy use and voltage levels
at different points in the system.
o WSNs are deployed on structures like buildings and bridges to monitor their health by
collecting vibration and stress data, helping detect potential problems before they
become serious.
In Short:
Wireless Sensor Networks (WSNs) are networks of sensor nodes that collect data from the environment
and send it to a central coordinator. They are used in many IoT systems, including weather monitoring,
air quality checking, soil moisture management, surveillance, smart grids, and monitoring the health of
buildings and bridges.
• Cloud computing is a modern technology that allows users to access applications, services, and
resources over the internet.
• It lets you use computing power (like servers), storage, and networking resources without
needing physical hardware.
• These resources are provided as "on-demand" services, and users only pay for what they use,
similar to a "pay-as-you-go" model.
1. On-Demand Provisioning:
o Users can access and use computing resources like storage or processing power
whenever needed, without contacting the service provider each time.
2. Access Anywhere:
o Cloud services can be accessed over the internet from various devices like workstations,
laptops, tablets, and smartphones.
o This makes it platform-independent, so you can use the cloud from almost any device.
Types of Cloud Computing Services:
Cloud computing is offered in different service models. Each model provides a different level of control
over the resources.
o What it is: IaaS provides the basic hardware needed to run applications, such as virtual
machines, storage, and networking.
o How it works: The cloud provider manages the hardware, but you can install and
manage the operating system and applications on it.
o What it is: PaaS offers both hardware and the operating system layer managed for you.
o How it works: In addition to hardware, you don’t need to worry about managing the
operating system, so you can focus on developing and running applications.
o What it is: SaaS provides complete applications hosted on the cloud. You don’t need to
manage any part of the infrastructure or operating system.
o How it works: You use the software directly through a web browser or app without
worrying about how it works behind the scenes.
In Short:
Cloud computing allows users to access computing resources and applications over the internet without
managing physical hardware. It provides flexible and scalable services through three main models: IaaS
(hardware), PaaS (platform with OS), and SaaS (complete software applications). These services are
convenient, cost-effective, and accessible from almost any device.
• Big Data Analytics is the process of collecting, organizing, and analyzing large volumes of data
(called Big Data) to find useful patterns, trends, and insights.
• It helps organizations understand complex data and make better decisions by identifying
important information that can drive business strategies.
Examples of Big Data Generated by IoT:
• Sensor Data: Data from IoT sensors, such as temperature or humidity readings from weather
stations.
• Machine Sensor Data: Data collected from sensors in machines and equipment, used to monitor
health and detect failures in industries like manufacturing and energy.
• Health and Fitness Data: Information from wearable devices, such as fitness bands, tracking
health metrics like steps, heart rate, and sleep.
• Location and Vehicle Tracking Data: Data generated by GPS-enabled IoT systems used to track
vehicles or assets in real-time.
• Retail Inventory Data: Data from IoT systems that monitor stock levels in retail stores and
warehouses.
1. Volume:
o The larger the amount of data, the more potential there is for insights. However,
managing large volumes of data can also be challenging.
2. Variety:
o Refers to the different types of data being collected (e.g., text, images, video, audio). o
Big Data comes in many formats and sources, making it necessary to analyze and
combine data from various forms (e.g., merging text data with images or audio).
3. Velocity:
o Big Data is often produced continuously and can be available in real-time (e.g.,
monitoring data from sensors in factories or weather systems).
▪ Frequency of Generation: How often new data is created (e.g., every second or
minute).
In Short:
Big Data Analytics involves analyzing large and complex datasets to uncover valuable insights that help
businesses make informed decisions. These datasets, often generated by IoT systems, have three key
characteristics: Volume (large amounts of data), Variety (different types of data), and Velocity (how
quickly the data is produced and needs to be processed).
• Communication protocols are the rules or standards that define how devices in an IoT system
communicate and exchange data over a network.
• They ensure that devices can understand each other and work together, even if they come from
different manufacturers or use different technologies.
• Communication protocols are essential for connecting devices in IoT systems, allowing them to
send and receive data.
• These protocols ensure that data is transferred in a secure, reliable, and efficient manner.
• A protocol suite is a group of related communication protocols that work together to enable
complete communication. For example, the TCP/IP suite is widely used for internet
communication.
• When implemented in software, a protocol suite is often called a protocol stack. This stack
defines how data is transmitted, processed, and received.
• Internet Engineering Task Force (IETF): Publishes protocols for internet communication, such as
HTTP, TCP/IP, and DNS.
• IEEE (Institute of Electrical and Electronics Engineers): Deals with protocols for wired and
wireless networking, such as Ethernet (for wired networks) and Wi-Fi (for wireless networks).
In Short:
Communication protocols are the rules that enable devices in IoT systems to exchange data. These
protocols are grouped into suites or stacks and are published by organizations like IETF, IEEE, ISO, and
ITU-T. They ensure that data transmission is reliable, efficient, and secure across different networks,
including the internet and telecommunication systems.
5. Embedded Systems: Simple Explanation
What is an Embedded System?
• An embedded system is a specialized computer that is built into another device to perform a
dedicated task. It is not like a general-purpose computer that you use for multiple tasks.
• The system combines hardware (like microprocessors) and software (application software) to
perform a specific function, usually within a larger system.
• Embedded means that the system is part of a larger device. For example, the computer inside a
microwave or washing machine is an embedded system.
• These systems are designed for specific real-time tasks. For instance, controlling the
temperature of an oven or managing the speed of a car engine.
1. Hardware:
o This is the physical part of the embedded system. It includes microprocessors, memory,
input/output devices, and sensors that interact with the real world.
2. Application Software:
o This is the program that runs on the embedded hardware to perform specific tasks. For
example, software that controls how a smart thermostat adjusts the temperature.
o The RTOS is software that manages the embedded system’s hardware and software
resources. It ensures that the system runs the tasks in a timely manner, according to a
schedule, without delays or errors.
o RTOS helps ensure that the system can respond quickly and reliably to real-time events
(e.g., when a sensor in a car detects an obstacle and needs to stop the car immediately).
o Some smaller embedded systems may not use a full RTOS if their tasks are
simple and can be handled by the software directly.
• Automobiles: Embedded systems control things like airbags, engine management, and GPS
navigation.
• Home Appliances: Microwaves, washing machines, and refrigerators all have embedded systems
for specific functions.
• Consumer Electronics: Cameras, printers, and gaming consoles.
In Short:
An embedded system is a computer built into a device to perform a specific function. It consists of
hardware, application software, and a Real-Time Operating System (RTOS) to manage tasks on time.
These systems are found in many everyday devices like cars, appliances, and smartphones.