UNIT 4
Abhipsa Mahala
Assistant Professor
Department of Computer Science & Engineering
C.V. Raman Global University
Application Protocols MQTT
• Message queuing telemetry transport (MQTT) is defined as a low
bandwidth consumption machine-to-machine protocol that helps IoT
devices communicate with each other, with minimal code
requirements.
• MQTT is a publisher/subscriber protocol the main broker manages.
This signifies that there is no direct link between the transmitter and
the recipient.
MQTT
• Publishers and subscribers are two types of MQTT clients, depending
on whether the client is publishing or getting messages. One can
combine the two features in a single MQTT client. A publish is when a
device (or client) wishes to send information to the server (or broker).
In the middle, there is a central server or broker that acts as a
mediator. Each incoming message is filtered by the broker, who then
sends them to the appropriate customers.
REST
• Representational State Transfer (REST) is a set of architectural
principles by which you can design web services and web APIs
that focus on a system’s resources and how resource states
are addressed and transferred.
• REST based application is stateless in nature.
• It follow the Request response communication model.
• In REST based each time new TCP/IP connection set.
• It is not applicable for RTA.
• Ex:- smart security camera, smart motion sensor.
HTTP:-
• Hypertext transfer protocol is a protocol that presents in an application
layer for transmitting media documents.
• It is used to communicate between web browsers(client)and web servers.
• It makes a request to a server and then waits till it receives a response and
in between the request server does not keep any data between two
requests.
• HTTP is the primary protocol for transmission of information across the
Internet.
CoAP:-
• Constrained application protocol used for M2M application such as
smart energy and building automation.
• It uses request response model of communication.
• CoAP is one to one protocol similar to internet protocol “HTTP”.
• It enables device to communicate over internet.
• This protocol is used in very simple h/w so its power consumption is
very low.
MySQL Backend Application Designing
Apache for handling HTTP:-
• When designing a MySQL backend application to be used with
Apache for handling HTTP request there are several things to keep in
mind such as:
1. Choose a programming language:- there are several programming
language available for building web application with mysql backend
such as PHP , Python , Ruby etc.
2. Install and configure Apache: - Apache is a popular web server that
can handle HTTP request and server web pages to client.
[Apache HTTP server commonly referred as Apache is an open source
web server software that is used to deliver web pages to clients].
Apache for handling HTTP:-
3. Install and configure MySQL:- MySQL is a popular open source
relational database management system . Install and configure MySQL
on your server according to your OS instruction.
4. Connect your application to MYSQL:- use a MySQL connector library
for your programming language to connect your application to the
MySQL database.
5. Write application logic:- write the logic of your application using your
chosen programming language.
• This will typically define routes and handling HTTP request, querying
the MySQL database and returning responses to the client.
Apache for handling HTTP
6. Test and deploy:- test your application thoroughly to ensure that it works
as intended.
• once you satisfied with its functionality you can make it available to your
users.
7. Monitor and maintain:- monitor your application for performance and
security issues , and maintain it over time by keeping it up to date with the
latest software version and security patches.
by following these steps you can design and implement a MySQL
backend application that can be handled by Apache for handling HTTP
request.
PHP & MySQL for data processing :-
• PHP & MySQL are often used together for data processing specially
for web development.
• PHP terms as Hypertext Preprocessor is one of the backend language
also known as a scripting language.
• PHP generally use for web development.
• It’s a open source server side programming language that can be used
to create website, application etc.
• MySQL is a popular open source relational database management
system that is used to store and manage data.
Data processing:-
• When using PHP and MySQL together for data processing , PHP is
used to interact with the database through MySQL queries.
• That can allow the developer to retrieve, insert, update and delete
data from the database.
• PHP can also be used to process and manipulate data before or after
it is stored in the database.
Some common tasks that can be performed
with PHP and MySQL include:-
1. Retrieving data from the database and displaying it on a web page.
2. Insert new data into the database such as user registration or
product information.
3. Update existing data in the database, such as changing user’s
password or updating any product price.
4. Delete data from the database such as remove a user account or
deleting a product.
so we can say PHP and MySQL are a powerful combination
for data processing and are widely used in web development for
building dynamic web application.
MongoDB
• MongoDB is a document oriented no SQL database solution which we
use for high volume data storage.
• MongoDB is fast and efficient database solution because of the way
we store data in there.
• Unlike traditional database solution like MySQL , Oracle where we use
tables and rows to store data in a database , MongoDB uses
collections and documents.
• A collection is a collection of one or more documents. Like collection
is a table and documents is table rows.
Difference between relational and non
relational database:-
• In both relational and non relational database, we have database at
the top.
• In relational database we have tables and in non relational database
we have collections.
• Table rows in relational database is equivalent to documents in
MongoDB.
• A column in relational database corresponds to a field of document in
MongoDB.
• Relational database has a pre defined schema but a non relational
database like MongoDB is schema less or structure less.
Difference:-
RDBMS:- No SQL:-
ID name location { “student_ID”: 12,
12 Ab Delhi “name”: “ABC”,
13 BC CTC “hobby”: “singing”’
14 CGU BBSR }
No SQL
• 4 types of no SQL database i.e.
1. Key value database
2. Document oriented database
3. Graph database
4. Column database
MongoDB
• Replication :- replicate data into more than machine . primary and
more than one secondary nodes (master slave architecture)
• High availability
• Schemeless
• Split database into different part
• Storage technique
Overview of Android/ IOS App development
tools:-
• Android and IOS are most popular mobile operating system.
• Both have their own set of app development tools.
Android App Development tools:-
1. Android Studio:-
• It is the official integrated development environment (IDE) for
Android app development which is developed by Google.
• It provide complete set of tools such as developing, debugging,
testing of Android apps.
Android app development tools
2. Eclipse:-
• It’s a open source IDE that supports Android app development.
• It provides a comprehensive set of features(domain and tools) which
make Android app development easier.
3. IntelliJ IDEA:-
• It’s a popular Java IDE that also support Android app development.
• It provides features such as code completion, debugging and several
tools.
Android app development tools
4. React Native:-
• It’s a open source platform that allow developer to build Android
apps using JavaScript and React.
iOS App development tools:-
1. Xcode:
• It’s the official IDE for iOS app development , developed by Apple.
• It provides a complete set of tools for developing, debugging iOS
apps.
2. AppCode:-
• It’s a popular IDE for iOS app developed by supports swift.
• Code written in C and C++.
• It provides code completion, debugging and testing tools.
iOS App development tools
3. React Native:-
• Its an open source framework that allows developers to build iOS
apps using JavaScript and React.
4. Flutter:-
• Its an open source framework that allow developer to build iOS apps.
• It provide a rich set of tools, libraries that make the app development
easier.