SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
OpenAPI and gRPC Side-by-Side
Tim Burks
Google, Inc.
I love APIs.
I’m talking about Networked APIs.
Application Programming Interfaces that operate across a
network of computers. They communicate using network
protocols including HTTP, and are frequently produced by
different organizations than the ones that consume them.
Google API Design Guide: Glossary
The OpenAPI Specification
Industry standard format for describing REST APIs.
Originally designed for documentation, now with many other applications: API
authoring, validation, documentation, analysis, search, testing, mocking,
management, code generation.
OpenAPI is owned by the Linux Foundation
OpenAPI Adoption
gRPC
Open-Source messaging system based on Google’s internal API architecture.
Used for code and documentation generation, API management, and support
services for APIs and microservices running at very large scale.
gRPC is owned by the Cloud Native Computing Foundation
gRPC Adoption
Microservices: in data centres
Streaming telemetry from network devices
Client Server communication/Internal APIs
Mobile Apps
What is an API methodology?
What is an API methodology?
A collection of tools and practices for building
and using networked services.
in depth
OpenAPI
API Description Language
JSON/YAML-based description format
● Easy for humans to read and write.
● Easy to import into most programming languages.
● Can be tedious in strongly-typed languages.
OpenAPI
API Transport Mechanism
HTTP/REST
OpenAPI
Data Representation Format
JSON (and more)
OpenAPI
Code Generation
● swagger-codegen (Open source, Smartbear + community)
○ 70+ targets
○ First commit: July 6, 2011
○ Used by Lyft and Square to generate SDKs
● AutoRest (Open source, Microsoft)
● oas-nodegen (Open source, Capital One)
● APIMatic (Proprietary, APIMatic)
more?
swagger-codegen often isn’t used “out of the box”:
“Generating client libraries involves customizing the provided language-specific
templates…
The amount of modification each template needs varies by language and we’re
looking forward to working with the Swagger Codegen community to share our
refinements.” Val Polouchkine, Lyft
“...Swagger Codegen is a pretty active project. If you don’t check in your
templates, things are gonna break unexpectedly because Swagger Codegen just
uses the latest and greatest templates that are out there. So if you don’t sort of
manually make sure that those things work, you’re gonna have an issue there.”
Tristan Sokol, Square
Monolithic code generators are hard.
● Long build times: changing one target requires rebuilding everything.
● Long test times: new builds must be tested for every target language.
● For stability, teams may prefer to archive their own generator builds.
● Forks will abound.
● Quality is uneven.
● Versioning is hard.
● Complexity and potentially unfamiliar build systems deter contributors.
Meet developers where they are.
in depth
gRPC
Transport Mechanism
Client → Server
Server → Client
Initial
Metadata
MsgMsg
End of
Stream
Status & Trailing
Metadata
Initial
Metadata
MsgMsg Msg
HTTP/2
gRPC
Data Representation Format
Protocol Buffers, streams of bytes in a simple format:
[field_number<<3 + wire_type] [length if necessary] [data]...
$ hexdump /tmp/request.bin
0000000 0a 05 68 65 6c 6c 6f
0a is “0000 1010”, so
field_number = 1 and wire_type = 2
gRPC
API Description Format
package echo;
message EchoRequest {
string text = 1;
}
message EchoResponse {
string text = 1;
}
service Echo {
rpc Get(EchoRequest) returns (EchoResponse) {}
rpc Update(stream EchoRequest) returns (stream EchoResponse) {}
}
gRPC
Code Generation
$ protoc echo.proto -o echo.out --swift_out=.
$ which protoc-gen-swift
../bin/protoc-gen-swift
$ more echo.pb.swift
// DO NOT EDIT.
//
// Generated by the Swift generator plugin...
// Source: echo.proto
...
Why does protoc have a plug-in architecture?
● Fast build times: changing one target only requires rebuilding its plugin.
● Fast test times: new builds need only be tested for the affected targets.
● For stability, teams can archive their own protoc and plugin builds.
● New plugins can abound.
● Separately-maintained plugins can offer different maturity levels.
● Separately-maintained plugins can be appropriately versioned.
● Separately-maintained plugins can be in languages that contributors
prefer.
Cross-Language Interoperability
Java
Service
Python
Service
GoLang
Service
C++
Service
gRPC
Service
gRPC
Stub
gRPC
Stub
gRPC
Stub
gRPC
Stub
gRPC
Service
gRPC
Service
gRPC
Service
gRPC
Stub
Build a gRPC service, get a free REST API!
Highest performance and quality.
Meet developers
where they are.
Highest performance
and quality.
Improve OpenAPI with strongly typed
representations, high-quality code
generation, and commitment to
methodology.
Improve gRPC with dynamic modeling,
lighter-weight infrastructure, and
simpler tooling.
HOW YOU CAN HELP
1. Stop writing interface code by hand.
2. Stop writing interface code by hand.
3. Stop writing interface code by hand.
4. Mind your API methodology.
5. Develop and use API style guides.
6. Use OpenAPI or gRPC.
LF_APIStrat17_OpenAPI and gRPC Side-by-Side

Weitere ähnliche Inhalte

Was ist angesagt?

TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done rightWekoslav Stefanovski
 
A Skeptic's Guide to Docker
A Skeptic's Guide to DockerA Skeptic's Guide to Docker
A Skeptic's Guide to DockerTori Wieldt
 
Infrastrucutre as Code
Infrastrucutre as CodeInfrastrucutre as Code
Infrastrucutre as CodeHarmeet Singh
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applicationsRoman Podoliaka
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot FrameworkCarl Su
 
How to Work Efficiently in a Hybrid Git-Perforce Environment
How to Work Efficiently in a Hybrid Git-Perforce EnvironmentHow to Work Efficiently in a Hybrid Git-Perforce Environment
How to Work Efficiently in a Hybrid Git-Perforce EnvironmentPerforce
 
Kotlin for Android
Kotlin for AndroidKotlin for Android
Kotlin for AndroidHan Yin
 
Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6...
Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6...Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6...
Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6...Puppet
 
Typescript kata The TDD style 2 edition
Typescript kata The TDD style 2 editionTypescript kata The TDD style 2 edition
Typescript kata The TDD style 2 editionRonnie Hegelund
 
Demo : Twitter Sentiment Analysis on Kubernetes using Kafka, MongoDB with Ope...
Demo : Twitter Sentiment Analysis on Kubernetes using Kafka, MongoDB with Ope...Demo : Twitter Sentiment Analysis on Kubernetes using Kafka, MongoDB with Ope...
Demo : Twitter Sentiment Analysis on Kubernetes using Kafka, MongoDB with Ope...Karan Singh
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013dotCloud
 
Golang from Scala developer’s perspective
Golang from Scala developer’s perspectiveGolang from Scala developer’s perspective
Golang from Scala developer’s perspectiveSveta Bozhko
 
DevOps Transformation in Technical
DevOps Transformation in TechnicalDevOps Transformation in Technical
DevOps Transformation in TechnicalOpsta
 

Was ist angesagt? (20)

Git essentials
Git essentialsGit essentials
Git essentials
 
TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done right
 
gRPC with java
gRPC with javagRPC with java
gRPC with java
 
A Skeptic's Guide to Docker
A Skeptic's Guide to DockerA Skeptic's Guide to Docker
A Skeptic's Guide to Docker
 
Infrastrucutre as Code
Infrastrucutre as CodeInfrastrucutre as Code
Infrastrucutre as Code
 
Report portal
Report portalReport portal
Report portal
 
Hidden Dragons of CGO
Hidden Dragons of CGOHidden Dragons of CGO
Hidden Dragons of CGO
 
Slides
SlidesSlides
Slides
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applications
 
Introduction to Robot Framework
Introduction to Robot FrameworkIntroduction to Robot Framework
Introduction to Robot Framework
 
How to Work Efficiently in a Hybrid Git-Perforce Environment
How to Work Efficiently in a Hybrid Git-Perforce EnvironmentHow to Work Efficiently in a Hybrid Git-Perforce Environment
How to Work Efficiently in a Hybrid Git-Perforce Environment
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Kotlin for Android
Kotlin for AndroidKotlin for Android
Kotlin for Android
 
Jenkins : Pipeline As Code
Jenkins : Pipeline As CodeJenkins : Pipeline As Code
Jenkins : Pipeline As Code
 
Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6...
Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6...Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6...
Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6...
 
Typescript kata The TDD style 2 edition
Typescript kata The TDD style 2 editionTypescript kata The TDD style 2 edition
Typescript kata The TDD style 2 edition
 
Demo : Twitter Sentiment Analysis on Kubernetes using Kafka, MongoDB with Ope...
Demo : Twitter Sentiment Analysis on Kubernetes using Kafka, MongoDB with Ope...Demo : Twitter Sentiment Analysis on Kubernetes using Kafka, MongoDB with Ope...
Demo : Twitter Sentiment Analysis on Kubernetes using Kafka, MongoDB with Ope...
 
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013Lightweight Virtualization with Linux Containers and Docker | YaC 2013
Lightweight Virtualization with Linux Containers and Docker | YaC 2013
 
Golang from Scala developer’s perspective
Golang from Scala developer’s perspectiveGolang from Scala developer’s perspective
Golang from Scala developer’s perspective
 
DevOps Transformation in Technical
DevOps Transformation in TechnicalDevOps Transformation in Technical
DevOps Transformation in Technical
 

Ähnlich wie LF_APIStrat17_OpenAPI and gRPC Side-by-Side

Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCTim Burks
 
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
 
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
 
Enforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationTim Burks
 
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
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsTim Burks
 
Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18Jorge Morales
 
Build your next REST API with gRPC
Build your next REST API with gRPCBuild your next REST API with gRPC
Build your next REST API with gRPCTim Burks
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?Niklas Heidloff
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2Linaro
 
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
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18Xiaoli Liang
 
Unit testing of spark applications
Unit testing of spark applicationsUnit testing of spark applications
Unit testing of spark applicationsKnoldus Inc.
 
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachJDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachPROIDEA
 
APIdays Paris 2014 - The State of Web API Languages
APIdays Paris 2014 - The State of Web API LanguagesAPIdays Paris 2014 - The State of Web API Languages
APIdays Paris 2014 - The State of Web API LanguagesRestlet
 
What do you need to know about g rpc on .net
What do you need to know about g rpc on .net What do you need to know about g rpc on .net
What do you need to know about g rpc on .net Moon Technolabs Pvt. Ltd.
 
Geoscience and Microservices
Geoscience and Microservices Geoscience and Microservices
Geoscience and Microservices Matthew Gerring
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 

Ähnlich wie LF_APIStrat17_OpenAPI and gRPC Side-by-Side (20)

Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
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...
 
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)
 
Enforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code GenerationEnforcing API Design Rules for High Quality Code Generation
Enforcing API Design Rules for High Quality Code Generation
 
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
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
 
Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18
 
Build your next REST API with gRPC
Build your next REST API with gRPCBuild your next REST API with gRPC
Build your next REST API with gRPC
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
 
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...
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18
 
Babel.pptx
Babel.pptxBabel.pptx
Babel.pptx
 
Cloud Native API Design and Management
Cloud Native API Design and ManagementCloud Native API Design and Management
Cloud Native API Design and Management
 
Unit testing of spark applications
Unit testing of spark applicationsUnit testing of spark applications
Unit testing of spark applications
 
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav TulachJDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
JDD2015: Towards the Fastest (J)VM on the Planet! - Jaroslav Tulach
 
APIdays Paris 2014 - The State of Web API Languages
APIdays Paris 2014 - The State of Web API LanguagesAPIdays Paris 2014 - The State of Web API Languages
APIdays Paris 2014 - The State of Web API Languages
 
What do you need to know about g rpc on .net
What do you need to know about g rpc on .net What do you need to know about g rpc on .net
What do you need to know about g rpc on .net
 
Geoscience and Microservices
Geoscience and Microservices Geoscience and Microservices
Geoscience and Microservices
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 

Mehr von LF_APIStrat

LF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat17_OWASP’s Latest Category: API UnderprotectionLF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat17_OWASP’s Latest Category: API UnderprotectionLF_APIStrat
 
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...LF_APIStrat
 
LF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat17_Super-Powered REST API TestingLF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat17_Super-Powered REST API TestingLF_APIStrat
 
LF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat17_How Mature are You? A Developer Experience Maturity ModelLF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat17_How Mature are You? A Developer Experience Maturity ModelLF_APIStrat
 
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...LF_APIStrat
 
LF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat17_Things I Wish People Told Me About Writing DocsLF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat17_Things I Wish People Told Me About Writing DocsLF_APIStrat
 
LF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat17_Lifting Legacy to the Cloud on API BoostersLF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat17_Lifting Legacy to the Cloud on API BoostersLF_APIStrat
 
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...LF_APIStrat
 
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat
 
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience TeamLF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience TeamLF_APIStrat
 
LF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat17_API Marketing: First Comes Usability, then DiscoverabilityLF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat17_API Marketing: First Comes Usability, then DiscoverabilityLF_APIStrat
 
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...LF_APIStrat
 
LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions LF_APIStrat
 
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...LF_APIStrat
 
LF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat17_Case Study: Cold Decision TreesLF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat17_Case Study: Cold Decision TreesLF_APIStrat
 
LF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In OrderLF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In OrderLF_APIStrat
 
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...LF_APIStrat
 
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...LF_APIStrat
 
LF_APIStrat17_Open Data vs. the World
LF_APIStrat17_Open Data vs. the World LF_APIStrat17_Open Data vs. the World
LF_APIStrat17_Open Data vs. the World LF_APIStrat
 
LF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat17_Practical DevSecOps for APIsLF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat17_Practical DevSecOps for APIsLF_APIStrat
 

Mehr von LF_APIStrat (20)

LF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat17_OWASP’s Latest Category: API UnderprotectionLF_APIStrat17_OWASP’s Latest Category: API Underprotection
LF_APIStrat17_OWASP’s Latest Category: API Underprotection
 
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
LF_APIStrat17_Creating Communication Applications using the Asterisk RESTFul ...
 
LF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat17_Super-Powered REST API TestingLF_APIStrat17_Super-Powered REST API Testing
LF_APIStrat17_Super-Powered REST API Testing
 
LF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat17_How Mature are You? A Developer Experience Maturity ModelLF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
LF_APIStrat17_How Mature are You? A Developer Experience Maturity Model
 
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
LF_APIStrat17_Connect Your RESTful API to Hundreds of Others in Minutes (Zapi...
 
LF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat17_Things I Wish People Told Me About Writing DocsLF_APIStrat17_Things I Wish People Told Me About Writing Docs
LF_APIStrat17_Things I Wish People Told Me About Writing Docs
 
LF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat17_Lifting Legacy to the Cloud on API BoostersLF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
LF_APIStrat17_Lifting Legacy to the Cloud on API Boosters
 
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
LF_APIStrat17_Contract-first API Development: A Case Study in Parallel API Pu...
 
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your DocumentationLF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
LF_APIStrat17_Don't Repeat Yourself - Your API is Your Documentation
 
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience TeamLF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
LF_APIStrat17_How We Doubled the Velocity of Our Developer Experience Team
 
LF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat17_API Marketing: First Comes Usability, then DiscoverabilityLF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
LF_APIStrat17_API Marketing: First Comes Usability, then Discoverability
 
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
LF_APIStrat17_Standing Taller with Technology: APIs, IoT, and the Digital Wor...
 
LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions LF_APIStrat17_REST API Microversions
LF_APIStrat17_REST API Microversions
 
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
LF_APIStrat17_I Believe You But My Enterprise Don't: Adopting Open Standards ...
 
LF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat17_Case Study: Cold Decision TreesLF_APIStrat17_Case Study: Cold Decision Trees
LF_APIStrat17_Case Study: Cold Decision Trees
 
LF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In OrderLF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In Order
 
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
LF_APIStrat17_Diving Deep into the API Ocean with Open Source Deep Learning T...
 
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
LF_APIStrat17_Supporting SDKs in 7 Different Programming Languages While Main...
 
LF_APIStrat17_Open Data vs. the World
LF_APIStrat17_Open Data vs. the World LF_APIStrat17_Open Data vs. the World
LF_APIStrat17_Open Data vs. the World
 
LF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat17_Practical DevSecOps for APIsLF_APIStrat17_Practical DevSecOps for APIs
LF_APIStrat17_Practical DevSecOps for APIs
 

Kürzlich hochgeladen

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

LF_APIStrat17_OpenAPI and gRPC Side-by-Side

  • 1. OpenAPI and gRPC Side-by-Side Tim Burks Google, Inc.
  • 3. I’m talking about Networked APIs. Application Programming Interfaces that operate across a network of computers. They communicate using network protocols including HTTP, and are frequently produced by different organizations than the ones that consume them. Google API Design Guide: Glossary
  • 4. The OpenAPI Specification Industry standard format for describing REST APIs. Originally designed for documentation, now with many other applications: API authoring, validation, documentation, analysis, search, testing, mocking, management, code generation.
  • 5. OpenAPI is owned by the Linux Foundation
  • 7. gRPC Open-Source messaging system based on Google’s internal API architecture. Used for code and documentation generation, API management, and support services for APIs and microservices running at very large scale.
  • 8. gRPC is owned by the Cloud Native Computing Foundation
  • 9. gRPC Adoption Microservices: in data centres Streaming telemetry from network devices Client Server communication/Internal APIs Mobile Apps
  • 10. What is an API methodology?
  • 11. What is an API methodology? A collection of tools and practices for building and using networked services.
  • 13. OpenAPI API Description Language JSON/YAML-based description format ● Easy for humans to read and write. ● Easy to import into most programming languages. ● Can be tedious in strongly-typed languages.
  • 16. OpenAPI Code Generation ● swagger-codegen (Open source, Smartbear + community) ○ 70+ targets ○ First commit: July 6, 2011 ○ Used by Lyft and Square to generate SDKs ● AutoRest (Open source, Microsoft) ● oas-nodegen (Open source, Capital One) ● APIMatic (Proprietary, APIMatic) more?
  • 17. swagger-codegen often isn’t used “out of the box”: “Generating client libraries involves customizing the provided language-specific templates… The amount of modification each template needs varies by language and we’re looking forward to working with the Swagger Codegen community to share our refinements.” Val Polouchkine, Lyft “...Swagger Codegen is a pretty active project. If you don’t check in your templates, things are gonna break unexpectedly because Swagger Codegen just uses the latest and greatest templates that are out there. So if you don’t sort of manually make sure that those things work, you’re gonna have an issue there.” Tristan Sokol, Square
  • 18. Monolithic code generators are hard. ● Long build times: changing one target requires rebuilding everything. ● Long test times: new builds must be tested for every target language. ● For stability, teams may prefer to archive their own generator builds. ● Forks will abound. ● Quality is uneven. ● Versioning is hard. ● Complexity and potentially unfamiliar build systems deter contributors.
  • 21. gRPC Transport Mechanism Client → Server Server → Client Initial Metadata MsgMsg End of Stream Status & Trailing Metadata Initial Metadata MsgMsg Msg HTTP/2
  • 22. gRPC Data Representation Format Protocol Buffers, streams of bytes in a simple format: [field_number<<3 + wire_type] [length if necessary] [data]... $ hexdump /tmp/request.bin 0000000 0a 05 68 65 6c 6c 6f 0a is “0000 1010”, so field_number = 1 and wire_type = 2
  • 23. gRPC API Description Format package echo; message EchoRequest { string text = 1; } message EchoResponse { string text = 1; } service Echo { rpc Get(EchoRequest) returns (EchoResponse) {} rpc Update(stream EchoRequest) returns (stream EchoResponse) {} }
  • 24. gRPC Code Generation $ protoc echo.proto -o echo.out --swift_out=. $ which protoc-gen-swift ../bin/protoc-gen-swift $ more echo.pb.swift // DO NOT EDIT. // // Generated by the Swift generator plugin... // Source: echo.proto ...
  • 25. Why does protoc have a plug-in architecture? ● Fast build times: changing one target only requires rebuilding its plugin. ● Fast test times: new builds need only be tested for the affected targets. ● For stability, teams can archive their own protoc and plugin builds. ● New plugins can abound. ● Separately-maintained plugins can offer different maturity levels. ● Separately-maintained plugins can be appropriately versioned. ● Separately-maintained plugins can be in languages that contributors prefer.
  • 26.
  • 28. Build a gRPC service, get a free REST API!
  • 30. Meet developers where they are. Highest performance and quality.
  • 31. Improve OpenAPI with strongly typed representations, high-quality code generation, and commitment to methodology.
  • 32. Improve gRPC with dynamic modeling, lighter-weight infrastructure, and simpler tooling.
  • 33. HOW YOU CAN HELP
  • 34. 1. Stop writing interface code by hand.
  • 35. 2. Stop writing interface code by hand.
  • 36. 3. Stop writing interface code by hand.
  • 37. 4. Mind your API methodology.
  • 38. 5. Develop and use API style guides.
  • 39. 6. Use OpenAPI or gRPC.