Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 
DogFood


Write down main difference between REST and WebSocket
Question Posted on 16 Jun 2022

Home >> REST >> REST Questions >> Write down main difference between REST and WebSocket




Write down main difference between REST and WebSocket
Below are main difference in between REST and WebSocket:-
0
0

Base of DifferenceRESTWebSocket
Based onREST is mainly based on CRUD operation.WebSocket is low-level protocol which is based on concept of socket and port which are underlying transport mechanism.
HTTPHTTP is one of the common protocol in RESTful web services.Here use of HTTP occurs in initial connection.
DirectionREST is Uni-directional in nature.Where as WebSocket is Bi-directional in nature.
StateAs we knows REST is based on HTTP which is stateless protocol.WebSocket is stateful protocol.
NatureREST is mainly based on resource rather than commands.This have Socket-based concept.
CostWhen we say about COST REST based communication is comparatively higher in cost.WebSocket communication cost is lower.
Client Server approachWhen we say about REST base approach either client is talking to client or server is talking to the client at any given time.In WebSocket communication allows the client and server to talk independently of each other.
PerformanceGreat for occasional communication or we can say for an HTTP request, a new TCP connection is initiated.WebSocket works better, where the client-server communicates over the same TCP connection for the life of web socket connection or we can say better with high loads.
Live ExampleREST is better fitted for occasional communication in a typical GET request scenario to call RESTful APIs.As we knows that it is ideal for scenrio where we have high loads just like real-time scalable chat application is an example.
ScaleREST is HTTP based which can scale horizontally.WebSocket connection can scale vertically on single server.
Best forREST is better suited for the scenario with lots of getting request.WebSocket approach is always ideal for real-time scalable application.
Use ofRESTful application needs to design operation based on verbs and HTTP based. WebSocket requires the use of IP address and Port details, which are lower-level details for any application.


 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Can you mention the disadvantages of RESTful web services?
Can we send payload in the GET and DELETE methods?
Define main difference in between REST and RESTful?
Write down main difference between REST and WebSocket
Why we used REST APIs and some example?






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |