SlideShare a Scribd company logo
Berlin, October 16-17 2018
Super charge your API’s with Reactive streams
Frank van der Linden
Full stack Developer
elstar IT
Social Connections 14 Berlin, October 16-17 2018
Me
• Freelance Full stack Java developer
• Owner of elstar IT
• Curious of new technology
• IBM Champion
Social Connections 14 Berlin, October 16-17 2018
How to proceed
•Introduction of Reactive programming
•Spring Boot and Webflux
•Build your first reactive API
•Demo and coding
Social Connections 14 Berlin, October 16-17 2018
Introduction of Reactive
programming
Social Connections 14 Berlin, October 16-17 2018
Reactive programming is programming with asynchronous data streams.
Social Connections 14 Berlin, October 16-17 2018
Blocking API calls
Social Connections 14 Berlin, October 16-17 2018
Blocking API calls
• Limited amount of requests
• Could cause wait time
• Useful for request dependencies
Social Connections 14 Berlin, October 16-17 2018
Non-Blocking API calls
Social Connections 14 Berlin, October 16-17 2018
Non-Blocking API calls
• (Almost) no limited requests
• Can process multiple requests
• Not knowing when response are returned
• Modern javascript frameworks rely on.
(Angular, React, VueJS)
Social Connections 14 Berlin, October 16-17 2018
Reactive manifesto
Social Connections 14 Berlin, October 16-17 2018
Reactive manifesto
• Responsive: a reactive system needs to handle
requests in a reasonable time
• Resilient: a reactive system must stay responsive in
the face of failures
• Elastic: a reactive system must stay responsive
under various loads
• Message driven: components from reactive systems
interacts using asynchronous message passing
Social Connections 14 Berlin, October 16-17 2018
Publish/Subscribe principle
• Loose coupling
• Scalability
• Non-blocking
Social Connections 14 Berlin, October 16-17 2018
Reactive frameworks
• Node.js
• RxJava and RxJS
• Webflux
• Lightbend (Akka)
• Vertx
Social Connections 14 Berlin, October 16-17 2018
Spring Boot and Webflux
Social Connections 14 Berlin, October 16-17 2018
First things first
Social Connections 14 Berlin, October 16-17 2018
Spring boot
• Open Source, coordinated by Pivotal
• Java based applications
• Auto configure as much as possible
• Built in metrics and health checks
• Very good documentation
Social Connections 14 Berlin, October 16-17 2018
Spring boot - component scan
• @Service, @Controller, @Repository and
more @Components will be scanned
• @Autowired will glue everything together
Social Connections 14 Berlin, October 16-17 2018
Spring boot - runs everywhere
• Embedded Tomcat makes it just run
• Runs on Docker
• Runs on Cloud Foundry, like IBM and PCF
• Tomcat can excluded, then it runs on
Websphere, Tomcat or WildFly
• Even on Domino, http://hasselba.ch/blog/?
p=2589
Social Connections 14 Berlin, October 16-17 2018
Spring Webflux
Social Connections 14 Berlin, October 16-17 2018
Spring Webflux
• Part of the Spring Framework
• Available since Spring 5.0
• Uses Netty as webserver instead of Tomcat
• Uses the Reactor project under the hood
Social Connections 14 Berlin, October 16-17 2018
Spring Webflux - important objects
• Mono, returns 0 or 1 object
• Flux, returns 0 or N objects
• WebClient, reactive version of http client
Social Connections 14 Berlin, October 16-17 2018
Spring Webflux - Mono example
Social Connections 14 Berlin, October 16-17 2018
Spring Webflux - Flux example
Social Connections 14 Berlin, October 16-17 2018
Spring Webflux - WebClient example
Social Connections 14 Berlin, October 16-17 2018
Build your first reactive API
Social Connections 14 Berlin, October 16-17 2018
Start your first reactive API
• Install Maven or Gradle
• Move to start.spring.io
• Fill in all the fields and select the dependencies
• Generate, download and open project in IDE
• Run ‘mvn clean install’ for all the dependencies
• Start coding
• Run application via ‘mvn spring-boot:run’
Social Connections 14 Berlin, October 16-17 2018
Spring Initializr
Social Connections 14 Berlin, October 16-17 2018
Project structure
• application.yaml =>
properties
• pom.xml =>
dependencies
Social Connections 14 Berlin, October 16-17 2018
Application properties
• port: on which the service is
available
• profiles: dev or prod
• can used in Java classes
• can also moved outside the
application
Social Connections 14 Berlin, October 16-17 2018
Repository
• Connect to MongoDb
• Auto config via property
• spring.data.mongodb.uri
Social Connections 14 Berlin, October 16-17 2018
Controller
• GET
• POST
• DELETE
• PATCH
Social Connections 14 Berlin, October 16-17 2018
Service
• Uses WebClient
• Connect to other
API’s
Social Connections 14 Berlin, October 16-17 2018
Secure the API
Social Connections 14 Berlin, October 16-17 2018
Swagger the API
Social Connections 14 Berlin, October 16-17 2018
Router
• NEW RouterFunction
• Can replace the
Controller
• Uses a Handler class to
get the data (Common
scenario)
Social Connections 14 Berlin, October 16-17 2018
Demo Application
Social Connections 14 Berlin, October 16-17 2018
Social Connections 14 Berlin, October 16-17 2018
Demo application
• Spring boot
• Spring Webflux
• MongoDb
• Angular 6
https://bitbucket.org/flinden68/reactive-streams-starter/src/develop/
Social Connections 14 Berlin, October 16-17 2018
‘Live coding’: Add new functionality step by step
• Backend
• Model: Suggestion
• Repository, to connect to MongoDb
• Controller, the endpoints
• Test via Swagger (http://localhost:10000/swagger-ui.html)
• Frontend
• Model: Suggestion
• Service: GET, POST and DELETE
• Component: Add new methods
• HTML: Add suggestion tab
• Check in browser: ng serve (http://localhost:4200/index.html)
• Bonus
• Handler: Support the suggestions routes
• Router: Move all the routes to 1 class to handle all the route requests
• Test via Postman
Social Connections 14 Berlin, October 16-17 2018
Questions
Asynchronous coordinated lifecycles
Chai Stofkoper
Social Connections 14 Berlin, October 16-17 2018
Resources
• Spring Initializr
• http://start.spring.io/
• Spring Webflux
• https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html
• Spring Boot
• https://projects.spring.io/spring-boot/
Social Connections 14 Berlin, October 16-17 2018
Resources
• Maven
• https://maven.apache.org/
• Gradle
• https://gradle.org/
• Reactive Streams Starter
• https://bitbucket.org/flinden68/reactive-streams-starter/src/develop/
Social Connections 14 Berlin, October 16-17 2018
Reach out to me
• @flinden68
• http://www.elstarit.nl
• flinden68@elstarit.nl
• https://nl.linkedin.com/in/flinden68

More Related Content

What's hot

Extending Piwik At R7.com
Extending Piwik At R7.comExtending Piwik At R7.com
Extending Piwik At R7.com
Leo Lorieri
 
August Flink Community Update
August Flink Community UpdateAugust Flink Community Update
August Flink Community Update
Robert Metzger
 
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Lucas Jellema
 
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...
Icinga
 
Intro to React
Intro to ReactIntro to React
Intro to React
Jamal Sinclair O'Garro
 
Rootconf 2017 - State of the Open Source monitoring landscape
Rootconf 2017 - State of the Open Source monitoring landscape Rootconf 2017 - State of the Open Source monitoring landscape
Rootconf 2017 - State of the Open Source monitoring landscape
NETWAYS
 
Scribe Online CDK & Connector Development
Scribe Online CDK & Connector DevelopmentScribe Online CDK & Connector Development
Scribe Online CDK & Connector Development
CloudFronts Technologies LLP.
 
Purely Functional Web Apps (Extended Version, 16.02.2016)
Purely Functional Web Apps (Extended Version, 16.02.2016)Purely Functional Web Apps (Extended Version, 16.02.2016)
Purely Functional Web Apps (Extended Version, 16.02.2016)
miciek
 
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Red Hat Developers
 
Function as a Service with Knative and riff
Function as a Service with Knative and riffFunction as a Service with Knative and riff
Function as a Service with Knative and riff
VMware Tanzu
 
Design Microservice Architectures the Right Way
Design Microservice Architectures the Right WayDesign Microservice Architectures the Right Way
Design Microservice Architectures the Right Way
C4Media
 
Mihai Tataran - Windows 8.1 for Developers
Mihai Tataran - Windows 8.1 for DevelopersMihai Tataran - Windows 8.1 for Developers
Mihai Tataran - Windows 8.1 for DevelopersITSpark Community
 
Exposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsExposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIs
WSO2
 
Google cloud functions
Google cloud functionsGoogle cloud functions
Google cloud functions
Péter Nagy
 
Implementing GraphQL API in Elixir – Victor Deryagin
Implementing GraphQL API in Elixir – Victor DeryaginImplementing GraphQL API in Elixir – Victor Deryagin
Implementing GraphQL API in Elixir – Victor Deryagin
Elixir Club
 
GlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices togetherGlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices together
Restlet
 
GraphQL
GraphQLGraphQL
Apache Bahir
Apache BahirApache Bahir
Apache Bahir
Mike Frampton
 
Building real time serverless back ends with aws appsync
Building real time serverless back ends with aws appsyncBuilding real time serverless back ends with aws appsync
Building real time serverless back ends with aws appsync
sterkje
 

What's hot (20)

Extending Piwik At R7.com
Extending Piwik At R7.comExtending Piwik At R7.com
Extending Piwik At R7.com
 
August Flink Community Update
August Flink Community UpdateAugust Flink Community Update
August Flink Community Update
 
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
Part 2 of the REAL Webinars on Oracle Cloud Native Application Development (J...
 
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...
Icinga Camp Berlin 2018 - Automated Monitoring of Proxmox VE with Icinga Dire...
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Rootconf 2017 - State of the Open Source monitoring landscape
Rootconf 2017 - State of the Open Source monitoring landscape Rootconf 2017 - State of the Open Source monitoring landscape
Rootconf 2017 - State of the Open Source monitoring landscape
 
Scribe Online CDK & Connector Development
Scribe Online CDK & Connector DevelopmentScribe Online CDK & Connector Development
Scribe Online CDK & Connector Development
 
Purely Functional Web Apps (Extended Version, 16.02.2016)
Purely Functional Web Apps (Extended Version, 16.02.2016)Purely Functional Web Apps (Extended Version, 16.02.2016)
Purely Functional Web Apps (Extended Version, 16.02.2016)
 
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
 
Web rtc summary
Web rtc summaryWeb rtc summary
Web rtc summary
 
Function as a Service with Knative and riff
Function as a Service with Knative and riffFunction as a Service with Knative and riff
Function as a Service with Knative and riff
 
Design Microservice Architectures the Right Way
Design Microservice Architectures the Right WayDesign Microservice Architectures the Right Way
Design Microservice Architectures the Right Way
 
Mihai Tataran - Windows 8.1 for Developers
Mihai Tataran - Windows 8.1 for DevelopersMihai Tataran - Windows 8.1 for Developers
Mihai Tataran - Windows 8.1 for Developers
 
Exposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIsExposing GraphQLs as Managed APIs
Exposing GraphQLs as Managed APIs
 
Google cloud functions
Google cloud functionsGoogle cloud functions
Google cloud functions
 
Implementing GraphQL API in Elixir – Victor Deryagin
Implementing GraphQL API in Elixir – Victor DeryaginImplementing GraphQL API in Elixir – Victor Deryagin
Implementing GraphQL API in Elixir – Victor Deryagin
 
GlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices togetherGlueCon 2015 - How REST APIs can glue all types of devices together
GlueCon 2015 - How REST APIs can glue all types of devices together
 
GraphQL
GraphQLGraphQL
GraphQL
 
Apache Bahir
Apache BahirApache Bahir
Apache Bahir
 
Building real time serverless back ends with aws appsync
Building real time serverless back ends with aws appsyncBuilding real time serverless back ends with aws appsync
Building real time serverless back ends with aws appsync
 

Similar to Social connections14: Super charge your API’s with Reactive streams

Developing IBM Connections Community Apps using Domino
Developing IBM Connections Community Apps using DominoDeveloping IBM Connections Community Apps using Domino
Developing IBM Connections Community Apps using Domino
LetsConnect
 
ICS INtegration with Node-RED and Open Source
ICS INtegration with Node-RED and Open SourceICS INtegration with Node-RED and Open Source
ICS INtegration with Node-RED and Open Source
LetsConnect
 
Social Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open SourceSocial Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open Source
Paul Withers
 
IBM Connections 6 Component Pack
IBM Connections 6 Component PackIBM Connections 6 Component Pack
IBM Connections 6 Component Pack
LetsConnect
 
Practical Application of API-First in microservices development
Practical Application of API-First in microservices developmentPractical Application of API-First in microservices development
Practical Application of API-First in microservices development
Chavdar Baikov
 
London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18
Phil Wilkins
 
A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019
Bill Doerrfeld
 
Api Testing
Api TestingApi Testing
Api Testing
Vishwanath KC
 
Api Testing
Api TestingApi Testing
Api Testing
Vishwanath KC
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with Kafka
Richard Gee
 
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
LetsConnect
 
API First
API FirstAPI First
API First
Kirsten Hunter
 
Introduction to Apigility
Introduction to ApigilityIntroduction to Apigility
Introduction to Apigility
Engineor
 
L7 firewall API for Neutron-FWaaS
L7 firewall API for Neutron-FWaaSL7 firewall API for Neutron-FWaaS
L7 firewall API for Neutron-FWaaS
nguyen phuong an
 
Crash Course in Cloud Computing
Crash Course in Cloud ComputingCrash Course in Cloud Computing
Crash Course in Cloud Computing
All Things Open
 
All Things Open : Crash Course in Open Source Cloud Computing
All Things Open : Crash Course in Open Source Cloud Computing All Things Open : Crash Course in Open Source Cloud Computing
All Things Open : Crash Course in Open Source Cloud Computing
Mark Hinkle
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17
Phil Wilkins
 
A (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantA (XPages) developers guide to Cloudant
A (XPages) developers guide to Cloudant
Frank van der Linden
 
InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...
InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...
InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...
InfluxData
 

Similar to Social connections14: Super charge your API’s with Reactive streams (20)

Developing IBM Connections Community Apps using Domino
Developing IBM Connections Community Apps using DominoDeveloping IBM Connections Community Apps using Domino
Developing IBM Connections Community Apps using Domino
 
ICS INtegration with Node-RED and Open Source
ICS INtegration with Node-RED and Open SourceICS INtegration with Node-RED and Open Source
ICS INtegration with Node-RED and Open Source
 
Social Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open SourceSocial Connections 14 - ICS Integration with Node-RED and Open Source
Social Connections 14 - ICS Integration with Node-RED and Open Source
 
IBM Connections 6 Component Pack
IBM Connections 6 Component PackIBM Connections 6 Component Pack
IBM Connections 6 Component Pack
 
Practical Application of API-First in microservices development
Practical Application of API-First in microservices developmentPractical Application of API-First in microservices development
Practical Application of API-First in microservices development
 
London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18
 
A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019A Snapshot of API Design Trends In 2019
A Snapshot of API Design Trends In 2019
 
APIs for mobile
APIs for mobileAPIs for mobile
APIs for mobile
 
Api Testing
Api TestingApi Testing
Api Testing
 
Api Testing
Api TestingApi Testing
Api Testing
 
Staying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with KafkaStaying on Topic - Invoke OpenFaaS functions with Kafka
Staying on Topic - Invoke OpenFaaS functions with Kafka
 
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
 
API First
API FirstAPI First
API First
 
Introduction to Apigility
Introduction to ApigilityIntroduction to Apigility
Introduction to Apigility
 
L7 firewall API for Neutron-FWaaS
L7 firewall API for Neutron-FWaaSL7 firewall API for Neutron-FWaaS
L7 firewall API for Neutron-FWaaS
 
Crash Course in Cloud Computing
Crash Course in Cloud ComputingCrash Course in Cloud Computing
Crash Course in Cloud Computing
 
All Things Open : Crash Course in Open Source Cloud Computing
All Things Open : Crash Course in Open Source Cloud Computing All Things Open : Crash Course in Open Source Cloud Computing
All Things Open : Crash Course in Open Source Cloud Computing
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17
 
A (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantA (XPages) developers guide to Cloudant
A (XPages) developers guide to Cloudant
 
InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...
InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...
InfluxDB Client Libraries and Applications by Ivan Kudibal, Engineering Manag...
 

More from Frank van der Linden

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
Frank van der Linden
 
Engage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingEngage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everything
Frank van der Linden
 
NCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streamsNCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streams
Frank van der Linden
 
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
Frank van der Linden
 
Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Frank van der Linden
 
Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...
Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...
Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...
Frank van der Linden
 
Spring forward: an introduction to Spring boot and Thymeleaf
Spring forward: an introduction to Spring boot and ThymeleafSpring forward: an introduction to Spring boot and Thymeleaf
Spring forward: an introduction to Spring boot and Thymeleaf
Frank van der Linden
 
DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real...
DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real...DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real...
DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real...
Frank van der Linden
 
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
Frank van der Linden
 
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
Frank van der Linden
 
Let's serve your data
Let's serve your dataLet's serve your data
Let's serve your data
Frank van der Linden
 
Let's server your Data
Let's server your DataLet's server your Data
Let's server your Data
Frank van der Linden
 
Don't worry with bower
Don't worry with bowerDon't worry with bower
Don't worry with bower
Frank van der Linden
 
Bccon use notes objects in memory and other useful
Bccon   use notes objects in memory and other usefulBccon   use notes objects in memory and other useful
Bccon use notes objects in memory and other useful
Frank van der Linden
 
Use notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages developmentUse notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages development
Frank van der Linden
 
An XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoAn XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on Domino
Frank van der Linden
 
The power of dots
The power of dotsThe power of dots
The power of dots
Frank van der Linden
 
Let me introduce you: DOTS
Let me introduce you: DOTSLet me introduce you: DOTS
Let me introduce you: DOTS
Frank van der Linden
 
Integrate domino designer with cvs source control
Integrate domino designer with cvs source controlIntegrate domino designer with cvs source control
Integrate domino designer with cvs source control
Frank van der Linden
 
how to connect your app to the activity stream with x-pages
how to connect your app to the activity stream with x-pageshow to connect your app to the activity stream with x-pages
how to connect your app to the activity stream with x-pages
Frank van der Linden
 

More from Frank van der Linden (20)

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Engage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingEngage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everything
 
NCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streamsNCUG 2019: Super charge your API’s with Reactive streams
NCUG 2019: Super charge your API’s with Reactive streams
 
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
NCUG 2019: Spring forward: an introduction to Spring boot and Thymeleaf for (...
 
Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...Engage 2019: The good, the bad and the ugly: a not so objective view on front...
Engage 2019: The good, the bad and the ugly: a not so objective view on front...
 
Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...
Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...
Icon UK 2018 - Spring forward: an introduction to Spring boot and Thymeleaf f...
 
Spring forward: an introduction to Spring boot and Thymeleaf
Spring forward: an introduction to Spring boot and ThymeleafSpring forward: an introduction to Spring boot and Thymeleaf
Spring forward: an introduction to Spring boot and Thymeleaf
 
DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real...
DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real...DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real...
DEV03 - How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Real...
 
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
Wcs-1785 How Watson, Bluemix, Cloudant and XPages can work together in a real...
 
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
 
Let's serve your data
Let's serve your dataLet's serve your data
Let's serve your data
 
Let's server your Data
Let's server your DataLet's server your Data
Let's server your Data
 
Don't worry with bower
Don't worry with bowerDon't worry with bower
Don't worry with bower
 
Bccon use notes objects in memory and other useful
Bccon   use notes objects in memory and other usefulBccon   use notes objects in memory and other useful
Bccon use notes objects in memory and other useful
 
Use notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages developmentUse notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages development
 
An XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoAn XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on Domino
 
The power of dots
The power of dotsThe power of dots
The power of dots
 
Let me introduce you: DOTS
Let me introduce you: DOTSLet me introduce you: DOTS
Let me introduce you: DOTS
 
Integrate domino designer with cvs source control
Integrate domino designer with cvs source controlIntegrate domino designer with cvs source control
Integrate domino designer with cvs source control
 
how to connect your app to the activity stream with x-pages
how to connect your app to the activity stream with x-pageshow to connect your app to the activity stream with x-pages
how to connect your app to the activity stream with x-pages
 

Recently uploaded

A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 

Recently uploaded (20)

A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 

Social connections14: Super charge your API’s with Reactive streams

  • 1. Berlin, October 16-17 2018 Super charge your API’s with Reactive streams Frank van der Linden Full stack Developer elstar IT
  • 2. Social Connections 14 Berlin, October 16-17 2018 Me • Freelance Full stack Java developer • Owner of elstar IT • Curious of new technology • IBM Champion
  • 3. Social Connections 14 Berlin, October 16-17 2018 How to proceed •Introduction of Reactive programming •Spring Boot and Webflux •Build your first reactive API •Demo and coding
  • 4. Social Connections 14 Berlin, October 16-17 2018 Introduction of Reactive programming
  • 5. Social Connections 14 Berlin, October 16-17 2018 Reactive programming is programming with asynchronous data streams.
  • 6. Social Connections 14 Berlin, October 16-17 2018 Blocking API calls
  • 7. Social Connections 14 Berlin, October 16-17 2018 Blocking API calls • Limited amount of requests • Could cause wait time • Useful for request dependencies
  • 8. Social Connections 14 Berlin, October 16-17 2018 Non-Blocking API calls
  • 9. Social Connections 14 Berlin, October 16-17 2018 Non-Blocking API calls • (Almost) no limited requests • Can process multiple requests • Not knowing when response are returned • Modern javascript frameworks rely on. (Angular, React, VueJS)
  • 10. Social Connections 14 Berlin, October 16-17 2018 Reactive manifesto
  • 11. Social Connections 14 Berlin, October 16-17 2018 Reactive manifesto • Responsive: a reactive system needs to handle requests in a reasonable time • Resilient: a reactive system must stay responsive in the face of failures • Elastic: a reactive system must stay responsive under various loads • Message driven: components from reactive systems interacts using asynchronous message passing
  • 12. Social Connections 14 Berlin, October 16-17 2018 Publish/Subscribe principle • Loose coupling • Scalability • Non-blocking
  • 13. Social Connections 14 Berlin, October 16-17 2018 Reactive frameworks • Node.js • RxJava and RxJS • Webflux • Lightbend (Akka) • Vertx
  • 14. Social Connections 14 Berlin, October 16-17 2018 Spring Boot and Webflux
  • 15. Social Connections 14 Berlin, October 16-17 2018 First things first
  • 16. Social Connections 14 Berlin, October 16-17 2018 Spring boot • Open Source, coordinated by Pivotal • Java based applications • Auto configure as much as possible • Built in metrics and health checks • Very good documentation
  • 17. Social Connections 14 Berlin, October 16-17 2018 Spring boot - component scan • @Service, @Controller, @Repository and more @Components will be scanned • @Autowired will glue everything together
  • 18. Social Connections 14 Berlin, October 16-17 2018 Spring boot - runs everywhere • Embedded Tomcat makes it just run • Runs on Docker • Runs on Cloud Foundry, like IBM and PCF • Tomcat can excluded, then it runs on Websphere, Tomcat or WildFly • Even on Domino, http://hasselba.ch/blog/? p=2589
  • 19. Social Connections 14 Berlin, October 16-17 2018 Spring Webflux
  • 20. Social Connections 14 Berlin, October 16-17 2018 Spring Webflux • Part of the Spring Framework • Available since Spring 5.0 • Uses Netty as webserver instead of Tomcat • Uses the Reactor project under the hood
  • 21. Social Connections 14 Berlin, October 16-17 2018 Spring Webflux - important objects • Mono, returns 0 or 1 object • Flux, returns 0 or N objects • WebClient, reactive version of http client
  • 22. Social Connections 14 Berlin, October 16-17 2018 Spring Webflux - Mono example
  • 23. Social Connections 14 Berlin, October 16-17 2018 Spring Webflux - Flux example
  • 24. Social Connections 14 Berlin, October 16-17 2018 Spring Webflux - WebClient example
  • 25. Social Connections 14 Berlin, October 16-17 2018 Build your first reactive API
  • 26. Social Connections 14 Berlin, October 16-17 2018 Start your first reactive API • Install Maven or Gradle • Move to start.spring.io • Fill in all the fields and select the dependencies • Generate, download and open project in IDE • Run ‘mvn clean install’ for all the dependencies • Start coding • Run application via ‘mvn spring-boot:run’
  • 27. Social Connections 14 Berlin, October 16-17 2018 Spring Initializr
  • 28. Social Connections 14 Berlin, October 16-17 2018 Project structure • application.yaml => properties • pom.xml => dependencies
  • 29. Social Connections 14 Berlin, October 16-17 2018 Application properties • port: on which the service is available • profiles: dev or prod • can used in Java classes • can also moved outside the application
  • 30. Social Connections 14 Berlin, October 16-17 2018 Repository • Connect to MongoDb • Auto config via property • spring.data.mongodb.uri
  • 31. Social Connections 14 Berlin, October 16-17 2018 Controller • GET • POST • DELETE • PATCH
  • 32. Social Connections 14 Berlin, October 16-17 2018 Service • Uses WebClient • Connect to other API’s
  • 33. Social Connections 14 Berlin, October 16-17 2018 Secure the API
  • 34. Social Connections 14 Berlin, October 16-17 2018 Swagger the API
  • 35. Social Connections 14 Berlin, October 16-17 2018 Router • NEW RouterFunction • Can replace the Controller • Uses a Handler class to get the data (Common scenario)
  • 36. Social Connections 14 Berlin, October 16-17 2018 Demo Application
  • 37. Social Connections 14 Berlin, October 16-17 2018
  • 38. Social Connections 14 Berlin, October 16-17 2018 Demo application • Spring boot • Spring Webflux • MongoDb • Angular 6 https://bitbucket.org/flinden68/reactive-streams-starter/src/develop/
  • 39. Social Connections 14 Berlin, October 16-17 2018 ‘Live coding’: Add new functionality step by step • Backend • Model: Suggestion • Repository, to connect to MongoDb • Controller, the endpoints • Test via Swagger (http://localhost:10000/swagger-ui.html) • Frontend • Model: Suggestion • Service: GET, POST and DELETE • Component: Add new methods • HTML: Add suggestion tab • Check in browser: ng serve (http://localhost:4200/index.html) • Bonus • Handler: Support the suggestions routes • Router: Move all the routes to 1 class to handle all the route requests • Test via Postman
  • 40. Social Connections 14 Berlin, October 16-17 2018 Questions Asynchronous coordinated lifecycles Chai Stofkoper
  • 41. Social Connections 14 Berlin, October 16-17 2018 Resources • Spring Initializr • http://start.spring.io/ • Spring Webflux • https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html • Spring Boot • https://projects.spring.io/spring-boot/
  • 42. Social Connections 14 Berlin, October 16-17 2018 Resources • Maven • https://maven.apache.org/ • Gradle • https://gradle.org/ • Reactive Streams Starter • https://bitbucket.org/flinden68/reactive-streams-starter/src/develop/
  • 43. Social Connections 14 Berlin, October 16-17 2018 Reach out to me • @flinden68 • http://www.elstarit.nl • flinden68@elstarit.nl • https://nl.linkedin.com/in/flinden68