REST By: Vishwanath Vineet.

Slides:



Advertisements
Similar presentations
REST - Representational State Transfer
Advertisements

REST Vs. SOAP.
REST Introduction 吴海生 博克软件(杭州)有限公司.
Introduction to Web Services
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Building RESTful Interfaces
SOAP Quang Vinh Pham Simon De Baets Université Libre de Bruxelles1.
Technical Architectures
Software Architecture Design Instructor: Dr. Jerry Gao.
Lecture 23: Software Architectures
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
CS 415 N-Tier Application Development By Umair Ashraf July 6,2013 National University of Computer and Emerging Sciences Lecture # 9 Introduction to Web.
Web Services Michael Smith Alex Feldman. What is a Web Service? A Web service is a message-oriented software system designed to support inter-operable.
INTRODUCTION TO WEB DATABASE PROGRAMMING
The Design Discipline.
XForms: A case study Rajiv Shivane & Pavitar Singh.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
Web Architecture & Services (2) Representational State Transfer (REST)
REST.  REST is an acronym standing for Representational State Transfer  A software architecture style for building scalable web services  Typically,
An Introduction to Software Architecture
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
11/16/2012ISC329 Isabelle Bichindaritz1 Web Database Application Development.
Prepared By : Monika Darji Web Services using REST & JAX-WS.
RESTful applications Norman White. REST Representational state transfer Key concepts – Client Server architecture built on transferring resources between.
Web Services XML-RPC, SOAP, REST Advanced Web-based Systems | Misbhauddin.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
Web HTTP Hypertext Transfer Protocol. Web Terminology ◘Message: The basic unit of HTTP communication, consisting of structured sequence of octets matching.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Open Data Protocol * Han Wang 11/30/2012 *
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
The Client/Server Database Environment Ployphan Sornsuwit KPRU Ref.
Chris Kuruppu NWS Office of Science and Technology Systems Engineering Center (Skjei Telecom) 10/6/09.
3-Tier Client/Server Internet Example. TIER 1 - User interface and navigation Labeled Tier 1 in the following graphic, this layer comprises the entire.
World Wide Web “WWW”, "Web" or "W3". World Wide Web “WWW”, "Web" or "W3"
Web Architecture update for WSAWG/WSDL TAG published Principles of the Web Contents: –Identifiers Most of the work –Formats Not much –Protocols Summary.
Kemal Baykal Rasim Ismayilov
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
Representational State Transfer (REST). What is REST? Network Architectural style Overview: –Resources are defined and addressed –Transmits domain-specific.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
RESTful Web Services What is RESTful?
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
06 March 2007COMS E61251 COMS E6125 Web-enHanced Information Management (WHIM) Prof. Gail Kaiser Spring 2007.
Representational State Transfer COMP6017 Topics on Web Services Dr Nicholas Gibbins –
19 February 2008Kaiser: COMS E61251 COMS E6125 Web-enHanced Information Management (WHIM) Prof. Gail Kaiser Spring 2008.
Using Retrofit framework in implementation of Android REST client David Ante Macan*, Zlatko Stapić, Milan Pavlović* University of Zagreb Faculty of Organization.
REST REPRESENTATIONAL STATE TRANSFER Scott Ainsworth & Louis Nguyen (Group 1) Old Dominion University, CS 791: Web Syndication Formats, January 29, 2008.
10 February 2009Kaiser: COMS E61251 COMS E6125 Web-enHanced Information Management (WHIM) Prof. Gail Kaiser Spring 2009.
COMS E6125 Web-enHanced Information Management (WHIM)
RESTful Sevices Distributed Objects Presented by: Shivank Malik
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
WEB SERVICES.
REST- Representational State Transfer Enn Õunapuu
Unit – 5 JAVA Web Services
Advanced Web-based Systems | Misbhauddin
Software Design and Architecture
The Client/Server Database Environment
Representational State Transfer
Ashish Pandit, Louis Zelus, Jonathan Whitman
Software Architecture
RESTful Web Services.
REST på Microsoft-stacken
WEB SERVICES From Chapter 19, Distributed Systems
Python and REST Kevin Hibma.
Presentation transcript:

REST By: Vishwanath Vineet

Introduction REST stands for Representational State Transfer It consists of: REST constraints REST architecture elements

REST Constraints

Client-Server Using a client-server architecture separates the user interface concerns from the data storage concerns. Improves portability of user interface across multiple platforms. Simplifies server components and improves scalability.

Stateless Communication must be stateless in nature. All information needed to process the request is contained entirely in the request. Session state is stored entirely on the client (not on the server). Improves visibility and scalability. Disadvantage: may decrease network performance by increasing repetitive data in requests.

Cache In order to improve network efficiency, we add cache constraints to form the client-cache-stateless-server style Cache constraints require that the data within a response to a request be implicitly or explicitly labeled as cacheable or non-cacheable. improves efficiency, scalability, and user-perceived performance. cache can decrease reliability if stale data within the cache differs significantly from the data that would have been obtained from server.

Uniform Interface The central feature that distinguishes the REST architectural style from other network-based styles is its emphasis on a uniform interface between components the overall system architecture is simplified and the visibility of interactions is improved. Disadvantage: a uniform interface degrades efficiency, since information is transferred in a standardized form rather than one which is specific to an application's needs.

Layered System hierarchical layers by constraining component behavior such that each component cannot see beyond the immediate layer with which they are interacting. Limit system complexity Layers can be used to implement encapsulation. Disadvantage: they add overhead and latency to the processing of data, reducing user-perceived performance

Code-On-Demand REST allows client functionality to be extended by downloading and executing code in the form of applets or scripts. simplifies clients by reducing the number of features required to be pre-implemented. improves system extensibility.

REST Architectural Elements

Data Elements The nature and state of an architecture’s data elements is a key aspect of REST. REST provides a hybrid of all 3 options of a distributed hyper media REST components communicate by transferring a representation of a resource in a format matching one of standard data types, selected dynamically based on the capabilities Or by desires of the recipient and the nature of the resource. render the data where it is located and send a fixed-format image to the recipient; encapsulate the data with a rendering engine and send both to the recipient; or, send the raw data to the recipient along with metadata that describes the data type, so that the recipient can choose their own rendering engine.

Resources  This abstract definition of a resource enables key features of the Web architecture. It provides generality by encompassing many sources of information without artificially distinguishing them by type or implementation. It allows late binding of the reference to a representation REST relies on the author choosing a resource identifier that best fits the nature of the concept being identified.

Representations REST components perform actions on a resource by using a representation to capture the current or intended state of that resource and transferring that representation between components. A representation consists of data, metadata describing the data, and, on occasion, metadata to describe the metadata Metadata is in the form of name-value pairs, where the name corresponds to a standard that defines the value's structure and semantics.  Response messages may include both representation metadata and resource metadata Response messages may include both representation metadata and resource metadata: information about the resource that is not specific to the supplied representation.

Representations Control data defines the purpose of a message between components, such as the action being requested or the meaning of a response.  Depending on the message control data, a given representation may indicate the current state of the requested resource, the desired state for the requested resource, or the value of some other resource. For example, a representation of the input data within a client's query form, or a representation of some error condition for a response Control data defines the purpose of a message between components, such as the action being requested or the meaning of a response. It is also used to parameterize requests and override the default behavior of some connecting elements. For example, cache behavior can be modified by control data included in the request or response message.

Representations The data format of a representation is known as a media type The design of a media type can directly impact the user-perceived performance of a distributed hypermedia system. A data format that places the most important rendering information up front. Such that the initial information can be incrementally rendered while the rest of the information is being received, results in much better user-perceived performance than a data format that must be entirely received before rendering can begin.

Connectors The connectors present an abstract interface for component communication, enhancing simplicity by providing a clean separation of concerns and hiding the underlying implementation of resources and communication mechanisms. The different connectors that REST uses are client, server, cache, resolver, tunnel. Table 5-2: REST ConnectorsConnectorModern Web Examples Client libwww, libwww-perl Server libwww, Apache API, NSAPI Cache browser cache, Akamai cache network Resolver bind (DNS lookup library) Tunnel SOCKS, SSL after HTTP CONNECT

Connectors The primary connector types are client and server. Client initiates communication by making a request. Server listens for connections and responds to requests in order to supply access to its services Cache connector, can be located on the interface to a client or server connector in order to save cacheable responses. A resolver translates partial or complete resource identifiers into the network address information needed to establish an inter-component connection. Tunnel relays communication across a connection boundary, such as a firewall or lower-level network gateway. 

Components The different components are origin server, gateway, proxy, user agent. A user agent uses a client connector to initiate a request. Most common example is web browser. An origin server uses a server connector to govern the namespace for a requested resource. Intermediary components act as both a client and a server in order to forward, with possible translation, requests and responses. The difference between a proxy and a gateway is that a client determines when it will use a proxy.

JSON with REST JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. REST and JSON offer a more human-friendly way of representing data It allows you -- in a simple format -- to represent complex things with a minimal amount of metadata. JSON is compatible with JS and easy to handle with JAVA, C# etc.

JSON+REST vs. XML+SOAP JSON is a lot simpler than XML+XML Schema and is more isomorphic with the relational data Browsers can consume large amount of JSON much more efficiently than they can consume large amount of XML REST interfaces are much easier to design and implement than SOAP interfaces All you really need to focus on are modeling resources using JSON, modeling URL hierarchies, modeling search patterns and modeling batching for performance improvements.

Thank you