SlideShare a Scribd company logo
1 of 23
Download to read offline
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

Dataflow with Apache NiFi - Apache NiFi Meetup - 2016 Hadoop Summit - San Jose
Dataflow with Apache NiFi - Apache NiFi Meetup - 2016 Hadoop Summit - San JoseDataflow with Apache NiFi - Apache NiFi Meetup - 2016 Hadoop Summit - San Jose
Dataflow with Apache NiFi - Apache NiFi Meetup - 2016 Hadoop Summit - San JoseAldrin Piri
 
Api first design 개발의 선순환
Api first design 개발의 선순환Api first design 개발의 선순환
Api first design 개발의 선순환Jeong-gyu Kim
 
Change Data Feed in Delta
Change Data Feed in DeltaChange Data Feed in Delta
Change Data Feed in DeltaDatabricks
 
Care and Feeding of Catalyst Optimizer
Care and Feeding of Catalyst OptimizerCare and Feeding of Catalyst Optimizer
Care and Feeding of Catalyst OptimizerDatabricks
 
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)fisuda
 
(New)SQL on AWS: Aurora serverless
(New)SQL on AWS: Aurora serverless(New)SQL on AWS: Aurora serverless
(New)SQL on AWS: Aurora serverlessClaudio Pontili
 
State of the Trino Project
State of the Trino ProjectState of the Trino Project
State of the Trino ProjectMartin Traverso
 
第一回Web技術勉強会 efkスタック編
第一回Web技術勉強会 efkスタック編第一回Web技術勉強会 efkスタック編
第一回Web技術勉強会 efkスタック編tzm_freedom
 
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.3.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.3.0対応)FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.3.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.3.0対応)fisuda
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Railsrfischer20
 
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...Spark Summit
 
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroThe Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroDatabricks
 
SharePoint Online 「アクセス権」を理解する
SharePoint Online 「アクセス権」を理解するSharePoint Online 「アクセス権」を理解する
SharePoint Online 「アクセス権」を理解するKazuhiko Nakamura
 
Java EE 8新機能解説 -Bean Validation 2.0編-
Java EE 8新機能解説 -Bean Validation 2.0編-Java EE 8新機能解説 -Bean Validation 2.0編-
Java EE 8新機能解説 -Bean Validation 2.0編-Masatoshi Tada
 
RDB技術者のためのNoSQLガイド NoSQLの必要性と位置づけ
RDB技術者のためのNoSQLガイド NoSQLの必要性と位置づけRDB技術者のためのNoSQLガイド NoSQLの必要性と位置づけ
RDB技術者のためのNoSQLガイド NoSQLの必要性と位置づけRecruit Technologies
 
Introduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizerIntroduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizerMydbops
 

What's hot (20)

Dataflow with Apache NiFi - Apache NiFi Meetup - 2016 Hadoop Summit - San Jose
Dataflow with Apache NiFi - Apache NiFi Meetup - 2016 Hadoop Summit - San JoseDataflow with Apache NiFi - Apache NiFi Meetup - 2016 Hadoop Summit - San Jose
Dataflow with Apache NiFi - Apache NiFi Meetup - 2016 Hadoop Summit - San Jose
 
Api first design 개발의 선순환
Api first design 개발의 선순환Api first design 개발의 선순환
Api first design 개발의 선순환
 
Change Data Feed in Delta
Change Data Feed in DeltaChange Data Feed in Delta
Change Data Feed in Delta
 
Care and Feeding of Catalyst Optimizer
Care and Feeding of Catalyst OptimizerCare and Feeding of Catalyst Optimizer
Care and Feeding of Catalyst Optimizer
 
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.6.0対応)
 
(New)SQL on AWS: Aurora serverless
(New)SQL on AWS: Aurora serverless(New)SQL on AWS: Aurora serverless
(New)SQL on AWS: Aurora serverless
 
State of the Trino Project
State of the Trino ProjectState of the Trino Project
State of the Trino Project
 
第一回Web技術勉強会 efkスタック編
第一回Web技術勉強会 efkスタック編第一回Web技術勉強会 efkスタック編
第一回Web技術勉強会 efkスタック編
 
Fiware overview
Fiware overviewFiware overview
Fiware overview
 
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.3.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.3.0対応)FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.3.0対応)
FIWARE Orion Context Broker コンテキスト情報管理 (Orion 3.3.0対応)
 
Azure Bicep - An Introduction
Azure Bicep - An IntroductionAzure Bicep - An Introduction
Azure Bicep - An Introduction
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
JSON SchemaとPHP
JSON SchemaとPHPJSON SchemaとPHP
JSON SchemaとPHP
 
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
Building a Dataset Search Engine with Spark and Elasticsearch: Spark Summit E...
 
Log analysis with elastic stack
Log analysis with elastic stackLog analysis with elastic stack
Log analysis with elastic stack
 
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroThe Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
 
SharePoint Online 「アクセス権」を理解する
SharePoint Online 「アクセス権」を理解するSharePoint Online 「アクセス権」を理解する
SharePoint Online 「アクセス権」を理解する
 
Java EE 8新機能解説 -Bean Validation 2.0編-
Java EE 8新機能解説 -Bean Validation 2.0編-Java EE 8新機能解説 -Bean Validation 2.0編-
Java EE 8新機能解説 -Bean Validation 2.0編-
 
RDB技術者のためのNoSQLガイド NoSQLの必要性と位置づけ
RDB技術者のためのNoSQLガイド NoSQLの必要性と位置づけRDB技術者のためのNoSQLガイド NoSQLの必要性と位置づけ
RDB技術者のためのNoSQLガイド NoSQLの必要性と位置づけ
 
Introduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizerIntroduction to Mongodb execution plan and optimizer
Introduction to Mongodb execution plan and optimizer
 

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

Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...François-Guillaume Ribreau
 
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
 
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
 
Where is my scalable api?
Where is my scalable api?Where is my scalable api?
Where is my scalable api?Altoros
 
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUGCreando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUGCésar Hernández
 
There is REST and then there is "REST"
There is REST and then there is "REST"There is REST and then there is "REST"
There is REST and then there is "REST"Radovan Semancik
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScriptOleg Podsechin
 
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays
 
GraalVM and MicroProfile - A Polyglot Microservices Solution
GraalVM and MicroProfile - A Polyglot Microservices SolutionGraalVM and MicroProfile - A Polyglot Microservices Solution
GraalVM and MicroProfile - A Polyglot Microservices SolutionRoberto Cortez
 
Web Services and Android - OSSPAC 2009
Web Services and Android - OSSPAC 2009Web Services and Android - OSSPAC 2009
Web Services and Android - OSSPAC 2009sullis
 
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
 
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
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20Phil Wilkins
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersJavan Rasokat
 
Building REST APIs using gRPC and Go
Building REST APIs using gRPC and GoBuilding REST APIs using gRPC and Go
Building REST APIs using gRPC and GoAlvaro Viebrantz
 

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

Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...Choisir entre une API  RPC, SOAP, REST, GraphQL?  
Et si le problème était ai...
Choisir entre une API RPC, SOAP, REST, GraphQL? 
Et si le problème était ai...
 
Web Dev 21-01-2024.pptx
Web Dev 21-01-2024.pptxWeb Dev 21-01-2024.pptx
Web Dev 21-01-2024.pptx
 
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...
 
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
 
Where is my scalable api?
Where is my scalable api?Where is my scalable api?
Where is my scalable api?
 
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUGCreando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
Creando microservicios con Java, Microprofile y TomEE - Baranquilla JUG
 
There is REST and then there is "REST"
There is REST and then there is "REST"There is REST and then there is "REST"
There is REST and then there is "REST"
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
apidays LIVE Australia - Have your cake and eat it too: GraphQL? REST? Why no...
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
Switch to Backend 2023
Switch to Backend 2023Switch to Backend 2023
Switch to Backend 2023
 
GraalVM and MicroProfile - A Polyglot Microservices Solution
GraalVM and MicroProfile - A Polyglot Microservices SolutionGraalVM and MicroProfile - A Polyglot Microservices Solution
GraalVM and MicroProfile - A Polyglot Microservices Solution
 
Where is my scalable API?
Where is my scalable API?Where is my scalable API?
Where is my scalable API?
 
Web Services and Android - OSSPAC 2009
Web Services and Android - OSSPAC 2009Web Services and Android - OSSPAC 2009
Web Services and Android - OSSPAC 2009
 
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
 
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
 
Gohan
GohanGohan
Gohan
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
Building REST APIs using gRPC and Go
Building REST APIs using gRPC and GoBuilding REST APIs using gRPC and Go
Building REST APIs using gRPC and Go
 

Recently uploaded

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

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

  • 1. https://jhipster.tech @java_hipster Connect your JHipster apps to the world of APIs with OpenAPI and gRPC + +
  • 2. 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_
  • 3. https://jhipster.tech @java_hipster Evolution of SOA protocols RMI CORBA DCOM SOAP REST gRPC ? AVRO THRIFT XML-RPC GraphQL ?
  • 5. https://jhipster.tech @java_hipster Today, everybody does REST… Richardson maturity model
  • 6. 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
  • 7. 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
  • 9. 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); } }
  • 10. 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>
  • 11. https://jhipster.tech @java_hipster Why Swagger/OpenAPI ? REST No need for an IDL, with REST my API is dynamic and self-describing...
  • 12. https://jhipster.tech @java_hipster Why Swagger/OpenAPI ? REST But you’re not doing HATEOAS ! ...
  • 13. https://jhipster.tech @java_hipster Why Swagger/OpenAPI ? So let’s document our API with word/pdf/asciidoc/...
  • 14. 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
  • 15. 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
  • 16. 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
  • 17. 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
  • 18. 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.”
  • 19. 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)
  • 20. 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
  • 21. 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 ?
  • 23. 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