Stateless Protocol
Stateless protocol is a protocol which treats every request
as an independent transaction and no relations with previous transactions. So
server will not retain session information or status about each communication
party.
Ex: -
·
Internet Protocol (IP) –foundation of internet
·
HTTP -Foundation of World Wide Web
Advantages
-
No need to dynamically allocate storage for each
conversation
-
No need to clean/reset client’s state during the
conversation
Disadvantages
-
Every request should contain additional
information and this information should interpret by server.
Note:
Statefull protocol is the opposite of
stateless protocol and following are the examples for statefull protocols.
- TCP
- FTP
REST (Representational State Transfer)
Rest services Relies on cacheable, state-less, client-
server communicational protocols so normally used Http protocol for all CRUD
operations.
RESTS is an architecture style for designing networked
applications and organize the independent systems
Simple and fully featured architecture
Features of REST
- Language independent (C# programs can communicate with Java things)
- Platform independent
- Can easily be used in presence of firewall
- Doesn’t offer the built in security, session management, encryption but those features can added by building on top of Http
GET Vs. POST
|
GET
|
POST
|
Form data passing
|
Form data is encode to URL
|
Form data is appear within message body
|
Security
|
Everyone can see the data because data passing through the URL as
less security than POST.
Not used to send sensitive data like user name and password.
Easier to hack
|
Data passing inside the message body so visibility is restricted
.security wise better than GET as POST can use to send sensitive data
Hard to hack
|
Data caching
|
Can be bookmarked and parameters can save in browser history and
caching is possible
|
Can’t be bookmarked and parameters are not save in browser history.
Cannot be cache
|
Restrictions on form data
|
Length of the URL is limit and browser specific so data passing
through the URL is limited
|
No restriction on form data length
|
Restriction on form data type
|
Only ASCII characters possible
|
No restrictions even Binary characters are allowed
|
Usage
|
Use to retrieve data.
|
Can involve with any operations(CRUD)
|
No comments:
Post a Comment