Professional Documents
Culture Documents
Generic Communication Protocols Evaluation: Intro To Restful Api and Json
Generic Communication Protocols Evaluation: Intro To Restful Api and Json
Evaluation
● What is REST?
● Basic REST concepts
● AUTOSAR and REST
● HTTP
● JSON
1. What is REST
● REpresentational State Transfer.
● Architecture style for networked systems (not a protocol nor a standard!)
● A set of rules and principles inspired from the web.
● Outlines how resources are defined and addressed.
● Blends very well with HTTP methods (GET, POST, PUT, DELETE).
● Relies on other standards to do its job (HTTP, TLS, JSON, etc…)
● Protocol, language and platform independent which makes it very flexible
● Client-Server architecture just like the web.
● Stateless
● Cacheable
● Uniform Interface (through HTTP methods)
Basic concepts of REST
Resources
protocol://hostname:port/path-and-file-name
There are 4 parts in a URL:
● Protocol: The application-level protocol used by the client and server, e.g., HTTP, FTP, and telnet.
● Hostname: The DNS domain name (e.g., www.nowhere123.com) or IP address (e.g., 192.128.1.2) of the
server.
● Port: The TCP port number that the server is listening for incoming requests from the clients.
● Path-and-file-name: The name and location of the requested resource, under the server document base
directory.
JSON
● JavaScript Object Notation.
● Is used theoretically when software components need to exchange.
● data(regardless of the programming language).
● Mostly used to serialize and transmit data over the network.
● Very Human readable.
● Less verbose and more compact compared to XML.
● Basic types map very well with known programming types.
● Reasonable choice for Embedded use cases due to performance.
● A standard to validate JSON objects called JSON schema.
JSON TYPES
JSON SCHEMA