0% found this document useful (0 votes)
25 views

Basic Networking Concepts 2

1. Client-server architectures can be 1-tier, 2-tier, or 3-tier. A 1-tier architecture has all components in one package, while a 2-tier architecture separates the user interface and database onto different machines. A 3-tier architecture introduces a middleware layer between the client and server. 2. HTTP is the protocol for communication between web clients and servers via requests and responses. Clients like browsers send requests to servers, which process the requests and return responses to the clients. 3. REST is a standardized way to structure APIs and use HTTP verbs like GET, POST, PUT, and DELETE to retrieve, submit, update and delete data through requests and responses.

Uploaded by

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

Basic Networking Concepts 2

1. Client-server architectures can be 1-tier, 2-tier, or 3-tier. A 1-tier architecture has all components in one package, while a 2-tier architecture separates the user interface and database onto different machines. A 3-tier architecture introduces a middleware layer between the client and server. 2. HTTP is the protocol for communication between web clients and servers via requests and responses. Clients like browsers send requests to servers, which process the requests and return responses to the clients. 3. REST is a standardized way to structure APIs and use HTTP verbs like GET, POST, PUT, and DELETE to retrieve, submit, update and delete data through requests and responses.

Uploaded by

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

Page 1 of 5

Client Server Architectur

1-tier architectur
For example, Presentation, Business, Data Access layers within a single software
package. The data is usually stored in the local system or a shared drive. Applications
which handle all the three tiers such as MP3 player, MS Of ce come under one-tier
application

2-tier architecture
In this type of client-server environment, the user interface is stored at client machine
and the database is stored on the server. Database logic and business logic are led at
either client or server but it needs to be maintained. If Business Logic and Data Logic
are collected at a client side, it is named as fat client thin server architecture. If
Business Logic and Data Logic are handled on the server, it is called thin client fat
server architecture. This is considered as affordable
In two-tier architecture, client and server have to come in direct incorporation. If a
client is giving an input to the server there shouldn’t be any intermediate. This is done
for rapid results and to avoid confusion between different clients. For instance, online
ticket reservations software use this two-tier architecture

3-tier architecture
In this variety of client-server context, an extra middleware is used that means client
request goes to the server through that middle layer and the response of server is
received by middleware rst and then to the client. This architecture protects 2-tier
architecture and gives the best performance. This system comes expensive but it is
simple to use. The middleware stores all the business logic and data passage logic.
The idea of middleware is to database staging, queuing, application execution,
scheduling etc. A Middleware improves exibility and gives the best performance
The Three-tier architecture is split into 3 parts, namely, The presentation layer
(Client Tier), Application layer (Business Tier) and Database layer (Data Tier). The
Client system manages Presentation layer; the Application server takes care of the
Application layer, and the Server system supervises Database layer
.

fi
e

fl
.

fi
.

fi
.

Page 2 of 5
Page 3 of 5

What is HTTP

HTTP stands for Hyper Text Transfer Protocol


WWW is about communication between web clients and
servers
Communication between client computers and web
servers is done by sending HTTP Requests and receiving
HTTP Responses

World Wide Web Communicatio


The World Wide Web is about communication between web clients and web servers
Clients are often browsers (Chrome, Edge, Safari), but they can be any type of
program or device
Servers are most often computers in the cloud

HTTP Request / Respons


Communication between clients and servers is done by requests and responses
1. A client (a browser) sends an HTTP request to the we
2. An web server receives the reques
3. The server runs an application to process the reques
4. The server returns an HTTP response (output) to the browse
5. The client (the browser) receives the respons

Page 4 of 5

What is REST
In REST, or REpresentational State Transfer, is another abstraction for creating API’s
for applications in a standardized way. With typical, and now traditional, web
applications, creating REST endpoints using HTTP is how the vast majority of
applications are architected. Whether it’s Ruby, Java, Go, NodesJS or any of the
multitude of technologies available, they are fundamentally similar in that they
receive to Requests for information, and then Responding to the request

REST organizes these Requests in predictable ways, using HTTP operation types, or
verbs, to construct appropriate responses. Requests originate from the client, and the
common HTTP verbs include GET, POST, PUT, DELETE but there are several
others. They correspond to expected operations, retrieving data, submitting data,
updating data, and deleting data

REST is by far the most standardized way of structuring the API for Requests. But
since it involves using HTTP is also has the overhead associated with that protocol.
For most applications, information only needs to be transferred when a user takes an
action. For instance, when browsing a news site, once the browser has requested the
article, the user is busy reading it, and not taking actions. Having the port-socket
close during this time is actually saving resources. With less frequent interaction,
HTTP works very well, and it is why it is used

JSON* is a text syntax that facilitates structured data interchange between all
programming languages. JSON is a syntax of braces, brackets, colons, and commas
that is useful in many contexts, pro les, and applications. JSON stands for JavaScript
Object Notation and was inspired by the object literals of JavaScript aka
ECMAScript as de ned in the ECMAScript Language Speci catio
?

fi
.

fi
.

fi
n

Page 5 of 5

Networking in Mobile Apps means


- Implement mobile client speci c APIs with a provided SDK (e.g. GCD, sockets,
URLSession, URLConnection, etc) and/or existing third party libraries (e.g: http,
dio (dart), Alamo re (Swift), AFNetworking, ASIHTTPFRequest (Obj-C), etc)
- Implement JSON/XML encoding/decoding and/or serialization/deserialization
with or without third party libraries (e.g: Mantle, RestKIT, OKMapper - Obj-C
- Invoke speci c requests (API calls) in order to send/get data from the server and
update U
I

fi
fi
fi
:

You might also like