written 6.7 years ago by
teamques10
★ 68k
|
•
modified 6.7 years ago
|
Characteristics of REST and WS
1. client- server
- REST's client–server separation of concerns simplifies component implementation, reduces the complexity of connector semantics, improves the effectiveness of performance tuning, and increases the scalability of pure server components.
- REST enables intermediate processing by constraining messages to be self-descriptive: interaction is stateless between requests, standard methods and media types are used to indicate semantics and exchange information, and responses explicitly indicate cacheability.
2.Statelessness
- As per the REST architecture, the server does not store any state about the client session on the server side. This restriction is called Statelessness.
- Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.
- client is responsible for storing and handling all application state related information on client side.
3. Caching REST API Response
- Caching is the ability to store copies of frequently accessed data in several places along the request-response path. When a consumer requests a resource representation, the request goes through a cache or a series of caches toward the service hosting the resource.
- If any of the caches along the request path has a fresh copy of the requested representation, it uses that copy to satisfy the request. If none of the caches can satisfy the request, the request travels all the way to the service
- less interaction results in greater efficiency an scalability.
4.Layered system
- A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way. Intermediary servers may improve system scalability by enabling load balancing and by providing shared caches. They may also enforce security policies.
- Layered system constraints allow intermediaries proxies, gateways, and firewalls to be introduced at various points in the communication without changing the interfaces between components, thus allowing them to assist in communication translation or improve performance via large-scale, shared caching.
5. Uniform Resources
- All resources are accessed using uniform interface.
- Resources ca be named using URL.