0% found this document useful (0 votes)
82 views15 pages

Generic Communication Protocols Evaluation: Intro To Restful Api and Json

This document provides an overview of RESTful APIs and JSON. It defines REST as an architectural style for networked systems that relies on HTTP methods and other standards. The document outlines basic REST concepts like resources, URIs, and the client-server model. It also describes how AUTOSAR adapts REST for embedded systems. Finally, it explains JSON as a data format that is used to serialize and transmit data between software components, and notes its advantages over XML.

Uploaded by

jankos11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views15 pages

Generic Communication Protocols Evaluation: Intro To Restful Api and Json

This document provides an overview of RESTful APIs and JSON. It defines REST as an architectural style for networked systems that relies on HTTP methods and other standards. The document outlines basic REST concepts like resources, URIs, and the client-server model. It also describes how AUTOSAR adapts REST for embedded systems. Finally, it explains JSON as a data format that is used to serialize and transmit data between software components, and notes its advantages over XML.

Uploaded by

jankos11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Generic Communication Protocols

Evaluation

Intro to RESTful API and JSON


Content

● 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

● An abstraction of any kind of information.


● Any information that can be named is a resource (document, image, temporary
service, etc…)
● Represented with a global identifier (maps to a URI in HTTP).
○ https://drive.google.com/files/12345
AUTOSAR REST API
● Designed to meet embedded systems constraints(deterministic, low footprint, not too
complicated).
● Modular design to allow better flexibility (OEM can add extra layers on top, vendor-
specific implementations, etc…).
● 3 fundamental abstraction blocks:
○ Object graph to represent the data model.
○ URI
○ Request methods
● Task and asynchronous based model
BASIC COMPONENTS OF ARA::REST
ASPECTS OF HTTP
● Simplicity: HTTP headers can be easily read by Humans
● Extensibility: New features can be added by simple agreement between the client and
the server
● Stateless: No state is kept between different requests(But can be achieved using
cookies)
● Can be used to control authentication, caching and sessions(using cookies).
HTTP Messages

Request Message Response Message


Uniform Resource Locator (URL)
● used to uniquely identify a resource over the web. URL has the following syntax.

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy