SlideShare a Scribd company logo
9
Most read
21
Most read
22
Most read
https://jhipster.tech @java_hipster
Connect your JHipster apps to the
world of APIs with OpenAPI and gRPC
+ +
https://jhipster.tech @java_hipster
Le me
● Working at Engie (but soon CDiscount)
● JHipster core team member
● Swagger-codegen former core team
member
● OpenAPI-generator core team member @cbornet_
https://jhipster.tech @java_hipster
Evolution of SOA protocols
RMI
CORBA
DCOM SOAP
REST
gRPC ?
AVRO
THRIFT
XML-RPC GraphQL ?
https://jhipster.tech @java_hipster
Today, everybody does REST...
https://jhipster.tech @java_hipster
Today, everybody does REST…
Richardson maturity model
https://jhipster.tech @java_hipster
Today, everybody does REST…
Roy Fielding : HATEOAS*
is a pre-condition to REST
*HATEOAS: Hypermedia As The Engine Of Application State
https://jhipster.tech @java_hipster
Today, everybody does REST… or not
In practice, this is the state
of the art, including
JHipster
“I am getting frustrated by the number of people calling any HTTP-based
interface a REST API.” - Roy Fielding
https://jhipster.tech @java_hipster
Why Swagger/OpenAPI ?
https://jhipster.tech @java_hipster
Why Swagger/OpenAPI ?
CORBA-IDL
module BankDemo
{
typedef float CashAmount;
typedef string AccountId;
interface Account
{
readonly attribute AccountId account_id;
readonly attribute CashAmount balance;
void withdraw(in CashAmount amount) raises (InsufficientFunds);
void deposit(in CashAmount amount);
}
}
https://jhipster.tech @java_hipster
Why Swagger/OpenAPI ?
SOAP’s WSDL
<definitions name = "HelloService"
targetNamespace = "http://www.examples.com/wsdl/HelloService.wsdl"
xmlns = "http://schemas.xmlsoap.org/wsdl/"
xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns = "http://www.examples.com/wsdl/HelloService.wsdl"
xmlns:xsd = "http://www.w3.org/2001/XMLSchema" >
<message name = "SayHelloRequest" >
<part name = "firstName" type = "xsd:string" />
</message>
<message name = "SayHelloResponse" >
<part name = "greeting" type = "xsd:string" />
</message>
<portType name = "Hello_PortType" >
<operation name = "sayHello" >
<input message = "tns:SayHelloRequest" />
<output message = "tns:SayHelloResponse" />
</operation>
</portType>
<binding name = "Hello_Binding" type = "tns:Hello_PortType" >
<soap:binding style = "rpc"
transport = "http://schemas.xmlsoap.org/soap/http" />
<operation name = "sayHello" >
<soap:operation soapAction = "sayHello" />
<input>
<soap:body
encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"
namespace = "urn:examples:helloservice"
use = "encoded" />
</input>
<output>
<soap:body
encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"
namespace = "urn:examples:helloservice"
use = "encoded" />
</output>
</operation>
</binding>
<service name = "Hello_Service" >
<documentation> WSDL File for HelloService </documentation>
<port binding = "tns:Hello_Binding" name = "Hello_Port" >
<soap:address
location = "http://www.examples.com/SayHello/" />
</port>
</service>
</definitions>
https://jhipster.tech @java_hipster
Why Swagger/OpenAPI ?
REST
No need for an IDL, with
REST my API is dynamic
and self-describing...
https://jhipster.tech @java_hipster
Why Swagger/OpenAPI ?
REST
But you’re not doing HATEOAS !
...
https://jhipster.tech @java_hipster
Why Swagger/OpenAPI ?
So let’s document our API
with word/pdf/asciidoc/...
https://jhipster.tech @java_hipster
Why Swagger/OpenAPI ?
So let’s document our API
with excel/pdf/asciidoc/...
- Tedious to write
- Hard to find
- Inaccurate, errors, not
up-to-date
- Lots of boilerplate code to
write by hand from reading
the doc
https://jhipster.tech @java_hipster
From code to doc : springfox + swagger-ui
- No additional work
- Doc in sync with the code
- No errors (except in case of
Springfox bug)
- Easy to find
https://jhipster.tech @java_hipster
From doc to client SDK
● OpenAPI-generator (previously swagger-codegen)
○ generate client SDK in 50+ languages/libraries
○ supports Swagger v2.0 and OpenAPI v3.0
○ SDK for Spring-Cloud FeignClient
● Module generator-jhipster-swagger-cli
○ Module that wraps Openapi-generator to generate back-end clients in
JHipster
○ Next step : support React and AngularX front-end client
https://jhipster.tech @java_hipster
API-first development
● Write the OpenAPI spec first then generate server stub
code from it
○ early review feedback from peers and client developers (with PRs)
○ clear separation of WHAT vs. HOW
○ single source of truth
○ infrastructure tooling
● JHipster’s “API-First” option
○ configures the openapi-generator-maven-plugin to generate interfaces at
compile time from the OAI spec
○ supports OAI spec v3.0
https://jhipster.tech @java_hipster
gRPC
“gRPC is a modern open source high performance RPC framework that
can run in any environment. It can efficiently connect services in and
across data centers with pluggable support for load balancing, tracing,
health checking and authentication.”
https://jhipster.tech @java_hipster
gRPC vs HTTP-JSON
● API centered
● Built for performance
● Protobuf
○ binary format
○ strongly typed
● IDL built-in
● Strongly typed
● HTTP/2 by default
● 10+ languages
● Service discovery, load balancing, fault
tolerance, monitoring, tracing integrated
● Resource centered
● Built for simplicity
● JSON
○ text format
○ weakly typed
● IDL optional (OpenAPI)
● Weakly typed
● HTTP/2 optional
● All languages
● Service discovery, load balancing, fault
tolerance, monitoring, tracing with the
good framework (Netflix/Spring Cloud)
https://jhipster.tech @java_hipster
gRPC other nice features
● Bidirectional streaming
● Deadline propagation
● Cancellation propagation
● Async non-blocking / reactive JAVA implementation
● Flow Control (pull type with back-pressure) at the wire level (beware of OOME
!!)
● Reactive-gRPC extension
○ https://github.com/salesforce/reactive-grpc by Salesforce
○ Wraps gRPC’s reactive type into Reactor’s Mono/Flux types
○ Passes the Reactive-Streams TCK
https://jhipster.tech @java_hipster
gRPC in JHipster
● generator-jhipster-grpc module
○ actuator endpoints
○ entities
○ your own grpc services
○ uses reactive-grpc lib
● Next steps
○ integrate with the future JH “reactive” option for end-to-end reactive
services from gRPC client to DB.
○ finish security config
○ production features (service discovery, LB, tracing, …)
○ integration of gRPC-web ?
https://jhipster.tech @java_hipster
Questions ?
https://github.com/cbornet/generator-jhipster-swagger-cli
https://github.com/cbornet/generator-jhipster-grpc
https://github.com/OpenAPITools/openapi-generator
https://github.com/salesforce/reactive-grpc
https://jhipster.tech @java_hipster
More information on JHipster
Main website https://jhipster.tech
GitHub https://github.com/jhipster/generator-jhipster
Twitter https://twitter.com/java_hipster
Stack Overflow https://stackoverflow.com/questions/tagged/jhipster?sort=newest

More Related Content

What's hot (15)

PPTX
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.5.0対応)
fisuda
 
PPTX
哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌
Tun-Yu Chang
 
PPTX
FIWARE Context Information Management
fisuda
 
PDF
Data persistency (draco, cygnus, sth comet, quantum leap)
Fernando Lopez Aguilar
 
PPTX
FIWARE Wednesday Webinars - How to Design DataModels
FIWARE
 
PPTX
FIWARE implementation of IDS concepts
fisuda
 
PPTX
5.(2주제 절삭가공) 구체적으로 추진하는 원가절감 수법
topshock
 
PPTX
アプリケーション開発者のためのAzure Databricks入門
Yoichi Kawasaki
 
PPTX
Windows Server Community Meetup #4:時刻の話 - Accurate Network Time -
wind06106
 
PDF
Case Study Lufthansa Technik
JohnTileyITQ
 
PDF
db tech showcase 2019 SQL Database Hyperscale 徹底分析 - 最新アーキテクチャの特徴を理解する
Masayuki Ozawa
 
PPTX
Did AMPAT Heroes Fund actually donate to disabled veterans?
jgavron
 
PPTX
FIWARE: Managing Context Information at large scale
Fermin Galan
 
PDF
Integrating Fiware Orion, Keyrock and Wilma
Dalton Valadares
 
PDF
Hyperledger Aries 101
LFDT Tokyo Meetup
 
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.5.0対応)
fisuda
 
哥寫的不是程式,是軟體 - 從嵌入式系統看軟體工程全貌
Tun-Yu Chang
 
FIWARE Context Information Management
fisuda
 
Data persistency (draco, cygnus, sth comet, quantum leap)
Fernando Lopez Aguilar
 
FIWARE Wednesday Webinars - How to Design DataModels
FIWARE
 
FIWARE implementation of IDS concepts
fisuda
 
5.(2주제 절삭가공) 구체적으로 추진하는 원가절감 수법
topshock
 
アプリケーション開発者のためのAzure Databricks入門
Yoichi Kawasaki
 
Windows Server Community Meetup #4:時刻の話 - Accurate Network Time -
wind06106
 
Case Study Lufthansa Technik
JohnTileyITQ
 
db tech showcase 2019 SQL Database Hyperscale 徹底分析 - 最新アーキテクチャの特徴を理解する
Masayuki Ozawa
 
Did AMPAT Heroes Fund actually donate to disabled veterans?
jgavron
 
FIWARE: Managing Context Information at large scale
Fermin Galan
 
Integrating Fiware Orion, Keyrock and Wilma
Dalton Valadares
 
Hyperledger Aries 101
LFDT Tokyo Meetup
 

Similar to JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with OpenAPI and gRPC (20)

PPTX
SVQdotNET: Building APIs with OpenApi
Juan Luis Guerrero Minero
 
PDF
Cloud Native API Design and Management
AllBits BVBA (freelancer)
 
PPTX
Communication Protocols And Web Services
Omer Katz
 
PDF
CASCON 2017 - OpenAPI v3
Arthur De Magalhaes
 
PDF
Building REST APIs using gRPC and Go
Alvaro Viebrantz
 
PPTX
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Jackson F. de A. Mafra
 
PDF
Rest web service
Hamid Ghorbani
 
PPTX
Scaling with swagger
Tony Tam
 
PDF
Building sustainable RESTFul services
Ortus Solutions, Corp
 
PDF
Presentation at the 2016 Linux Foundation Collab Summit
Open API Initiative (OAI)
 
PPTX
The Right Kind of API – How To Choose Appropriate API Protocols and Data Form...
Nordic APIs
 
PDF
Boost Your Content Strategy for REST APIs
Marta Rauch
 
PDF
Test-Driven Documentation for your REST(ful) service
Jeroen Reijn
 
PPTX
The Swagger Format becomes the Open API Specification: Standardizing descript...
3scale
 
PDF
OpenAPI and gRPC Side by-Side
Tim Burks
 
PDF
LF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat
 
PPTX
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
Ted Epstein
 
PDF
JHipster Beyond CRUD - JHipster Conf' 2019
Intesys
 
PDF
REST API Doc Best Practices
Marta Rauch
 
PDF
Session 8 Android Web Services - Part 1.pdf
EngmohammedAlzared
 
SVQdotNET: Building APIs with OpenApi
Juan Luis Guerrero Minero
 
Cloud Native API Design and Management
AllBits BVBA (freelancer)
 
Communication Protocols And Web Services
Omer Katz
 
CASCON 2017 - OpenAPI v3
Arthur De Magalhaes
 
Building REST APIs using gRPC and Go
Alvaro Viebrantz
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Jackson F. de A. Mafra
 
Rest web service
Hamid Ghorbani
 
Scaling with swagger
Tony Tam
 
Building sustainable RESTFul services
Ortus Solutions, Corp
 
Presentation at the 2016 Linux Foundation Collab Summit
Open API Initiative (OAI)
 
The Right Kind of API – How To Choose Appropriate API Protocols and Data Form...
Nordic APIs
 
Boost Your Content Strategy for REST APIs
Marta Rauch
 
Test-Driven Documentation for your REST(ful) service
Jeroen Reijn
 
The Swagger Format becomes the Open API Specification: Standardizing descript...
3scale
 
OpenAPI and gRPC Side by-Side
Tim Burks
 
LF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat
 
OpenAPI v.Next - Events, Alternative Schemas & the Road Ahead
Ted Epstein
 
JHipster Beyond CRUD - JHipster Conf' 2019
Intesys
 
REST API Doc Best Practices
Marta Rauch
 
Session 8 Android Web Services - Part 1.pdf
EngmohammedAlzared
 
Ad

Recently uploaded (20)

PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Ad

JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with OpenAPI and gRPC