SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Extending Piwik At R7.com
Extending Piwik At R7.comExtending Piwik At R7.com
Extending Piwik At R7.comLeo Lorieri
 
August Flink Community Update
August Flink Community UpdateAugust Flink Community Update
August Flink Community UpdateRobert 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
 
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
 
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 riffVMware Tanzu
 
Design Microservice Architectures the Right Way
Design Microservice Architectures the Right WayDesign Microservice Architectures the Right Way
Design Microservice Architectures the Right WayC4Media
 
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 APIsWSO2
 
Google cloud functions
Google cloud functionsGoogle cloud functions
Google cloud functionsPé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 DeryaginElixir 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 togetherRestlet
 
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 appsyncsterkje
 

Was ist angesagt? (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
 

Ähnlich wie 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 DominoLetsConnect
 
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 SourcePaul Withers
 
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 SourceLetsConnect
 
IBM Connections 6 Component Pack
IBM Connections 6 Component PackIBM Connections 6 Component Pack
IBM Connections 6 Component PackLetsConnect
 
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 developmentChavdar Baikov
 
London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18Phil 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 2019Bill Doerrfeld
 
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 KafkaRichard 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
 
Introduction to Apigility
Introduction to ApigilityIntroduction to Apigility
Introduction to ApigilityEngineor
 
L7 firewall API for Neutron-FWaaS
L7 firewall API for Neutron-FWaaSL7 firewall API for Neutron-FWaaS
L7 firewall API for Neutron-FWaaSnguyen phuong an
 
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
 
Crash Course in Cloud Computing
Crash Course in Cloud ComputingCrash Course in Cloud Computing
Crash Course in Cloud ComputingAll Things Open
 
OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17OracleDeveloperMeetup - London 19-12-17
OracleDeveloperMeetup - London 19-12-17Phil Wilkins
 
A (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantA (XPages) developers guide to Cloudant
A (XPages) developers guide to CloudantFrank 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
 

Ähnlich wie 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
 
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
 
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
 
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
 
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
 
Crash Course in Cloud Computing
Crash Course in Cloud ComputingCrash Course in Cloud Computing
Crash Course in 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...
 

Mehr von 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 UglyFrank 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 everythingFrank 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 streamsFrank 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 ThymeleafFrank 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
 
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 usefulFrank 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 developmentFrank 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 DominoFrank 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 controlFrank 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-pagesFrank van der Linden
 

Mehr von 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
 

Kürzlich hochgeladen

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Kürzlich hochgeladen (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

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