Wednesday, April 12, 2017

Overview of Restful api


Richardson's Maturity Model

The path towards REST is defined by Leonard Richardson
 Only level 3 in this model can be considered REST



 It starts at ( POX) Plain old XML )


It is based on a idea of network based API rather than library based API

Properties of REST

  • Heterogeny
         It is the ability of the application to seamlessly interoperate with other participation's regardless language and platform

  • Scalability
         It limits the complexity that can exist between components in a distributed system,enabling the complexity of the overall system to scale much past the limits of more typical application architecture
         Efficiently manage request and to scale horizontally when needed

  • Evolovability
       Ability of restful clients to evolve independently of one another as was described earlier when we were talking about the challenges by devices
  • Visibility

      Value added components such as monitoring applications or intelligent gateways to operate correctly without needing access to any hidden and potentially proprietaries state (Session state)

  • Reliability
     Can recover from failures including partial failures

  • Efficiency
      Enables multiple components such as proxy servers and caches to participate in the handling of the request. Takes load away from our server. Keeps our server to manage bunch of shared state. It enables to manage its own resources

  • Performance

     Caches can improve the efficiency of  a restful applications and speed in which response can be delivered to a user agent

  • Manageability
       Can be easily managed. Interactions happen in a highly  consistent and highly visible way

Defining REST

   RPC

  • Its not a new way to use http to make a remote procedure call
  • Its not any architecture that is not soap and wsdl
  • Design target of a network interaction is a resource
  • The semantics among the remote interactions are not abstracted away at all. Key part of the design
   HTTP
  • It is not http ( While most current implementation are built using HTTP, an architecture implemented on top is not RESTful).
          Note: we can write http applications which is not fundamentally restful
   URI

  •  Largely because of the frameworks on which they are built, many RESTful systems have clean URLs ("cool URLs"). However this is not the requirement for REST
  • Hyper-foucs on URI's can actually make designs not RESTful

   RPC

  •  The design target of a network interaction is a remote function or method
  •  Goal of an RPC architecture abstract a way all of the other details of the network. so that all components may be interacting over a network. Those details are completely abstracted away from the developer who is writing a code

  REST
  • Stands fore "Represental state tranfer"
  • Introduced in 2000 by Roy Fielding as a part of his doctoral dissertation
  • Intended for long lived network based applications
  • All about style of thinking and designing applications. not a protocol not specific implementation design pattern. 
REST and SOAP
  • Its not that isnt SOAP. SOAP and wsdl is an implementation  detail of RPC-style systems
  • REST is justoposed with RPC

RPC VS REST





No comments:

Post a Comment