Give it a REST


I was asked recently what makes REST scalable. I wasn’t quite sure how to answer because all I knew about it (other than CRUD-type HTTP verbs) was that it was stateless. Before the question was asked, I had mentally mapped that CRUD concept to REST. Because I wasn’t totally sure, I figured I should dig in and learn more about REST.
While there can be methods on the exposed API that take HTTP verbs like PUT, GET, DELETE, etc., there’s more to the story than that. Plus, what gives, brain? REST == CRUD?? WTF?

So what is REST?

REST stands for REpresentational State Transfer. It’s an architectural style for a standard communication scheme between computer systems. Most of the time, the protocol standard is HTTP, a stateless communication standard used ubiquitously across the Internet. Due to the stateless nature of the communication, as long as the message between the two systems doesn't change, the code on either side of the communication can be changed without issue.

Why would I want to use REST?

Six contraints
  1. Uniform interface
  2. Stateless
  3. Client-server
  4. Cacheable
  5. Layered System
  6. Code on Demand



References

https://www.codecademy.com/articles/what-is-rest
https://medium.com/extend/what-is-rest-a-simple-explanation-for-beginners-part-1-introduction-b4a072f8740f
https://www.restapitutorial.com/lessons/whatisrest.html
https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm

Comments

Popular posts from this blog

Using Bogus to create Hierarchical Data Structures

Adventures in Getting a Site Hosted

Design Patterns: An Introduction