ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

Representational State Transfer REST architectural constraints

REST API

Architectural Constraints

REST

Representational State Transfer

HTTP Protocol

Uniform Interface

Stateless

Cacheable

Client-Server

Layered System

Code on Demand

Resource based

Standardized methods

HATEOAS

Authentication Token

Self Describing Messages

Content Type

Status Code

Headers

Payload

Media Type

Documentation

Hypermedia Links

Cache Invalidation

Cache Control

Expires

Separation of Concerns

Code On Demand

Encryption

Custom Rendering

Автор: CodeWis Technologies by Nuhman Paramban

Загружено: 2024-05-22

Просмотров: 69

Описание: REST API Architectural Constraints

Overview

What is REST
Representational State Transfer
Architecture style
Set of rules for creating web services.
Using HTTP Protocol for communication
Uniform Predefined rule
Server - Own Resource
Client - Request Resource

Architectural Constraints
Uniform Interface
Stateless
Cacheable
Client-Server
Layered System
Code on Demand (Optional)


Uniform Interface
Rest is a client server model and client should have the ability to interact with server in a consistent and predictable way.
Resource based - Eg - Users, Books (URL should be based on that)
Standardized methods - GET, POST, PUT, DELETE
Stateless
Self Describing Response - Details about content
HATEOAS - further actions url

Stateless
No Server Side Memory
Self Contained Requests
Benefits of Statelessness
Scalability
Simplicity
Reliability
Flexibility

How to overcome Stateless
Authentication Token
Cookies (No ideal)

Self Describing Messages
Client understand server response without prior knowledge about the service
Clarity Without Confusion
Content Type (JSON/XML), Status Code(200, 201), Headers (Additional info), Payload(Optional)
Reduced Coupling, Interoperability, Easier maintenance
Additional - Media Type, Documentation (Swagger)

HATEOAS (Hypermedia as the Engine of Application State)
Client Driven Navigation, Reduced Coupling, Flexibility
How - Hypermedia Links, Content Type, Status Code
Benefits - Reduced Complexity, Improved maintainability, Discoverability
Drawbacks - Initial learning curve, complex response

Cacheable
Client Side Caching - Client application can cache
Server Side Caching - in memory cache and dedicated cache
Cache Invalidation - cache expiration
Cacheability in REST Responses (Server can control client caching)
Cache Control - no-cache or no-store to prevent caching entirely.
Expires
Benefits
Improved Performance
Reduced Server load
Increase Scalability
Enhanced User Experience


Designing Cacheable REST API
Identify Resources that are frequently access and relatively static
Set appropriate cache expiration time
Mechanism to invalidate cache if resource updated

Client-Server
Separation of Concerns b/w Client and Server
Independent Evolution
Well Defined interface (Resources/Standard methods)
Statelessness

Benefits of Client-Server Constraints
Scalability
Simplicity
Interoperability

Layered System
REST api communication can be broken down into distinct layers
Architecture divided into distinct layers, each with different functionality
Intermediate services b/w client and server
Caching
Security
Load balancing
Transparency - Client not need to aware


Code On Demand (Optional)
Server provide a code that client can execute
Encryption
Custom Rendering

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
Representational State Transfer REST architectural constraints

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]