Tuesday, September 5, 2017

REST - Representational State Transfer

Today's post is a little different. I read a little about the REST architecture and found it fascinating. I hope you do too, after reading this. 
REST is an architectural style that makes up the web. 
HTTP is mainly a pointer that can track any resource in the world. It has versatility, but till today we use it only for browsing web pages. In fact, we can’t really think of any other uses of it. But it was built to have far more applications than its given credit for. Basically, HTTP, rather the entire web today focuses its application on human interaction with the machine; what we fail to learn is that HTTPs are much more flexible than that, i.e. applications can be made using HTTP for machine interaction as well. The webpage as we know it is mainly a representation of several relevant resources put together (like an image, videos). This is understandable by humans, not by computers. So, computers really don’t know what useful information they have brought to you. All they do is go get it for you. Imagine machines doing stuff like that for each other and generating very useful info smartly without human interaction. HTTP is capable of creating another representation (like the webpage) that is understandable by the computer too. Sort of like a binary representation of the data that you’re fetching. That way, the system too understands what data is given, and can communicate to other systems using the data and its binary representation. This kind of access, when given to a machine, can provide great results if a smartness is programmed in machines to learn the information they just fetched and try to understand the priority &/or requirement of the human accessing request and get far better results than what exists.
Credits: www.ibm.com
Let me try and give an example : Suppose you want a cheap gadget, say a smartphone. Now, you talk to the people you know and among them, none have the phone available for that budget. But, a well-wisher recommends you to some other person who he thinks will have the phone available for your budget. Now, machines can't do that because they have no idea what resources they've picked up from world wide web, since they're not in machine understandable formats, but human understandable formats. But, it'd be excellent if machines had such intelligence. Say machine X is requesting some resource from a server, say, machine Y. Now, machine Y has no such resources but given that it collects such immense data (assume it can understand it), then Y can definitely be given intelligence to tell machine X that it doesn't have the resource available but X's request maybe processed by some other server, machine Z. This will definitely enable machines to have human-like intelligence and that can get work done a lot faster and more efficiently.

For more info you can check out the wiki page : 
https://en.wikipedia.org/wiki/Representational_state_transfer

No comments:

Post a Comment