Investigation: Rest vs Soap

I am curious as to what the difference is and what each can be used for so I’m going to turn it into a seminar at some point if I make progress.  I’ve been meaning to research this, so as someone smart told me, teaching something will help you learn faster.  This is not complete, but please feel free to comment/suggest, I’ll try to incorporate things.

Specifically, I want to answer certain questions:

  1. What is service-oriented architectures (SOA), where did it come from, why is it important and when that kind of solution is appropriate for use?
  2. Implementing solutions – what are the design patterns and best-practices?
  3. What is REST, what is SOAP and why use one over the other.

Let’s start with simple definitions:

  • SOA – Service Oriented Architecture in computer software design in which application components provide services to other components via a communications protocol, typically over a network. The principles of service-orientation are independent of any vendor, product or technology (wikipedia).
    • Ability for applications to communicate over a network
    • Pass and parse metadata between services
  • Web Service – protocols to allow for machine to machine communication
  • REST( representational state transfer )
    • the primary purpose is to manipulate representations of web resources using a uniform set of stateless operations.
    • Stateless
      • communications protocol that treats each request as an independent transaction that is unrelated to any previous request so that the communication consists of independent pairs of Request & Response
      • protocol does not require the server to retain session information or status about each communication partner for the duration of multiple requests
      • HTTP is an example of stateless – each request message can be understood in isolation.
  • SOAP – Simple Object Access Protocol
    • It uses XML Information Set for its message format, and relies on application layer protocols, most notably Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol(SMTP), for message negotiation and transmission.
    • This XML-based protocol consists of three parts:
      • an envelope, which defines the message structure[1] and how to process it
      • a set of encoding rules for expressing instances of application-defined datatypes
      • a convention for representing procedure calls and responses
    • SOAP has three major characteristics:
      1. extensibility (security and WS-routing are among the extensions under development)
      2. neutrality (SOAP can operate over any transport protocol such as HTTP, SMTP, TCP, UDP, or JMS)
      3. independence (SOAP allows for any programming model)
    • It is stateful
      • a protocol that requires keeping the internal state on the server.
      • FTP is an example of stateful – communication conducting an interactive session with the user.  Information concerning authentication and variable values are stored on the server.
      • Cookie is another example – small piece of data sent from a website and stored on the users browser.  When a user loads the website, the cookie is sent to notify the server of the users previous activity.
  • Web Services Description Language (WSDL)
    • is an XML-based interface definition language that is used for describing the functionality offered by a web service.
    • provides a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns
    • Has a service and a port to use in accessing WS
  • Communication protocols –
    • XML
    • JSON – JavaScript Object Notation
  • UDDI – Universal Description Discovery and Integration
  • URI
  • Service Broker
  • SEI – Service Endpoint Interface: the class(es) that allow for accessing web services.  Tools take in the WSDL and generate the appropriate classes to access the Web Service.  The stub that gets generated is used to access the methods in the WS.
  • Mashup

3/14/16 – 9:24pm : general mumblings, definitions of things, and the beginning of a headache.

3/16/16 – 9:30pm : more information and better org.  Also asking the initial questions.