SlideShare a Scribd company logo
1 of 31
MILAN november 28th/29th 2014 
Samuele Dell'Angelo 
Build your reactive web application with Vert.x 
samuele@redhat.com – Red Hat
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Be Reactive 
Systems built as Reactive Systems are more flexible, loosely-coupled and scalable. 
This makes them easier to develop and amenable to change. 
They are significantly more tolerant of failure and when failure does occur 
they meet it with elegance rather than disaster. 
Reactive Systems are highly responsive, giving users effective interactive feedback.
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Lightweight reactive application platform 
●Polyglot 
●High performance 
●Superficially similar to Node.js – but not a clone! 
●Asynchronous APIs 
●Simple but not simplistic 
●Embeddable
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
The Event Loop 
Event Loop, as you will guess from the name, is a method for checking 
whether there is a new event in the infinite loop, and calling an event handler 
when an event has been received. As such, the asynchronous server 
application and the event-based server application are different terms 
indicating an identical target, similar to ‘enharmonic' for music. To use the 
Event Loop method, all I/Os should be managed as events..
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
The Event Loop 
EVENT 
EVENT 
EVENT 
EVENT 
EVENT 
EVENT 
Loop 
Event Queue
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
The Event Loop 
NEVER STOP THE EVENT LOOP
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Verticle 
●Execution unit of Vert.x 
●Single threaded – less scope for race conditions 
●Verticles communicate by message passing 
●You could handle blocking operation with worker 
Verticle
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
The container object 
●Injected in all verticle instances 
●Represents the view of the container in witch the verticle is 
running 
●contains methods for deploying and undeploying verticle and 
modules, and also allows config, environment variables and a 
logger 
;
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
The vertx object 
●Injected in all verticle instances 
●Provides access to the Vert.x core API. 
●Grant access to TCP, HTTP, file system access, event bus, 
timers etc.
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Handlers 
●The programming model is based on event handling 
●Handlers should be specific for an event
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Handlers 
●Once you wrote your handler, assign it to an event
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
JSON support 
●Vert.x has native JSON support 
●JSON is the preferred way to represents data in Vart.x 
●A JSON object is represented by instances of 
org.vertx.java.core.json.JsonObject. A JSON array is represented 
by instances of org.vertx.java.core.json.JsonArray.
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Event Bus 
●The nervous system of Vert.x 
●Verticles send messages over the event bus 
●Point to point. Publish/Subscribe. 
Request/Response 
●Pass strings, buffers, primitive types or JSON 
●JSON messages are preferred for structured data 
●Cluster 
●Event bus extends to client side JavaScript too
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Event Bus 
●Addresses are simple string 
●You have to register an handler to an address
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Event Bus 
●You can send a message to all handlers (publish/subscribe) or send it 
to a single handler instance (point to point) with a round robin load 
balancing.
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Event Bus 
●You can access the event bus from the browser with the Event Bus 
Bridge. 
●It uses sock.js for the communication 
●vertxbus.js is provided 
●You could find a good angular.js module at: 
https://github.com/knalli/angular-vertxbus
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Event Bus
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Shared Data 
●Vert.x allow different verticles instances to share data in a safe way. 
●You could share ConcurrentHashMap or Set 
●Vert.x only allows simple immutable types such as number, boolean 
and string or Buffer to be used in shared data
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Websockets 
●Easy as set a websocket handler on an http server. 
●Read and write via streams and pumps
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Streams and pumps 
●In Vert.x, calls to write data return immediately and writes are 
internally queued. 
●Flow control via ReadStream and WriteStream 
●A Pump is an helper class that allow you to pass data from a 
ReadStream to a WriteStream, 
●Pumps automatically pause when the write queue is full and resume 
when the queue is ready to accept more data.
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Modules 
●Modules encapsulate code and resources 
●One or more modules per application 
●Must include a mod.json descriptor file 
●Can be runnable or non runnable 
●Module class-loaders provide isolation
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Microservices 
●Independent services 
●Deployable as a standalone unit. 
●Easily scalable 
●Can interoperate with other services.
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Microservices 
●Vert.x is an enabling technology for microservices. 
●You don't have language restriction. 
●You can deploy independent units such as modules or 
verticles. 
●You could scale verticle instances on a single platform or 
across a cluster. 
●The Event Bus solves the complexity of the communication 
layer.
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Microservices example
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Microservices dependencies 
●Vert.x solves module dependencies using Maven repos
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
High Availability 
●Automatic failover of deployed modules 
●Nodes can be grouped 
●Network partition detection with quora
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Cluster 
●Shared Event Bus 
●Shared Verticle data stored in HashMaps or Set 
●Enable HA
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Demo 
Find the demo source code on: 
https://github.com/sdellang/vertx-webapp
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Play with Vert.x 
Try it using the Vert.x 
cartridge on 
www.openshift.com
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
?
MILAN november 28th/29th 2014 – Samuele Dell'Angelo 
Introducing... 
Thanks 
@samueled80 sdellang

More Related Content

Similar to Build Reactive Apps with Vert.x

Cloud Disaggregation with OpenNebula
Cloud Disaggregation with OpenNebulaCloud Disaggregation with OpenNebula
Cloud Disaggregation with OpenNebulaOpenNebula Project
 
Delivering Enterprise-Grade Cloud Automation with Puppet and AHEAD
Delivering Enterprise-Grade Cloud Automation with Puppet and AHEAD Delivering Enterprise-Grade Cloud Automation with Puppet and AHEAD
Delivering Enterprise-Grade Cloud Automation with Puppet and AHEAD Puppet
 
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...Corley S.r.l.
 
Deploying (micro)services with Disnix
Deploying (micro)services with DisnixDeploying (micro)services with Disnix
Deploying (micro)services with DisnixSander van der Burg
 
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaSService Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaSSoftware Guru
 
Microservices in academic environment
Microservices in academic environmentMicroservices in academic environment
Microservices in academic environmentMilind Bhagwati
 
Docker Seattle Meetup, May 2017
Docker Seattle Meetup, May 2017Docker Seattle Meetup, May 2017
Docker Seattle Meetup, May 2017Stephen Walli
 
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...Srijan Technologies
 
Présentation openstackinaction v1.2
Présentation openstackinaction v1.2Présentation openstackinaction v1.2
Présentation openstackinaction v1.2Regis Allegre
 
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...Codemotion
 
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Cloud Native Islamabad - Getting Closer to Continuous Delivery with KnativeCloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Cloud Native Islamabad - Getting Closer to Continuous Delivery with KnativeMauricio (Salaboy) Salatino
 
stackconf 2020 | Infrastructure as Software by Paul Stack
stackconf 2020 | Infrastructure as Software by Paul Stackstackconf 2020 | Infrastructure as Software by Paul Stack
stackconf 2020 | Infrastructure as Software by Paul StackNETWAYS
 
fiware-lab-dev-4.pdf
fiware-lab-dev-4.pdffiware-lab-dev-4.pdf
fiware-lab-dev-4.pdfssuser8c74ba
 
OpenNebulaConf 2013 - Hands-on Tutorial: 1. Introduction and Architecture
OpenNebulaConf 2013 - Hands-on Tutorial: 1. Introduction and ArchitectureOpenNebulaConf 2013 - Hands-on Tutorial: 1. Introduction and Architecture
OpenNebulaConf 2013 - Hands-on Tutorial: 1. Introduction and ArchitectureOpenNebula Project
 
Journey to the Cloud with Red Hat
Journey to the Cloud with Red HatJourney to the Cloud with Red Hat
Journey to the Cloud with Red HatKen Thompson
 
Montreal MuleSoft_Meetup_16-Aug.pptx
Montreal MuleSoft_Meetup_16-Aug.pptxMontreal MuleSoft_Meetup_16-Aug.pptx
Montreal MuleSoft_Meetup_16-Aug.pptxshubhamkalsi2
 
Red hat ansible automation technical deck
Red hat ansible automation technical deckRed hat ansible automation technical deck
Red hat ansible automation technical deckJuraj Hantak
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.itGiuseppe Lavagetto
 
TechEvent Servlerless Computing with Fn Project
TechEvent Servlerless Computing with Fn ProjectTechEvent Servlerless Computing with Fn Project
TechEvent Servlerless Computing with Fn ProjectTrivadis
 

Similar to Build Reactive Apps with Vert.x (20)

Cloud Disaggregation with OpenNebula
Cloud Disaggregation with OpenNebulaCloud Disaggregation with OpenNebula
Cloud Disaggregation with OpenNebula
 
Delivering Enterprise-Grade Cloud Automation with Puppet and AHEAD
Delivering Enterprise-Grade Cloud Automation with Puppet and AHEAD Delivering Enterprise-Grade Cloud Automation with Puppet and AHEAD
Delivering Enterprise-Grade Cloud Automation with Puppet and AHEAD
 
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
Cloud party 2014 - Deploy your infrastructure with Saltstack - Salt Cloud wit...
 
Deploying (micro)services with Disnix
Deploying (micro)services with DisnixDeploying (micro)services with Disnix
Deploying (micro)services with Disnix
 
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaSService Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
 
Microservices in academic environment
Microservices in academic environmentMicroservices in academic environment
Microservices in academic environment
 
Docker Seattle Meetup, May 2017
Docker Seattle Meetup, May 2017Docker Seattle Meetup, May 2017
Docker Seattle Meetup, May 2017
 
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...
 
Présentation openstackinaction v1.2
Présentation openstackinaction v1.2Présentation openstackinaction v1.2
Présentation openstackinaction v1.2
 
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
msnos: a cool and cozy blanket for your microservices - Bruno Bossola - Codem...
 
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Cloud Native Islamabad - Getting Closer to Continuous Delivery with KnativeCloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
 
stackconf 2020 | Infrastructure as Software by Paul Stack
stackconf 2020 | Infrastructure as Software by Paul Stackstackconf 2020 | Infrastructure as Software by Paul Stack
stackconf 2020 | Infrastructure as Software by Paul Stack
 
fiware-lab-dev-4.pdf
fiware-lab-dev-4.pdffiware-lab-dev-4.pdf
fiware-lab-dev-4.pdf
 
OpenNebulaConf 2013 - Hands-on Tutorial: 1. Introduction and Architecture
OpenNebulaConf 2013 - Hands-on Tutorial: 1. Introduction and ArchitectureOpenNebulaConf 2013 - Hands-on Tutorial: 1. Introduction and Architecture
OpenNebulaConf 2013 - Hands-on Tutorial: 1. Introduction and Architecture
 
Journey to the Cloud with Red Hat
Journey to the Cloud with Red HatJourney to the Cloud with Red Hat
Journey to the Cloud with Red Hat
 
OpenNebula - The Project
OpenNebula - The ProjectOpenNebula - The Project
OpenNebula - The Project
 
Montreal MuleSoft_Meetup_16-Aug.pptx
Montreal MuleSoft_Meetup_16-Aug.pptxMontreal MuleSoft_Meetup_16-Aug.pptx
Montreal MuleSoft_Meetup_16-Aug.pptx
 
Red hat ansible automation technical deck
Red hat ansible automation technical deckRed hat ansible automation technical deck
Red hat ansible automation technical deck
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.it
 
TechEvent Servlerless Computing with Fn Project
TechEvent Servlerless Computing with Fn ProjectTechEvent Servlerless Computing with Fn Project
TechEvent Servlerless Computing with Fn Project
 

More from Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

More from Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Recently uploaded

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Build Reactive Apps with Vert.x

  • 1. MILAN november 28th/29th 2014 Samuele Dell'Angelo Build your reactive web application with Vert.x samuele@redhat.com – Red Hat
  • 2. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Be Reactive Systems built as Reactive Systems are more flexible, loosely-coupled and scalable. This makes them easier to develop and amenable to change. They are significantly more tolerant of failure and when failure does occur they meet it with elegance rather than disaster. Reactive Systems are highly responsive, giving users effective interactive feedback.
  • 3. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Lightweight reactive application platform ●Polyglot ●High performance ●Superficially similar to Node.js – but not a clone! ●Asynchronous APIs ●Simple but not simplistic ●Embeddable
  • 4. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... The Event Loop Event Loop, as you will guess from the name, is a method for checking whether there is a new event in the infinite loop, and calling an event handler when an event has been received. As such, the asynchronous server application and the event-based server application are different terms indicating an identical target, similar to ‘enharmonic' for music. To use the Event Loop method, all I/Os should be managed as events..
  • 5. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... The Event Loop EVENT EVENT EVENT EVENT EVENT EVENT Loop Event Queue
  • 6. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... The Event Loop NEVER STOP THE EVENT LOOP
  • 7. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Verticle ●Execution unit of Vert.x ●Single threaded – less scope for race conditions ●Verticles communicate by message passing ●You could handle blocking operation with worker Verticle
  • 8. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... The container object ●Injected in all verticle instances ●Represents the view of the container in witch the verticle is running ●contains methods for deploying and undeploying verticle and modules, and also allows config, environment variables and a logger ;
  • 9. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... The vertx object ●Injected in all verticle instances ●Provides access to the Vert.x core API. ●Grant access to TCP, HTTP, file system access, event bus, timers etc.
  • 10. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Handlers ●The programming model is based on event handling ●Handlers should be specific for an event
  • 11. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Handlers ●Once you wrote your handler, assign it to an event
  • 12. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... JSON support ●Vert.x has native JSON support ●JSON is the preferred way to represents data in Vart.x ●A JSON object is represented by instances of org.vertx.java.core.json.JsonObject. A JSON array is represented by instances of org.vertx.java.core.json.JsonArray.
  • 13. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Event Bus ●The nervous system of Vert.x ●Verticles send messages over the event bus ●Point to point. Publish/Subscribe. Request/Response ●Pass strings, buffers, primitive types or JSON ●JSON messages are preferred for structured data ●Cluster ●Event bus extends to client side JavaScript too
  • 14. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Event Bus ●Addresses are simple string ●You have to register an handler to an address
  • 15. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Event Bus ●You can send a message to all handlers (publish/subscribe) or send it to a single handler instance (point to point) with a round robin load balancing.
  • 16. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Event Bus ●You can access the event bus from the browser with the Event Bus Bridge. ●It uses sock.js for the communication ●vertxbus.js is provided ●You could find a good angular.js module at: https://github.com/knalli/angular-vertxbus
  • 17. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Event Bus
  • 18. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Shared Data ●Vert.x allow different verticles instances to share data in a safe way. ●You could share ConcurrentHashMap or Set ●Vert.x only allows simple immutable types such as number, boolean and string or Buffer to be used in shared data
  • 19. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Websockets ●Easy as set a websocket handler on an http server. ●Read and write via streams and pumps
  • 20. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Streams and pumps ●In Vert.x, calls to write data return immediately and writes are internally queued. ●Flow control via ReadStream and WriteStream ●A Pump is an helper class that allow you to pass data from a ReadStream to a WriteStream, ●Pumps automatically pause when the write queue is full and resume when the queue is ready to accept more data.
  • 21. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Modules ●Modules encapsulate code and resources ●One or more modules per application ●Must include a mod.json descriptor file ●Can be runnable or non runnable ●Module class-loaders provide isolation
  • 22. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Microservices ●Independent services ●Deployable as a standalone unit. ●Easily scalable ●Can interoperate with other services.
  • 23. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Microservices ●Vert.x is an enabling technology for microservices. ●You don't have language restriction. ●You can deploy independent units such as modules or verticles. ●You could scale verticle instances on a single platform or across a cluster. ●The Event Bus solves the complexity of the communication layer.
  • 24. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Microservices example
  • 25. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Microservices dependencies ●Vert.x solves module dependencies using Maven repos
  • 26. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... High Availability ●Automatic failover of deployed modules ●Nodes can be grouped ●Network partition detection with quora
  • 27. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Cluster ●Shared Event Bus ●Shared Verticle data stored in HashMaps or Set ●Enable HA
  • 28. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Demo Find the demo source code on: https://github.com/sdellang/vertx-webapp
  • 29. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Play with Vert.x Try it using the Vert.x cartridge on www.openshift.com
  • 30. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... ?
  • 31. MILAN november 28th/29th 2014 – Samuele Dell'Angelo Introducing... Thanks @samueled80 sdellang