SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
API Design in the Modern Era
Eran Stiller
Chief Technology Officer, CodeValue
erans@codevalue.net
@eranstiller
https://stiller.blog
https://codevalue.net
What Choice Do We Have When Designing an API?
2
There Are Multiple
Choices!
3
Agenda
▪ REST
▪ OpenAPI
▪ gRPC
▪ AsyncAPI
4
About Eran
Eran Stiller
▪ @eranstiller
▪ CTO & Founder at CodeValue
▪ Software architect, consultant and instructor
▪ Microsoft Regional Director & Azure MVP
▪ Founder of Azure Israel Meetup
5
Azure Israel
▪ https://www.meetup.com/AzureIsrael
6
REST
8
REST
▪ Representational State Transfer (REST)
▪ Largely based on the HTTP protocol
▪ Web APIs that conform the REST are called RESTful APIs
▪ An architecture style, not standard
▪ Various interpretations and guidelines exist
▪ No absolute right and wrong
▪ Only good and not-so-good practices ☺
12
Richardson Maturity Model
Level 3:
Hypermedia
Level 2:
HTTP Verbs
Level 1: Resources
Level 0: The Swamp of POX
13
Hypermedia Control (HATEOAS)
14
{
"departmentId": 10,
"departmentName": "Administration",
"locationId": 1700,
"managerId": 200,
"links": [
{
"href": "10/employees",
"rel": "employees",
"type" : "GET"
}
]
}
Hypermedia Control (HATEOAS)
▪ Implementing HATEOAS is hard
▪ Some implementations available
▪ JSON API
▪ ODATA
▪ HAL
▪ Siren
▪ JSON Hyper-Schema
15
Demo
OData
16
https://youtu.be/hgW6LXyxw00
(Hebrew)
What If You Don’t Implement HATEOAS?
17
OpenAPI
18
OpenAPI – an Interface Definition Language (IDL)
▪ A standard means to convey the interface shape out-of-band
19
OpenAPI – an Interface Definition Language (IDL)
20
openapi: 3.0.0
info:
title: Library API
version: 1.0.0
servers:
- url: http://localhost:8080
paths:
/api/books/{bookId}:
get:
tags:
- Books
operationId: getBook
parameters:
- name: bookId
in: path
required: true
style: simple
21
parameters:
- name: bookId
in: path
required: true
style: simple
explode: false
schema:
type: integer
format: int32
x-position: 1
responses:
"200":
description: The requested book
content:
application/json:
schema:
$ref: '#/components/schemas/Book'
"404":
description: The requested book was not found
x-swagger-router-controller: Books
Expected Client Usage
1. Decide which OpenAPI URL path template to use
2. Calculate the parameter values to use (if any)
3. Plug the parameter values into the URL path template
4. Send an HTTP request
22
Design Approach
Code-First vs. Contract-First
23
Design Approach
Entity-Oriented vs. Procedure-Oriented
24
Tooling Support
▪ Code generators
▪ Client & Server
▪ Test generators
▪ Documentation generators
▪ API Gateway support
25
Demo
OpenAPI
26
https://youtu.be/N5LLDKw_5bo
(Hebrew)
GraphQL – Noteworthy Alternative
28
gRPC
29
gRPC – an Interface Definition Language
▪ Similar, but different, to OpenAPI
▪ A modern alternative to RPC frameworks of the past
▪ DCOM
▪ WCF
▪ XML-RPC
▪ JSON-RPC
▪ …
▪ Quickly becoming the de-facto standard in RPC
30
Proto Files
31
syntax = "proto3";
package helloworld;
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
}
Proto Files – Streaming
32
syntax = "proto3";
package hellostreamingworld;
service MultiGreeter {
rpc sayHello (HelloRequest) returns (stream HelloReply) {}
}
message HelloRequest {
string name = 1;
string num_greetings = 2;
}
message HelloReply {
string message = 1;
}
Demo
gRPC
34
https://youtu.be/JCueeqc6-BA
(Hebrew)
gRPC Considerations
▪ Contract-first
▪ Lots of code/test/document generation support
▪ API Gateway support
▪ Not at the level of OpenAPI (yet)
▪ Typically modeled with a procedural orientation
▪ Can be used in a constrained entity driven model
▪ Allow mapping to REST with “grpc-gateway”
36
Mapping to REST with Annotations
37
syntax = "proto3";
import "google/api/annotations.proto";
message StringMessage {
string value = 1;
}
service YourService {
rpc Echo(StringMessage) returns (StringMessage) {
option (google.api.http) = {
post: "/v1/example/echo"
body: "*"
};
}
}
AsyncAPI
38
What About Asynchronous Communications?
39
Traditionally – Do It Yourself
▪ Model the messages (how?)
▪ Publish the model (how?)
▪ Convey protocol decisions (how?)
▪ Manage versions (how?)
40
AsyncAPI to the Rescue
▪ An attempt to standardize out-of-band conveying of data
▪ Like OpenAPI for asynchronous communication
▪ Does not assume any tech stack
▪ Bring your own protocol
▪ Bring your own schema
▪ Bring your own security mechanism
▪ The more standard it is, the more likely tools will support it
▪ Defines two operation types a service can support
▪ Publish
▪ Subscribe
▪ Code-First & Contract-First
41
Demo
AsyncAPI
42
https://youtu.be/c4NKi9hO5pk
(Hebrew)
Warning – Here Be Dragons!
44
Takeaways
▪ REST is more than HTTP APIs
▪ OpenAPI allows simplifying work with HTTP APIs
▪ OpenAPI assumes HTTP & JSON
▪ Does not coerce REST semantics
▪ GraphQL is an interesting alternative
▪ gRPC is a modern RPC-style framework
▪ AsyncAPI attempts to close the gap on asynchronous programming
▪ Still in pre-alpha state for most technologies/platforms
45
Additional Resources
▪ Source code
▪ https://github.com/estiller/modern-era-apis
▪ Demo videos
▪ https://www.youtube.com/playlist?list=PLnimcNcOqCXizxqWEceI0IH3-bDpCJzkC
▪ Official Websites
▪ https://www.openapis.org/
▪ https://grpc.io/
▪ https://www.asyncapi.com/
▪ Articles
▪ https://cloud.google.com/blog/products/api-management/understanding-grpc-openapi-and-
rest-and-when-to-use-them
▪ https://medium.com/apis-and-digital-transformation/openapi-and-grpc-side-by-side-
b6afb08f75ed
▪ https://www.freecodecamp.org/news/rest-is-the-new-soap-97ff6c09896d/
46
Eran Stiller
erans@codevalue.net
@eranstiller
https://stiller.blog

Más contenido relacionado

La actualidad más candente

Nils Rhode - Does it always have to be k8s - TeC Day 2019
Nils Rhode - Does it always have to be k8s - TeC Day 2019Nils Rhode - Does it always have to be k8s - TeC Day 2019
Nils Rhode - Does it always have to be k8s - TeC Day 2019Haufe-Lexware GmbH & Co KG
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework BasicMario Romano
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationLior Tal
 
Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe Erica Windisch
 
ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018Mario Romano
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWSAnton Babenko
 
O365Con18 - Working with PowerShell, VS Code and GitHub - Thomas Vochten
O365Con18 - Working with PowerShell, VS Code and GitHub - Thomas VochtenO365Con18 - Working with PowerShell, VS Code and GitHub - Thomas Vochten
O365Con18 - Working with PowerShell, VS Code and GitHub - Thomas VochtenNCCOMMS
 
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...NCCOMMS
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016André Rømcke
 
Microservices with AWS Lambda and the Serverless Framework
Microservices with AWS Lambda and the Serverless FrameworkMicroservices with AWS Lambda and the Serverless Framework
Microservices with AWS Lambda and the Serverless FrameworkRowell Belen
 
Modern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsModern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsAll Things Open
 
State in stateless serverless functions
State in stateless serverless functionsState in stateless serverless functions
State in stateless serverless functionsAlex Pshul
 
Tabtale story: Building a publishing and monitoring mobile games architecture...
Tabtale story: Building a publishing and monitoring mobile games architecture...Tabtale story: Building a publishing and monitoring mobile games architecture...
Tabtale story: Building a publishing and monitoring mobile games architecture...Tikal Knowledge
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as CodePrasant Kumar
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...ServerlessConf
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as codedaisuke awaji
 

La actualidad más candente (20)

Nils Rhode - Does it always have to be k8s - TeC Day 2019
Nils Rhode - Does it always have to be k8s - TeC Day 2019Nils Rhode - Does it always have to be k8s - TeC Day 2019
Nils Rhode - Does it always have to be k8s - TeC Day 2019
 
Alfresco Development Framework Basic
Alfresco Development Framework BasicAlfresco Development Framework Basic
Alfresco Development Framework Basic
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe Building Composable Serverless Apps with IOpipe
Building Composable Serverless Apps with IOpipe
 
ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018ADF Basics and Beyond - Alfresco Devcon 2018
ADF Basics and Beyond - Alfresco Devcon 2018
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWS
 
ASP.NET Core 1.0 Overview
ASP.NET Core 1.0 OverviewASP.NET Core 1.0 Overview
ASP.NET Core 1.0 Overview
 
O365Con18 - Working with PowerShell, VS Code and GitHub - Thomas Vochten
O365Con18 - Working with PowerShell, VS Code and GitHub - Thomas VochtenO365Con18 - Working with PowerShell, VS Code and GitHub - Thomas Vochten
O365Con18 - Working with PowerShell, VS Code and GitHub - Thomas Vochten
 
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
O365Con18 - Implementing Automated UI Testing for SharePoint Solutions - Elio...
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016
 
Microservices with AWS Lambda and the Serverless Framework
Microservices with AWS Lambda and the Serverless FrameworkMicroservices with AWS Lambda and the Serverless Framework
Microservices with AWS Lambda and the Serverless Framework
 
Modern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsModern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web Apps
 
Why I am hooked on the future of React
Why I am hooked on the future of ReactWhy I am hooked on the future of React
Why I am hooked on the future of React
 
State in stateless serverless functions
State in stateless serverless functionsState in stateless serverless functions
State in stateless serverless functions
 
Tabtale story: Building a publishing and monitoring mobile games architecture...
Tabtale story: Building a publishing and monitoring mobile games architecture...Tabtale story: Building a publishing and monitoring mobile games architecture...
Tabtale story: Building a publishing and monitoring mobile games architecture...
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
Rob Gruhl and Erik Erikson - What We Learned in 18 Serverless Months at Nords...
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as code
 
Nativescript with angular 2
Nativescript with angular 2Nativescript with angular 2
Nativescript with angular 2
 

Similar a Eran Stiller: API design in the modern era - architecture next 2020

Designing RESTful APIs
Designing RESTful APIsDesigning RESTful APIs
Designing RESTful APIsanandology
 
Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsAxway
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays
 
Rest API with Swagger and NodeJS
Rest API with Swagger and NodeJSRest API with Swagger and NodeJS
Rest API with Swagger and NodeJSLuigi Saetta
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonSmartBear
 
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Petko Mikhailov
 
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...apidays
 
Matrix.org decentralised communication, Matthew Hodgson, TADSummit
Matrix.org decentralised communication, Matthew Hodgson, TADSummitMatrix.org decentralised communication, Matthew Hodgson, TADSummit
Matrix.org decentralised communication, Matthew Hodgson, TADSummitAlan Quayle
 
Always up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIAlways up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIGOG.com dev team
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCTim Burks
 
Introduction to Backend Engineering
Introduction to Backend EngineeringIntroduction to Backend Engineering
Introduction to Backend EngineeringUdayYadav90
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIRasan Samarasinghe
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 

Similar a Eran Stiller: API design in the modern era - architecture next 2020 (20)

Api design best practice
Api design best practiceApi design best practice
Api design best practice
 
Designing RESTful APIs
Designing RESTful APIsDesigning RESTful APIs
Designing RESTful APIs
 
Content Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortalsContent Strategy and Developer Engagement for DevPortals
Content Strategy and Developer Engagement for DevPortals
 
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
apidays LIVE Helsinki - Implementing OpenAPI and GraphQL Services with gRPC b...
 
Rest API with Swagger and NodeJS
Rest API with Swagger and NodeJSRest API with Swagger and NodeJS
Rest API with Swagger and NodeJS
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & Python
 
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
Documenting an API for the First Time? Quick-Start Tips for Your First API Do...
 
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
apidays LIVE Australia 2020 - Have your cake and eat it too: GraphQL? REST? W...
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
API Conference 2021
API Conference 2021API Conference 2021
API Conference 2021
 
Matrix.org decentralised communication, Matthew Hodgson, TADSummit
Matrix.org decentralised communication, Matthew Hodgson, TADSummitMatrix.org decentralised communication, Matthew Hodgson, TADSummit
Matrix.org decentralised communication, Matthew Hodgson, TADSummit
 
Api 101
Api 101Api 101
Api 101
 
Always up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIAlways up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPI
 
Crafting APIs
Crafting APIsCrafting APIs
Crafting APIs
 
Implementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPCImplementing OpenAPI and GraphQL services with gRPC
Implementing OpenAPI and GraphQL services with gRPC
 
Introduction to Backend Engineering
Introduction to Backend EngineeringIntroduction to Backend Engineering
Introduction to Backend Engineering
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
 
Web APIs
Web APIsWeb APIs
Web APIs
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 

Más de CodeValue

Digital transformation buzzword or reality - Alon Fliess
Digital transformation buzzword or reality - Alon FliessDigital transformation buzzword or reality - Alon Fliess
Digital transformation buzzword or reality - Alon FliessCodeValue
 
The IDF's journey to the cloud - Merav
The IDF's journey to the cloud - MeravThe IDF's journey to the cloud - Merav
The IDF's journey to the cloud - MeravCodeValue
 
When your release plan is concluded at the HR office - Hanan Zakai
When your release plan is concluded at the HR office - Hanan  ZakaiWhen your release plan is concluded at the HR office - Hanan  Zakai
When your release plan is concluded at the HR office - Hanan ZakaiCodeValue
 
We come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan HaninWe come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan HaninCodeValue
 
The IoT Transformation and What it Means to You - Nir Dobovizky
The IoT Transformation and What it Means to You - Nir DobovizkyThe IoT Transformation and What it Means to You - Nir Dobovizky
The IoT Transformation and What it Means to You - Nir DobovizkyCodeValue
 
State in stateless serverless functions - Alex Pshul
State in stateless serverless functions - Alex PshulState in stateless serverless functions - Alex Pshul
State in stateless serverless functions - Alex PshulCodeValue
 
Will the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir ZukerWill the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir ZukerCodeValue
 
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
How I built a ml human hybrid workflow using computer vision - Amir ShitritHow I built a ml human hybrid workflow using computer vision - Amir Shitrit
How I built a ml human hybrid workflow using computer vision - Amir ShitritCodeValue
 
Application evolution strategy - Eran Stiller
Application evolution strategy - Eran StillerApplication evolution strategy - Eran Stiller
Application evolution strategy - Eran StillerCodeValue
 
Designing products in the digital transformation era - Eyal Livne
Designing products in the digital transformation era - Eyal LivneDesigning products in the digital transformation era - Eyal Livne
Designing products in the digital transformation era - Eyal LivneCodeValue
 
Eerez Pedro: Product thinking 101 - Architecture Next
Eerez Pedro: Product thinking 101 - Architecture NextEerez Pedro: Product thinking 101 - Architecture Next
Eerez Pedro: Product thinking 101 - Architecture NextCodeValue
 
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20CodeValue
 
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...CodeValue
 
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...CodeValue
 
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...CodeValue
 
Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20CodeValue
 
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?CodeValue
 
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20CodeValue
 
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
Moaid Hathot: Dapr  the glue to your microservices - Architecture Next 20Moaid Hathot: Dapr  the glue to your microservices - Architecture Next 20
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20CodeValue
 
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20CodeValue
 

Más de CodeValue (20)

Digital transformation buzzword or reality - Alon Fliess
Digital transformation buzzword or reality - Alon FliessDigital transformation buzzword or reality - Alon Fliess
Digital transformation buzzword or reality - Alon Fliess
 
The IDF's journey to the cloud - Merav
The IDF's journey to the cloud - MeravThe IDF's journey to the cloud - Merav
The IDF's journey to the cloud - Merav
 
When your release plan is concluded at the HR office - Hanan Zakai
When your release plan is concluded at the HR office - Hanan  ZakaiWhen your release plan is concluded at the HR office - Hanan  Zakai
When your release plan is concluded at the HR office - Hanan Zakai
 
We come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan HaninWe come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan Hanin
 
The IoT Transformation and What it Means to You - Nir Dobovizky
The IoT Transformation and What it Means to You - Nir DobovizkyThe IoT Transformation and What it Means to You - Nir Dobovizky
The IoT Transformation and What it Means to You - Nir Dobovizky
 
State in stateless serverless functions - Alex Pshul
State in stateless serverless functions - Alex PshulState in stateless serverless functions - Alex Pshul
State in stateless serverless functions - Alex Pshul
 
Will the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir ZukerWill the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir Zuker
 
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
How I built a ml human hybrid workflow using computer vision - Amir ShitritHow I built a ml human hybrid workflow using computer vision - Amir Shitrit
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
 
Application evolution strategy - Eran Stiller
Application evolution strategy - Eran StillerApplication evolution strategy - Eran Stiller
Application evolution strategy - Eran Stiller
 
Designing products in the digital transformation era - Eyal Livne
Designing products in the digital transformation era - Eyal LivneDesigning products in the digital transformation era - Eyal Livne
Designing products in the digital transformation era - Eyal Livne
 
Eerez Pedro: Product thinking 101 - Architecture Next
Eerez Pedro: Product thinking 101 - Architecture NextEerez Pedro: Product thinking 101 - Architecture Next
Eerez Pedro: Product thinking 101 - Architecture Next
 
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
 
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
 
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
 
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
 
Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20
 
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
 
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
 
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
Moaid Hathot: Dapr  the glue to your microservices - Architecture Next 20Moaid Hathot: Dapr  the glue to your microservices - Architecture Next 20
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
 
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
 

Último

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 

Último (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 

Eran Stiller: API design in the modern era - architecture next 2020

  • 1. API Design in the Modern Era Eran Stiller Chief Technology Officer, CodeValue erans@codevalue.net @eranstiller https://stiller.blog https://codevalue.net
  • 2. What Choice Do We Have When Designing an API? 2
  • 4. Agenda ▪ REST ▪ OpenAPI ▪ gRPC ▪ AsyncAPI 4
  • 5. About Eran Eran Stiller ▪ @eranstiller ▪ CTO & Founder at CodeValue ▪ Software architect, consultant and instructor ▪ Microsoft Regional Director & Azure MVP ▪ Founder of Azure Israel Meetup 5
  • 8. REST ▪ Representational State Transfer (REST) ▪ Largely based on the HTTP protocol ▪ Web APIs that conform the REST are called RESTful APIs ▪ An architecture style, not standard ▪ Various interpretations and guidelines exist ▪ No absolute right and wrong ▪ Only good and not-so-good practices ☺ 12
  • 9. Richardson Maturity Model Level 3: Hypermedia Level 2: HTTP Verbs Level 1: Resources Level 0: The Swamp of POX 13
  • 10. Hypermedia Control (HATEOAS) 14 { "departmentId": 10, "departmentName": "Administration", "locationId": 1700, "managerId": 200, "links": [ { "href": "10/employees", "rel": "employees", "type" : "GET" } ] }
  • 11. Hypermedia Control (HATEOAS) ▪ Implementing HATEOAS is hard ▪ Some implementations available ▪ JSON API ▪ ODATA ▪ HAL ▪ Siren ▪ JSON Hyper-Schema 15
  • 13. What If You Don’t Implement HATEOAS? 17
  • 15. OpenAPI – an Interface Definition Language (IDL) ▪ A standard means to convey the interface shape out-of-band 19
  • 16. OpenAPI – an Interface Definition Language (IDL) 20 openapi: 3.0.0 info: title: Library API version: 1.0.0 servers: - url: http://localhost:8080 paths: /api/books/{bookId}: get: tags: - Books operationId: getBook parameters: - name: bookId in: path required: true style: simple
  • 17. 21 parameters: - name: bookId in: path required: true style: simple explode: false schema: type: integer format: int32 x-position: 1 responses: "200": description: The requested book content: application/json: schema: $ref: '#/components/schemas/Book' "404": description: The requested book was not found x-swagger-router-controller: Books
  • 18. Expected Client Usage 1. Decide which OpenAPI URL path template to use 2. Calculate the parameter values to use (if any) 3. Plug the parameter values into the URL path template 4. Send an HTTP request 22
  • 19. Design Approach Code-First vs. Contract-First 23
  • 20. Design Approach Entity-Oriented vs. Procedure-Oriented 24
  • 21. Tooling Support ▪ Code generators ▪ Client & Server ▪ Test generators ▪ Documentation generators ▪ API Gateway support 25
  • 23. GraphQL – Noteworthy Alternative 28
  • 25. gRPC – an Interface Definition Language ▪ Similar, but different, to OpenAPI ▪ A modern alternative to RPC frameworks of the past ▪ DCOM ▪ WCF ▪ XML-RPC ▪ JSON-RPC ▪ … ▪ Quickly becoming the de-facto standard in RPC 30
  • 26. Proto Files 31 syntax = "proto3"; package helloworld; service Greeter { rpc SayHello (HelloRequest) returns (HelloReply) {} } message HelloRequest { string name = 1; } message HelloReply { string message = 1; }
  • 27. Proto Files – Streaming 32 syntax = "proto3"; package hellostreamingworld; service MultiGreeter { rpc sayHello (HelloRequest) returns (stream HelloReply) {} } message HelloRequest { string name = 1; string num_greetings = 2; } message HelloReply { string message = 1; }
  • 29. gRPC Considerations ▪ Contract-first ▪ Lots of code/test/document generation support ▪ API Gateway support ▪ Not at the level of OpenAPI (yet) ▪ Typically modeled with a procedural orientation ▪ Can be used in a constrained entity driven model ▪ Allow mapping to REST with “grpc-gateway” 36
  • 30. Mapping to REST with Annotations 37 syntax = "proto3"; import "google/api/annotations.proto"; message StringMessage { string value = 1; } service YourService { rpc Echo(StringMessage) returns (StringMessage) { option (google.api.http) = { post: "/v1/example/echo" body: "*" }; } }
  • 32. What About Asynchronous Communications? 39
  • 33. Traditionally – Do It Yourself ▪ Model the messages (how?) ▪ Publish the model (how?) ▪ Convey protocol decisions (how?) ▪ Manage versions (how?) 40
  • 34. AsyncAPI to the Rescue ▪ An attempt to standardize out-of-band conveying of data ▪ Like OpenAPI for asynchronous communication ▪ Does not assume any tech stack ▪ Bring your own protocol ▪ Bring your own schema ▪ Bring your own security mechanism ▪ The more standard it is, the more likely tools will support it ▪ Defines two operation types a service can support ▪ Publish ▪ Subscribe ▪ Code-First & Contract-First 41
  • 36. Warning – Here Be Dragons! 44
  • 37. Takeaways ▪ REST is more than HTTP APIs ▪ OpenAPI allows simplifying work with HTTP APIs ▪ OpenAPI assumes HTTP & JSON ▪ Does not coerce REST semantics ▪ GraphQL is an interesting alternative ▪ gRPC is a modern RPC-style framework ▪ AsyncAPI attempts to close the gap on asynchronous programming ▪ Still in pre-alpha state for most technologies/platforms 45
  • 38. Additional Resources ▪ Source code ▪ https://github.com/estiller/modern-era-apis ▪ Demo videos ▪ https://www.youtube.com/playlist?list=PLnimcNcOqCXizxqWEceI0IH3-bDpCJzkC ▪ Official Websites ▪ https://www.openapis.org/ ▪ https://grpc.io/ ▪ https://www.asyncapi.com/ ▪ Articles ▪ https://cloud.google.com/blog/products/api-management/understanding-grpc-openapi-and- rest-and-when-to-use-them ▪ https://medium.com/apis-and-digital-transformation/openapi-and-grpc-side-by-side- b6afb08f75ed ▪ https://www.freecodecamp.org/news/rest-is-the-new-soap-97ff6c09896d/ 46