In this new series of posts I will talk about a architecture style widely used in web services for distributing simultaneously hypermedia content such as texts, images, videos, etc. The style is called REST (REpresentational State Transfer) where the term RESTful refers to the systems which follow the REST principles.
Introduction
Introduction
Currently, companies like Yahoo, Amazon among others, are deeply using this technology, which became quite popular. One of the reasons to this success is the fact that you can easily create a client that uses the Amazon services or even access your Twitter Account by a simple application.
Imagine if you have a web service or a social network and you want developers all around the planet to develop applications that communicate with your web service and use your data to develop new awesome ideas. By using REST architecture you can easily develop and deploy APIs for giving access to your data to outside applications, delivering new functionalities to the web community via an open API.
In this article and the next ones I will show a simple API that I developed and how I used the principles REST (HTTP response codes, methods, cache, cookies, security, tests) to implement it. The examples of codes presented here are using the library Python and the framework for Web Django.
Introducing the client/server protocol
REST is not an official standard, but an architecture style of networked systems consisting of clients and servers. The idea behind it is that clients initiate the requests to the servers and then the servers process requests and return appropriate responses.
In the REST architecture, neither the client and server need to store the transitional states between the exchanged messages of request and response. This restriction isolates the client of the changes in the server side, since, between two requests, there is not connection client-server. The client could receive data from the server, while the server is working on at the first request. Even if the second request restarts, the first connection would not realize what happened. In fact, the separation between client and server must be clear: One module works as the service provider the other one consumes this service as consumer.
REST uses the set of methods defined in the HTTP protocol, which the most known are POST and GET. Adding the PUT and DELETE, we have a CRUD. CRUD known as Create, Read, Update and Delete are the four basic functions of persistent storage. It is also considered a convention used to describe a user interface that facilitate viewing, searching and changing information. There are also more methods such as HEAD and OPTIONS, which it will be explored in another post.
The Requests and responses in REST are built around the transfer of "representations" of "resources". A resource can be considered and concept that is addressed and it is the information elements of the REST architecture. Any information coherent and meaningful can be considered a resource. Examples: Users, documents, images, another resources, etc. Each resource has a set of methods as explained in the last paragraph. A representation of the resource is typically a document that captures the current or intended state of a resource.
It is important to remind that the resources are thing, not actions, so the names used in the URI (the Uniform Resource Identifier), that is, the identity of the resource in the Internet, must be standardized as nouns. For instance, for a User resource, you should use for the method GET when requested the URI /user/{id}. So it is not a pattern to map the URI as /user/getUser/{id} , since the basic operations - create, read , update and delete are defined logically by the methods HTTP.
REST x SOAP
The motivation behind REST web services follows the basic principle that drives the technology: "To make complex things simpler". The first generation web services relied on exchanging XML packets conforming to SOAP (Simple Object Access Protocol) specification using HTTP protocol. However, supporters of REST architecture consider SOAP and XML to be too heavy special when we deal with clients with limited capabilities such as mobile phones and tablets. It is also common in REST services to use JSON (JavaScript Object Notation) as a convenient, "fat-free" alternative to XML. So clients running with browsers with embedded JavaScript logic would easily access REST resources in an asynchronous fashion AJAX for example.
The REST is interesting to use in the following situations:
- The WebServices are totally stateless;
- The storage in cache can be explored for performance;
- The producer and consumer of services have a mutual comprehension of the context and content of what is repassed;
- If the bandwidth is limited, for instance, in mobile devices with limited capabilities like tablets and mobile phones.
The SOAP is interesting to use when:
- A formal contract must be established to describe the interface that offers the web service. The WSDL (Web Service Description Language) describes the logic details such as messages, operations, call and location services in the web.
- If the architecture must follow complex non-functional requirements. Examples include transactions, security, addressing, coordenation as others. Most of the real world applications go beyond of the simple CRUD operations and require contextualized information and conversational states;
- The architecture must handle with asynchronous processing, invocation logic and other services and states. This is easily handled with BPM (Business Process Management).
REST Architecture vs SOAP Architecture |
The REST architecture can also be considered a service-oriented architecture (SOA), which implements the basic principles of interoperability and weak coupling. In the next post we will explore in details those principles in REST.
- REST, Wikipedia
- Geeknizer, REST vs SOAP
Welcome to Wiztech Automation - Embedded System Training in Chennai. We have knowledgeable Team for Embedded Courses handling and we also are after Job Placements offer provide once your Successful Completion of Course. We are Providing on Microcontrollers such as 8051, PIC, AVR, ARM7, ARM9, ARM11 and RTOS. Free Accommodation, Individual Focus, Best Lab facilities, 100% Practical Training and Job opportunities.
ReplyDelete✔ Embedded System Training in chennai
✔ Embedded System Training Institute in chennai
✔ Embedded Training in chennai
✔ Embedded Course in chennai
✔ Best Embedded System Training in chennai
✔ Best Embedded System Training Institute in chennai
✔ Best Embedded System Training Institutes in chennai
✔ Embedded Training Institute in chennai
✔ Embedded System Course in chennai
✔ Best Embedded System Training in chennai
Embedded system training: Wiztech Automation Provides Excellent training in embedded system training in Chennai - IEEE Projects - Mechanical projects in Chennai. Wiztech provide 100% practical training, Individual focus, Free Accommodation, Placement for top companies. The study also includes standard microcontrollers such as Intel 8051, PIC, AVR, ARM, ARMCotex, Arduino, etc.
ReplyDeleteEmbedded system training in chennai
Embedded Course training in chennai
Matlab training in chennai
Android training in chennai
LabVIEW training in chennai
Robotics training in chennai
Oracle training in chennai
Final year projects in chennai
Mechanical projects in chennai
ece projects in chennai
WIZTECH Automation, Anna Nagar, Chennai, has earned reputation offering the best automation training in Chennai in the field of industrial automation. Flexible timings, hands-on-experience, 100% practical. The candidates are given enhanced job oriented practical training in all major brands of PLCs (AB, Keyence, ABB, GE-FANUC, OMRON, DELTA, SIEMENS, MITSUBISHI, SCHNEIDER, and MESSUNG)
ReplyDeletePLC training in chennai
Automation training in chennai
Best plc training in chennai
PLC SCADA training in chennai
Process automation training in chennai
Final year eee projects in chennai
VLSI training in chennai
ASP.NET Web API
ReplyDeleteASP.NET Web API Training | Web API Training | Web API Training in Chennai | ASP.NET Web API Online Training | ASP.NET Web API Interview Questions | ASP.NET Web API Tutorials | Dot Net Training in Chennai
PLC training in Cochin, Kerala
ReplyDeleteAutomation training in Cochin, Kerala
Embedded System training in Cochin, Kerala
VLSI training in Cochin, Kerala
PLC training institute in Cochin, Kerala
Embedded training in Cochin, Kerala
Best plc training in Cochin, Kerala
I visited your sites.
ReplyDeleteB.Tech College in Noida
Thank you for sharing such informative information about Embedded System Noida. This is very helpful blog on embedded course. I will come here again for getting more information.
ReplyDeleteGreat information...
ReplyDeleteThanks for Sharing...
AVR Training, Embedded Systems Training, PLC and SCADA Training, Industrial Automation Training
Big Data and Hadoop is an ecosystem of open source components that fundamentally changes the way enterprises store, process, and analyze data.
ReplyDeletepython training in bangalore
aws training in bangalore
artificial intelligence training in bangalore
data science training in bangalore
machine learning training in bangalore
hadoop training in bangalore
devops training in bangalore
Gaining Python certifications will validate your skills and advance your career.
ReplyDeletepython certification
I like your blog, I read this blog please update more content on python, further check it once at python online training
ReplyDeleteNice blog...
ReplyDeleteThanks for Sharing...
AVR Training
Embedded Systems Training
PLC and SCADA Training
PLC Training
Industrial Automation Training
ReplyDeleteGreetings. I know this is somewhat off-topic, but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform like yours, and I’m having difficulty finding one? Thanks a lot.
Best AWS Training in Chennai | Amazon Web Services Training Institute in Chennai Velachery, Tambaram, OMR
Advanced AWS Training in Bangalore |Best AWS Training Institute in Bangalore BTMLA ,Marathahalli
Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
ReplyDeletemicrosoft azure training in bangalore
rpa interview questions and answers
automation anywhere interview questions and answers
blueprism interview questions and answers
uipath interview questions and answers
rpa training in bangalore
Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.
ReplyDeleteBest Devops online Training
Online DevOps Certification Course - Gangboard
Best Devops Training institute in Chennai
Very good brief and this post helped me alot. Say thank you I searching for your facts. Thanks for sharing with us!
ReplyDeletepython Course in Pune
python Course institute in Chennai
python Training institute in Bangalore
I very much enjoyed this article.
ReplyDeleteEmbedded System Training in Delhi
Embedded System Training institute in Delhi
Amazing content.
ReplyDeleteData Mining Service Providers in Bangalore
Thanks for sharingData Mining software service providers
ReplyDelete
ReplyDeleteThanks for sharing the valuable information here. So i think i got some useful information with this content. Thank you and please keep update like this informative details.
wedding catering services in chennai
birthday catering services in chennai
corporate catering services in chennai
taste catering services in chennai
veg Catering services in chennai
I have scrutinized your blog its engaging and imperative. I like your blog.
ReplyDeletecustom application development services
Software development company
software application development company
offshore software development company
custom software development company
python training in bangalore | python online taining
ReplyDeleteaws training in bangalore | aws online training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
data science training in bangalore | data science online training
Thanks for sharing this information. I really Like Very Much.
ReplyDeletebest devops online training
Thanks for sharing this information. I really Like Very Much.
ReplyDeletebest devops online training
Great Article
ReplyDeleteArtificial Intelligence Projects
Project Center in Chennai
JavaScript Training in Chennai
JavaScript Training in Chennai
Pretty Good Article!
ReplyDeleteAt devu.in, we provide training in Data Science Training in Bangalore
This professional hacker is absolutely reliable and I strongly recommend him for any type of hack you require. I know this because I have hired him severally for various hacks and he has never disappointed me nor any of my friends who have hired him too, he can help you with any of the following hacks:
ReplyDelete-Phone hacks (remotely)
-Credit repair
-Bitcoin recovery (any cryptocurrency)
-Make money from home (USA only)
-Social media hacks
-Website hacks
-Erase criminal records (USA & Canada only)
-Grade change
-funds recovery
Email: onlineghosthacker247@ gmail .com
Studyprovider has experts team are giving the homework help, assignment help, report, thesis, research writing services and management accounting assignment help available 24/7 seven days a week contact now.
ReplyDelete