REST API Pros and Cons (Explained by Example)
REST stands for Representational state transfer it is an architecture that became very popular in build web APIs. It was the dissertation of Roy Fielding. In this video we discuss what makes an API RESTFUL, the REST APIs constrains, ill show you an example of a RESTFUL API in github.
Intro 0:00
Representations and State transfer 3:00
Rest constraints 12:14
REST API github api (18:18)
Representation and State transfer
Representational
The resource is a representation or metadata, but the actual backend could be something else and stored differently. An
Example, could be a user resource could be represented as a JSON object but it is stored on the backend as relation DBMS tables such as postgres.
State transfer
The application server is stateless, and when we want communicate we transfer the current state of with each request. Thus the state transfer.
Example, lets say you are uploading a 5MB file in 5 chunks each is 1 MB in size and assemble it on the backend. The REST api end point takes the content along with a upload sequence, then persist it on a storage backend such as S3. Each chunk request could hit a completely different stateless server and the transfer will work fine since we are transferring the state (upload sequence) with every request. The client maintains the state in this case.
Rest constraints
Client/server architecture
Is there separation of concern? Can you upgrade your server without upgrading client? Can you upgrade the server without upgrading the client?
Statelessness
Is your api stateless? Can you restart your backend server and clients of your api resume working normally without failing? Can you add a non sticky load balancer and transfer the load between the servers without the client breaking?
Cachablity
Can resources that can be cached be cached with your api? And is there a way to identify stale resources?
Layered systems
Can I insert gateways and proxies and firewalls silently without this architecture breaking? Load balancers
Uniform interface
Resource identification (uri)
Resource Representation (json)
HATEOAS
Hypermedia as an engine to application state
Initial link can link to the rest ( github)
Github
Emojis
HTTP video https://www.youtube.com/watch?v=0OrmKCB0UrQ
jump codes
Stay Awesome!
Hussein
Видео REST API Pros and Cons (Explained by Example) канала Hussein Nasser
Intro 0:00
Representations and State transfer 3:00
Rest constraints 12:14
REST API github api (18:18)
Representation and State transfer
Representational
The resource is a representation or metadata, but the actual backend could be something else and stored differently. An
Example, could be a user resource could be represented as a JSON object but it is stored on the backend as relation DBMS tables such as postgres.
State transfer
The application server is stateless, and when we want communicate we transfer the current state of with each request. Thus the state transfer.
Example, lets say you are uploading a 5MB file in 5 chunks each is 1 MB in size and assemble it on the backend. The REST api end point takes the content along with a upload sequence, then persist it on a storage backend such as S3. Each chunk request could hit a completely different stateless server and the transfer will work fine since we are transferring the state (upload sequence) with every request. The client maintains the state in this case.
Rest constraints
Client/server architecture
Is there separation of concern? Can you upgrade your server without upgrading client? Can you upgrade the server without upgrading the client?
Statelessness
Is your api stateless? Can you restart your backend server and clients of your api resume working normally without failing? Can you add a non sticky load balancer and transfer the load between the servers without the client breaking?
Cachablity
Can resources that can be cached be cached with your api? And is there a way to identify stale resources?
Layered systems
Can I insert gateways and proxies and firewalls silently without this architecture breaking? Load balancers
Uniform interface
Resource identification (uri)
Resource Representation (json)
HATEOAS
Hypermedia as an engine to application state
Initial link can link to the rest ( github)
Github
Emojis
HTTP video https://www.youtube.com/watch?v=0OrmKCB0UrQ
jump codes
Stay Awesome!
Hussein
Видео REST API Pros and Cons (Explained by Example) канала Hussein Nasser
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
RFC 9000 - QUIC #minuteengineering #quicThe Cost of Memory FragmentationWhen to Switch a Backend Programming Language?High severity flaw can crash your WebServer when using OpenSSL - Let us discussThe Cloudflare mTLS vulnerability - A Deep Dive AnalysiscURL TLS 1.3 session ticket proxy host mixup VulnerabilityLearn Programming with VB.NET - 10 - How did I learn programmingPublish/Subscribe Backend Systems Explained In 60 Seconds #shorts_husseinShow Your Work. Blog, Vlog, Write, Create and Develop!Critical Bug in Jenkins - This is why Building a Web Server is HardDenial of Service through DNS request Discovered in Node JS (CVE-2020-8277)YugabyteDB supports read committed isolationNew course alert - Unlocking Backend PerformanceDigicert revokes 50,000 EV CertificatesJavascript By Example L1E09 - Code simplification and debuggingWhy 0177.0.0.1 is also localhostWhy Browsers have 6 active TCP Connections for each website?Chrome follows FireFox steps - Rolling back SameSite cookie changeChrome Dedicated ROOT Certificate Store is Coming Soon, What Does That Mean To You? let us discussEnvoy Proxy Fixes Two Zero Day vulnerabilities (UDP Proxy, TCP Proxy) - CVE-2020-35470This Python And NodeJS IP Address Validation Vulnerability is Severe, Lets discuss