restifarian
A RESTifarian is a zealous proponent of the REST
REST
REpresentational State Transfer
Is an architectural style for distributed systems
Conforming to the REST constraints is generally referred to as being "RESTful"
rest
Resource based
(GET) scheduler/channels - getSchedulerChannels();Versus SOAP-RPC (Simple Object Access Protocol)
Identified by URIs
Multiple URIs (may) refer to the same resouce
Representations
-
Resource: channel (CNN)
-
Service: view meta data (GET)
-
Representation:
- call-sign, alias, multicast feed, etc
- JSON/XML format
HTTP
request
response
http verbs
rest constrains
- Uniform Interface
- Stateless
- Cache
- Client-Server
- Layered system
- Code on Demand
Uniform Interface
The uniform interface constraint defines the interface between clients and servers. It simplifies and decouples the architecture, which enables each part to evolve independently
HTTP verbs (CRUD)
URIs (resource name)
HTTP response (status, body)
Statless
- Server contains no client state
- Each request contains enough context to process the message (self descriptive messages)
- Any session state is held on the client
- Visibility
- Reliability
- Scalability
stateless
- Visibility is improved because a monitoring system does not have to look beyond a single request datum in order to determine the full nature of the request
-
Reliability is improved because it eases the task of recovering from partial failures
-
Scalability is improved because not having to store state between requests allows the server component to quickly free resources
Cache
As on the World Wide Web, clients/CDN can cache responses.
This gives us: The advantage of having the potential to partially or completely eliminate some interactions, improving efficiency
Each request must declare it's own caching rule:
- Implicitly
- Explicitly
- Negotiate
Client - server
- Separation of concerns is the principle behind the client-server constraint.
- By separating the user interface concerns from the data storage
concerns, we improve the portability of the user interface across
multiple platforms and improve scalability by simplifying the server
components.
- Components to evolve independently
layered system
The primary disadvantage of layered systems is that they add
overhead and latency to the processing of data.
Code on demand
Servers are able to temporarily extend or customize the functionality of a client by transferring logic to it that it can execute.
The reply can be javascript file, java applet
response types
Examples
In the wild
Resources
http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
Type 'what is RESTful service' in google...dahhhh
Demo
Copy of restafarian
By Eder Rafo Jose Pariona Espiñal
Copy of restafarian
- 747