Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Developing reactive
Microservices with Quarkus
Niklas Heidloff
Developer Advocate, IBM
@nheidloff
Reactive Manifesto
Reactive Systems
Reactive Programming
Functional Programming
Asynchronous Programming
Reactive Streams
...
?
Reactive REST EndpointsReactive Web Application
Let’s make it concrete
#IBMDeveloper github.com/ibm/cloud-native-starter@n...
Reactive Web Application
Reactive REST Endpoints
Reactive Manifesto
Responsive
Message Driven
Elastic Resilient
#IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
Reactive Systems
!=
Reactive Programming
#IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
Reactive Programming is …
Reactive Programming is ‘unusual’
Reactive Programming is ‘unusual’
Reactive Programming is ‘unusual’
Javadoc to the Rescue?
Reactive programming is
extremely powerful, but
not the right tool for
all jobs!
#IBMDeveloper github.com/ibm/cloud-native...
Technologies to build reactive Applications
Quarkus
Vert.x
MicroProfile
Kubernetes
#IBMDeveloper github.com/ibm/cloud-nati...
Quarkus – Supersonic Subatomic Java
Quarkus using OpenJ9
“Optimizing Enterprise Java
for a Microservices
Architecture.“
“[...] by innovating [...] with a
goal of standardization.”...
“Eclipse Vert.x is a tool-kit for
building reactive applications
on the JVM.”
“Eclipse Vert.x is event
driven and non bloc...
“Kubernetes (K8s) is an open-
source system for automating
deployment, scaling, and
management of containerized
applicatio...
Example Application
Architecture
Web-App
KafkaWeb-API
Articles
Authors
Web-App
Postgres
Clients
Microservices Infrastructure Components
Kubern...
Reactive Web Application
Notifications for Web Applications
Web-App
KafkaWeb-API
Articles
Clients
Microservices Infrastructure Components
Kubernete...
MicroProfile Reactive Messaging
Web-App
KafkaWeb-API
Articles
Authors
Web-App
Postgres
Clients
Microservices Infrastructur...
MicroProfile Reactive Messaging
MicroProfile Reactive Messaging
Reactive Streams is an
initiative to provide a
standard for asynchronous
stream processing [...] aimed
at runtime environm...
MicroProfile Reactive Messaging
Subscriber
Publisher
Processor
Server Sent Events
Web-App
KafkaWeb-API
Articles
Authors
Web-App
Postgres
Clients
Microservices Infrastructure Components
...
Server Sent Events
Server Sent Events
Server Sent Events
Java JavaScript
Server Sent Events
Vert.x Event Bus
Web-App
KafkaWeb-API
Articles
Authors
Web-App
Postgres
Clients
Microservices Infrastructure Components
Ku...
@nheidloff
Clean Architecture
1. APIs
REST endpoints and messaging
2. Business
Logic of services and entities
3. Data
Acce...
Vert.x Event Bus
Business Layer
API Layer
Vert.x Event Bus
Vert.x Event Bus
Vert.x Event Bus
Kafka API
Web-App
KafkaWeb-API
Articles
Authors
Web-App
Postgres
Clients
Microservices Infrastructure Components
Kubernete...
Kafka API
Kafka API
Kafka API
Reactive REST Endpoints
Reactive REST Endpoint
Web-App
KafkaWeb-API
Articles
Authors
Web-App
Postgres
Clients
Microservices Infrastructure Compone...
Reactive REST Endpoint
Completion Stage
Completion Stage
Completion Stage and Completable Future
Completion Stage and Completable Future
Chained Completion Stages
Chained Completion Stages
Chained Completion Stages
Chained Completion Stages
Exception Handling with imperative Code
Exception Handling with reactive Code
Exception Handling with reactive Code
Exception Handling with reactive Code
Exception Handling with reactive Code
Exception Handling with reactive Code
Timeouts
Timeouts
Invoking REST APIs asynchronously
Web-App
KafkaWeb-API
Articles
Authors
Web-App
Postgres
Clients
Microservices Infrastruct...
MicroProfile Client
MicroProfile Client
MicroProfile Client
MicroProfile Client
MicroProfile Client
MicroProfile Client
Try out the end-to-end
microservices example
cloud-native-starter!
#IBMDeveloper github.com/ibm/cloud-native-starter@nheid...
Focus on Developer Experience
Several Kubernetes Environments
IBM Cloud Kubernetes Service including Istio and Knative
IBM Developer
developer.ibm.com
IBM Cloud Lite account
ibm.biz/nheidloff
IBM loves open source
Kubernetes
OpenJ9
MicroProf...
Reactive Microservices with Quarkus
Nächste SlideShare
Wird geladen in …5
×

Reactive Microservices with Quarkus

Reactive Microservices with Quarkus
#Kubernetes #Kafka #Java #CloudNative #MicroProfile

Code: https://github.com/IBM/cloud-native-starter/tree/master/reactive

  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

Reactive Microservices with Quarkus

  1. 1. Developing reactive Microservices with Quarkus Niklas Heidloff Developer Advocate, IBM @nheidloff
  2. 2. Reactive Manifesto Reactive Systems Reactive Programming Functional Programming Asynchronous Programming Reactive Streams Reactive Operators Buzzword Bingo #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  3. 3. ?
  4. 4. Reactive REST EndpointsReactive Web Application Let’s make it concrete #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  5. 5. Reactive Web Application
  6. 6. Reactive REST Endpoints
  7. 7. Reactive Manifesto Responsive Message Driven Elastic Resilient #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  8. 8. Reactive Systems != Reactive Programming #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  9. 9. Reactive Programming is …
  10. 10. Reactive Programming is ‘unusual’
  11. 11. Reactive Programming is ‘unusual’
  12. 12. Reactive Programming is ‘unusual’
  13. 13. Javadoc to the Rescue?
  14. 14. Reactive programming is extremely powerful, but not the right tool for all jobs! #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  15. 15. Technologies to build reactive Applications Quarkus Vert.x MicroProfile Kubernetes #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  16. 16. Quarkus – Supersonic Subatomic Java
  17. 17. Quarkus using OpenJ9
  18. 18. “Optimizing Enterprise Java for a Microservices Architecture.“ “[...] by innovating [...] with a goal of standardization.” microprofile.io #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  19. 19. “Eclipse Vert.x is a tool-kit for building reactive applications on the JVM.” “Eclipse Vert.x is event driven and non blocking [...] and lets your app scale with minimal hardware.” vertx.io #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  20. 20. “Kubernetes (K8s) is an open- source system for automating deployment, scaling, and management of containerized applications.” kubernetes.io #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  21. 21. Example Application
  22. 22. Architecture Web-App KafkaWeb-API Articles Authors Web-App Postgres Clients Microservices Infrastructure Components Kubernetes API Client
  23. 23. Reactive Web Application
  24. 24. Notifications for Web Applications Web-App KafkaWeb-API Articles Clients Microservices Infrastructure Components Kubernetes API Client 1. 4. 3. 2. Web-App Postgres Authors
  25. 25. MicroProfile Reactive Messaging Web-App KafkaWeb-API Articles Authors Web-App Postgres Clients Microservices Infrastructure Components Kubernetes API Client
  26. 26. MicroProfile Reactive Messaging
  27. 27. MicroProfile Reactive Messaging
  28. 28. Reactive Streams is an initiative to provide a standard for asynchronous stream processing [...] aimed at runtime environments (JVM and JavaScript).” reactive-streams.org #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff Components: 1. Subscriber 2. Publisher 3. Processor Java: • JDK9: java.util.concurrent.Flow • MicroProfile: org.reactivestreams
  29. 29. MicroProfile Reactive Messaging Subscriber Publisher Processor
  30. 30. Server Sent Events Web-App KafkaWeb-API Articles Authors Web-App Postgres Clients Microservices Infrastructure Components Kubernetes API Client
  31. 31. Server Sent Events
  32. 32. Server Sent Events
  33. 33. Server Sent Events Java JavaScript
  34. 34. Server Sent Events
  35. 35. Vert.x Event Bus Web-App KafkaWeb-API Articles Authors Web-App Postgres Clients Microservices Infrastructure Components Kubernetes API Client
  36. 36. @nheidloff Clean Architecture 1. APIs REST endpoints and messaging 2. Business Logic of services and entities 3. Data Access to databases or other services
  37. 37. Vert.x Event Bus Business Layer API Layer
  38. 38. Vert.x Event Bus
  39. 39. Vert.x Event Bus
  40. 40. Vert.x Event Bus
  41. 41. Kafka API Web-App KafkaWeb-API Articles Authors Web-App Postgres Clients Microservices Infrastructure Components Kubernetes API Client
  42. 42. Kafka API
  43. 43. Kafka API
  44. 44. Kafka API
  45. 45. Reactive REST Endpoints
  46. 46. Reactive REST Endpoint Web-App KafkaWeb-API Articles Authors Web-App Postgres Clients Microservices Infrastructure Components Kubernetes API Client
  47. 47. Reactive REST Endpoint
  48. 48. Completion Stage
  49. 49. Completion Stage
  50. 50. Completion Stage and Completable Future
  51. 51. Completion Stage and Completable Future
  52. 52. Chained Completion Stages
  53. 53. Chained Completion Stages
  54. 54. Chained Completion Stages
  55. 55. Chained Completion Stages
  56. 56. Exception Handling with imperative Code
  57. 57. Exception Handling with reactive Code
  58. 58. Exception Handling with reactive Code
  59. 59. Exception Handling with reactive Code
  60. 60. Exception Handling with reactive Code
  61. 61. Exception Handling with reactive Code
  62. 62. Timeouts
  63. 63. Timeouts
  64. 64. Invoking REST APIs asynchronously Web-App KafkaWeb-API Articles Authors Web-App Postgres Clients Microservices Infrastructure Components Kubernetes API Client
  65. 65. MicroProfile Client
  66. 66. MicroProfile Client
  67. 67. MicroProfile Client
  68. 68. MicroProfile Client
  69. 69. MicroProfile Client
  70. 70. MicroProfile Client
  71. 71. Try out the end-to-end microservices example cloud-native-starter! #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  72. 72. Focus on Developer Experience
  73. 73. Several Kubernetes Environments
  74. 74. IBM Cloud Kubernetes Service including Istio and Knative
  75. 75. IBM Developer developer.ibm.com IBM Cloud Lite account ibm.biz/nheidloff IBM loves open source Kubernetes OpenJ9 MicroProfile Quarkus Reactive systems improve user experiences and are more efficient Summary Get the code à @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter

×