SlideShare a Scribd company logo
1 of 12
Vert.x – Event Driven Non Blocking Reactive Toolkit
Brian S Paskin, Senior Application Architect, R&D Services, IBM Cloud Innovations Lab
6 April 2020
WebSphere Liberty Lunch and Learn
Introduction
2
 Vert.x is an open source project by the Eclipse Foundation
 Is a reactive toolkit that can used as a serverless implementation or in an application
 Used for writing asynchronous network applications
 Supported under multiple Java based languages (polyglot)
– Java, Kotlin, JavaScript, Groovy, Ruby, Scala
 Has two programming methods, with or without Verticles (spelled that way)
 There are different libraries for databases, monitoring, logging, et cetera
 Non blocking and event driven that is scalable using an Event Bus
– Uses an Event Loop to process requests
– Event Bus to handle communications between Verticles
– Can span multiple JVMs and systems
 Can be used with Quarkus and GraalVM
 Requires Maven Shade to create a fat jar
Introduction
3
Event Loop
4
 Implementation of the multi Reactor design pattern
– Continuously checking for new events and pass it to the proper Handler
– Normal Reactor is single threaded, but Vert.x is multi-threaded
 Number of threads for the Event Loop depends on the number of processors
– Is equal to 2 * number of processors
– Not based on the number of Verticles deployed
– Threads are assigned in a round robin method for Verticles
 Verticles will always execute on the assigned thread
 Worker Verticles have their own thread pools
 The Context is passed to the Verticle from the Event Loop
– All Handlers in an Event Loop run using the same Context
– Each Context has its own error handler
– Maintains thread safety
 Never block the event loop
Event Loop, Contexts, and Verticles
5
Verticles
6
 A Verticle is a unit of deployment
 Assigned a Thread in an Event Loop
 Each Verticle has an isolated classloader and cannot share global state
 Verticles can be passed configuration information
 2 Different Types of Verticles
– Standard
– Workers
 A standard Verticle should be quick and a non blocking unit of work
 A worker Verticle is like a standard Verticle but using a different Thread pool
– Can call blocking code
– Used for limiting number of executions of code (ie. calling backend system)
 Can be run in high available mode
– Deploys new Verticle if it dies abruptly
Event Bus
7
 The Event Bus is used for Verticles to communicate with each other by sending messages
– Single instance per Vert.x instance
– Asynchronous
 Can be used with Verticles in the same JVM or across multiple JVMs and systems
– Outside of a single JVM Hazelcast is used to transport messages
 Can be used to communicate with JavaScript
 Three types of messaging
– Publish and subscribe
– Point to point
– Request – response
 Failures in all or part of the Event Bus may lead to lost messages
Introduction
8
Common Libraries Highlights
9
 Core
– Deploy Verticles
– HTTP Server
– Basic Event Bus
– Logging
– JSON and Parser
– Datagrams
– Metrics
– High availability and failover
– Timer events
– Buffers
 Web
– Route requests to Handlers and sub routers
– Routing based on criteria (HTTP Method, MIME type, etc.)
– Authentication (OAuth, Basic)
– Serve web pages
– CORS
– Uploads
– Cookie Handling
– Form handling
– Virtual hosts
– SockJS support
Common Libraries Highlights
10
 Configuration
– Multiple formats (JSON, Properties, YAML, HOCON, System Props, Environment Entries, etc.)
– Can read default configuration file or specify file
– Different configurations can be passed to different Verticles
 JDBC Client
 MongoDB Client
 SQL Common
– Used in conjunction of one of the other data access libraries
 Reactive
– Uses RxJava
 Circuit Breaks for Micro Services
 MQTT
 Kafka Client
 Mail Client
More information
11
 Sample code on GitHub
 Libraries
 Build a starter application
Vert.x Event Driven Non Blocking Reactive Toolkit

More Related Content

What's hot

차세대 데이터센터 네트워크 전략
차세대 데이터센터 네트워크 전략차세대 데이터센터 네트워크 전략
차세대 데이터센터 네트워크 전략Woo Hyung Choi
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewRené Cannaò
 
Disk Performance Comparison Xen v.s. KVM
Disk Performance Comparison Xen v.s. KVMDisk Performance Comparison Xen v.s. KVM
Disk Performance Comparison Xen v.s. KVMnknytk
 
Metro Cluster High Availability or SRM Disaster Recovery?
Metro Cluster High Availability or SRM Disaster Recovery?Metro Cluster High Availability or SRM Disaster Recovery?
Metro Cluster High Availability or SRM Disaster Recovery?David Pasek
 
Formation JAVA/J2EE
Formation JAVA/J2EEFormation JAVA/J2EE
Formation JAVA/J2EEInes Ouaz
 
Cv Moez HAMZAOUI JAVA J2EE FULL STACK
Cv Moez HAMZAOUI JAVA J2EE FULL STACKCv Moez HAMZAOUI JAVA J2EE FULL STACK
Cv Moez HAMZAOUI JAVA J2EE FULL STACKMoez Hamzaoui
 
Building a High-Performance Distributed Task Queue on MongoDB
Building a High-Performance Distributed Task Queue on MongoDBBuilding a High-Performance Distributed Task Queue on MongoDB
Building a High-Performance Distributed Task Queue on MongoDBMongoDB
 
Les 10 erreurs fatales à ne pas commettre lors de la conception d'une base de...
Les 10 erreurs fatales à ne pas commettre lors de la conception d'une base de...Les 10 erreurs fatales à ne pas commettre lors de la conception d'une base de...
Les 10 erreurs fatales à ne pas commettre lors de la conception d'une base de...promocic
 
Tester unitairement une application java
Tester unitairement une application javaTester unitairement une application java
Tester unitairement une application javaAntoine Rey
 
Percona server for MySQL 제품 소개
Percona server for MySQL 제품 소개Percona server for MySQL 제품 소개
Percona server for MySQL 제품 소개NeoClova
 
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화OpenStack Korea Community
 
Spring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsSpring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsJulien Wittouck
 
cours j2ee -présentation
cours  j2ee -présentationcours  j2ee -présentation
cours j2ee -présentationYassine Badri
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosKeith Hollman
 

What's hot (20)

차세대 데이터센터 네트워크 전략
차세대 데이터센터 네트워크 전략차세대 데이터센터 네트워크 전략
차세대 데이터센터 네트워크 전략
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management Overview
 
Disk Performance Comparison Xen v.s. KVM
Disk Performance Comparison Xen v.s. KVMDisk Performance Comparison Xen v.s. KVM
Disk Performance Comparison Xen v.s. KVM
 
Oracle query optimizer
Oracle query optimizerOracle query optimizer
Oracle query optimizer
 
Metro Cluster High Availability or SRM Disaster Recovery?
Metro Cluster High Availability or SRM Disaster Recovery?Metro Cluster High Availability or SRM Disaster Recovery?
Metro Cluster High Availability or SRM Disaster Recovery?
 
Formation JAVA/J2EE
Formation JAVA/J2EEFormation JAVA/J2EE
Formation JAVA/J2EE
 
Support POO Java Deuxième Partie
Support POO Java Deuxième PartieSupport POO Java Deuxième Partie
Support POO Java Deuxième Partie
 
Cv Moez HAMZAOUI JAVA J2EE FULL STACK
Cv Moez HAMZAOUI JAVA J2EE FULL STACKCv Moez HAMZAOUI JAVA J2EE FULL STACK
Cv Moez HAMZAOUI JAVA J2EE FULL STACK
 
Lecture9
Lecture9Lecture9
Lecture9
 
Building a High-Performance Distributed Task Queue on MongoDB
Building a High-Performance Distributed Task Queue on MongoDBBuilding a High-Performance Distributed Task Queue on MongoDB
Building a High-Performance Distributed Task Queue on MongoDB
 
Servlets et JSP
Servlets et JSPServlets et JSP
Servlets et JSP
 
Les 10 erreurs fatales à ne pas commettre lors de la conception d'une base de...
Les 10 erreurs fatales à ne pas commettre lors de la conception d'une base de...Les 10 erreurs fatales à ne pas commettre lors de la conception d'une base de...
Les 10 erreurs fatales à ne pas commettre lors de la conception d'une base de...
 
Tester unitairement une application java
Tester unitairement une application javaTester unitairement une application java
Tester unitairement une application java
 
Percona server for MySQL 제품 소개
Percona server for MySQL 제품 소개Percona server for MySQL 제품 소개
Percona server for MySQL 제품 소개
 
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
[OpenStack Days Korea 2016] Track1 - All flash CEPH 구성 및 최적화
 
Spring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsSpring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'ts
 
Hypervisors
HypervisorsHypervisors
Hypervisors
 
cours j2ee -présentation
cours  j2ee -présentationcours  j2ee -présentation
cours j2ee -présentation
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR Scenarios
 
Presentation cassandra
Presentation cassandraPresentation cassandra
Presentation cassandra
 

Similar to Vert.x Event Driven Non Blocking Reactive Toolkit

Vert.x - Tehran JUG meeting Aug-2014 - Saeed Zarinfam
Vert.x - Tehran JUG meeting Aug-2014 - Saeed ZarinfamVert.x - Tehran JUG meeting Aug-2014 - Saeed Zarinfam
Vert.x - Tehran JUG meeting Aug-2014 - Saeed ZarinfamSaeed Zarinfam
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On ConcurrencyWill Gage
 
Introduction to Kafka and Zookeeper
Introduction to Kafka and ZookeeperIntroduction to Kafka and Zookeeper
Introduction to Kafka and ZookeeperRahul Jain
 
Openstack devops challenges a journey from dump baremetal to functional ope...
Openstack devops challenges   a journey from dump baremetal to functional ope...Openstack devops challenges   a journey from dump baremetal to functional ope...
Openstack devops challenges a journey from dump baremetal to functional ope...Harish Kumar
 
Cloud 2010
Cloud 2010Cloud 2010
Cloud 2010steccami
 
Getting Started with Apache CloudStack
Getting Started with Apache CloudStackGetting Started with Apache CloudStack
Getting Started with Apache CloudStackJoe Brockmeier
 
Vert.x keynote for EclipseCon 2013
Vert.x keynote for EclipseCon 2013Vert.x keynote for EclipseCon 2013
Vert.x keynote for EclipseCon 2013timfox111
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On ConcurrencyRodney Barlow
 
Kafka and ibm event streams basics
Kafka and ibm event streams basicsKafka and ibm event streams basics
Kafka and ibm event streams basicsBrian S. Paskin
 
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...GeeksLab Odessa
 
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015Belmiro Moreira
 
CloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWestCloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWestke4qqq
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetesNagaraj Shenoy
 
Actor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseActor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseAlexander Lukyanchikov
 

Similar to Vert.x Event Driven Non Blocking Reactive Toolkit (20)

Vert.x - Tehran JUG meeting Aug-2014 - Saeed Zarinfam
Vert.x - Tehran JUG meeting Aug-2014 - Saeed ZarinfamVert.x - Tehran JUG meeting Aug-2014 - Saeed Zarinfam
Vert.x - Tehran JUG meeting Aug-2014 - Saeed Zarinfam
 
Vertx
VertxVertx
Vertx
 
Vertx
VertxVertx
Vertx
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Txlf2012
Txlf2012Txlf2012
Txlf2012
 
Introduction to Kafka and Zookeeper
Introduction to Kafka and ZookeeperIntroduction to Kafka and Zookeeper
Introduction to Kafka and Zookeeper
 
Openstack devops challenges a journey from dump baremetal to functional ope...
Openstack devops challenges   a journey from dump baremetal to functional ope...Openstack devops challenges   a journey from dump baremetal to functional ope...
Openstack devops challenges a journey from dump baremetal to functional ope...
 
Cloud 2010
Cloud 2010Cloud 2010
Cloud 2010
 
Getting Started with Apache CloudStack
Getting Started with Apache CloudStackGetting Started with Apache CloudStack
Getting Started with Apache CloudStack
 
Vert.x devoxx london 2013
Vert.x devoxx london 2013Vert.x devoxx london 2013
Vert.x devoxx london 2013
 
Vert.x keynote for EclipseCon 2013
Vert.x keynote for EclipseCon 2013Vert.x keynote for EclipseCon 2013
Vert.x keynote for EclipseCon 2013
 
Java servlets
Java servletsJava servlets
Java servlets
 
Shopzilla On Concurrency
Shopzilla On ConcurrencyShopzilla On Concurrency
Shopzilla On Concurrency
 
Kafka and ibm event streams basics
Kafka and ibm event streams basicsKafka and ibm event streams basics
Kafka and ibm event streams basics
 
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
 
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
Tips Tricks and Tactics with Cells and Scaling OpenStack - May, 2015
 
Chapter 6 os
Chapter 6 osChapter 6 os
Chapter 6 os
 
CloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWestCloudStack - LinuxFest NorthWest
CloudStack - LinuxFest NorthWest
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetes
 
Actor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java EnterpriseActor-based concurrency in a modern Java Enterprise
Actor-based concurrency in a modern Java Enterprise
 

Recently uploaded

Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 

Recently uploaded (20)

Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls KolkataVIP Call Girls Kolkata Ananya 🤌  8250192130 🚀 Vip Call Girls Kolkata
VIP Call Girls Kolkata Ananya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 

Vert.x Event Driven Non Blocking Reactive Toolkit

  • 1. Vert.x – Event Driven Non Blocking Reactive Toolkit Brian S Paskin, Senior Application Architect, R&D Services, IBM Cloud Innovations Lab 6 April 2020 WebSphere Liberty Lunch and Learn
  • 2. Introduction 2  Vert.x is an open source project by the Eclipse Foundation  Is a reactive toolkit that can used as a serverless implementation or in an application  Used for writing asynchronous network applications  Supported under multiple Java based languages (polyglot) – Java, Kotlin, JavaScript, Groovy, Ruby, Scala  Has two programming methods, with or without Verticles (spelled that way)  There are different libraries for databases, monitoring, logging, et cetera  Non blocking and event driven that is scalable using an Event Bus – Uses an Event Loop to process requests – Event Bus to handle communications between Verticles – Can span multiple JVMs and systems  Can be used with Quarkus and GraalVM  Requires Maven Shade to create a fat jar
  • 4. Event Loop 4  Implementation of the multi Reactor design pattern – Continuously checking for new events and pass it to the proper Handler – Normal Reactor is single threaded, but Vert.x is multi-threaded  Number of threads for the Event Loop depends on the number of processors – Is equal to 2 * number of processors – Not based on the number of Verticles deployed – Threads are assigned in a round robin method for Verticles  Verticles will always execute on the assigned thread  Worker Verticles have their own thread pools  The Context is passed to the Verticle from the Event Loop – All Handlers in an Event Loop run using the same Context – Each Context has its own error handler – Maintains thread safety  Never block the event loop
  • 5. Event Loop, Contexts, and Verticles 5
  • 6. Verticles 6  A Verticle is a unit of deployment  Assigned a Thread in an Event Loop  Each Verticle has an isolated classloader and cannot share global state  Verticles can be passed configuration information  2 Different Types of Verticles – Standard – Workers  A standard Verticle should be quick and a non blocking unit of work  A worker Verticle is like a standard Verticle but using a different Thread pool – Can call blocking code – Used for limiting number of executions of code (ie. calling backend system)  Can be run in high available mode – Deploys new Verticle if it dies abruptly
  • 7. Event Bus 7  The Event Bus is used for Verticles to communicate with each other by sending messages – Single instance per Vert.x instance – Asynchronous  Can be used with Verticles in the same JVM or across multiple JVMs and systems – Outside of a single JVM Hazelcast is used to transport messages  Can be used to communicate with JavaScript  Three types of messaging – Publish and subscribe – Point to point – Request – response  Failures in all or part of the Event Bus may lead to lost messages
  • 9. Common Libraries Highlights 9  Core – Deploy Verticles – HTTP Server – Basic Event Bus – Logging – JSON and Parser – Datagrams – Metrics – High availability and failover – Timer events – Buffers  Web – Route requests to Handlers and sub routers – Routing based on criteria (HTTP Method, MIME type, etc.) – Authentication (OAuth, Basic) – Serve web pages – CORS – Uploads – Cookie Handling – Form handling – Virtual hosts – SockJS support
  • 10. Common Libraries Highlights 10  Configuration – Multiple formats (JSON, Properties, YAML, HOCON, System Props, Environment Entries, etc.) – Can read default configuration file or specify file – Different configurations can be passed to different Verticles  JDBC Client  MongoDB Client  SQL Common – Used in conjunction of one of the other data access libraries  Reactive – Uses RxJava  Circuit Breaks for Micro Services  MQTT  Kafka Client  Mail Client
  • 11. More information 11  Sample code on GitHub  Libraries  Build a starter application

Editor's Notes

  1. Serverless implementation – an App Server/Transaction processor is not needed. SpringBoot is serverless. Reactive programming is a programming paradigm, associated with asynchronous streams, which respond to any changes or events. Vert.x uses an event bus, to communicate with different parts of the application and passes events, asynchronously to handlers when they available. a verticle is a unit of deployment Vert.x does not follow the JEE / Jakarta EE standards Uses Netty and Hazelcast under the covers Need Maven Shade to create a fat jar.
  2. https://medium.com/@alexey.soshin/understanding-vert-x-event-loop-46373115fb3e https://vertx.io/blog/an-introduction-to-the-vert-x-context-object/ https://vertx.io/docs/vertx-core/java/
  3. https://vertx.io/blog/an-introduction-to-the-vert-x-context-object/
  4. https://vertx.io/docs/guide-for-java-devs/
  5. \
  6. https://vertx.io/docs
  7. https://vertx.io/docs