SlideShare a Scribd company logo
Mariam Hakobyan, 
Sascha Möllering, 
| zanox AG 
Björn Stahl 
Real World Enterprise Reactive 
Programming using Vert.x
TABLE OF CONTENTS 
1.Introduction 
2.The Beginning 
3.How to start? 
4.Best Practices 
5.Architecture 
6.Deployment 
7.Vert.x module system 
8.Integration with messaging system
INTRODUCTION ZANOX 
Europe‘s leading performance advertising network
THE BEGINNING 
Java Magazin 04.14: 
Vert.x im Unternehmenseinsatz 
Entwicklung und Betrieb von 
asynchronen Applikationen mit Vert.x in 
der Praxis
THE BEGINNING 
● New core system for zanox 
● Requirements are pretty high (not negotiable): 
● Low latency 
● High throughput 
● Reactive 
● Fast
THE BEGINNING 
https://github.com/Mr-Steel/vertx_fatjar
WHAT IS VERT.X? 
Vert.x 
“Vert.x is a lightweight, high performance application 
platform for the JVM that's designed for modern 
mobile, web, and enterprise applications.”
WHAT IS VERT.X? 
Polyglot
WHAT IS A VERTICLE? 
● Classes with an own Classloader 
● operates Single Threaded 
● executed by an Event Loop
V V V W W W 
Event Loop Pool 
Event Bus 
TAKE A LOOK INSIDE
HOW TO START? 
● mvn archetype:generate - 
Dfilter=io.vertx: (do not forget the 
colon!) 
● generates structure for all languages (JS, 
Ruby, Groovy, Python) 
● maven pom is already set with relevant data
HOW TO START?
Lessons learned - Profiling 
● Verticles and WorkerVerticles appear in different 
subtrees 
● Be careful with blaming, a lot of stuff is just waiting 
● If you think a verticle is a bottleneck: start more 
instances of this verticle 
● Measure every change & compare results (yeah yeah - 
but really - do it!)
BEST PRACTICES 
Starter Verticle
BEST PRACTICES 
Logging
BEST PRACTICES 
Logger Verticle 
● Disadvantages: 
● log entries are not in order 
● loss of log levels 
● Solutions: 
●use IDs to follow log message flow 
●use one LoggerVerticle per log level
BEST PRACTICES - On the fly deployment
BEST PRACTICES - On the fly deployment
BEST PRACTICES 
In General 
● Do not block the loop 
● put blocking code or extensive computation into 
worker verticles 
● Keep the application responsive 
● stress test as often as possible 
● Encapsulate common code in modules (more 
on this later)
BEST PRACTICES 
Deployment 
fat-jar: one package to rule the deployment
BEST PRACTICES 
Deployment 
zip-File: 
● have a separate folder for scripts 
● bind packaging to verify phase to have it all 
with one command “mvn verify” 
● complete example is on GitHub
Internet 
Availability Zone 
Auto Scaling group 
Auto Scaling group 
Availability Zone
Architecture
Architecture 
● Main framework Vert.x 
● mod-kinesis (Kinesis-Adapter for Vert.x) 
● AWS Java SDK 
● IAM roles for Amazon EC2 instances 
● Coda Hale metrics and CloudWatch reporter 
● Jedis (Redis client for Java) 
● …
Deployment 
Workstation 
GitHub 
Jenkins 
Nexus 
Python/Fabric 
Datacenter 
Artefakt
Deployment
Deployment 
EC2 instance with Docker 
registry (port 5000) 
S3 bucket to store 
Docker images
Deployment 
Amazon Cloud 
Workstation 
GitHub 
Jenkins 
Python/Boto 
Docker Image 
Docker Registry S3 bucket with 
Docker Images
Deployment
Deployment
Deployment
Deployment 
python start_docker_instance.py  
-r <myregistry>:5000  
-i kinesis-producer  
-t 95  
-q 2  
-s quality  
-d '-d -p 8080:8080' 
https://github.com/SaschaMoellering/aws-docker-scripts
Deployment 
python start_elb.py  
-r <myregistry>:5000  
-i kinesis-producer  
-t 95  
-s quality  
-d '-d -p 8080:8080' 
https://github.com/SaschaMoellering/aws-docker-scripts
Deployment
Deployment
Vert.x Module System
Vert.x Module System 
Benefits: 
● Re-usable components as a zip file 
● Maven and Bintray integration 
● Vert.x module registry 
● Vert.x downloads and installs modules for you
Vert.x Module Registry
Vert.x Event Bus 
● Address is a simple string 
● Types - Pub/Sub & P2P 
Pub/Sub 
P2P
Sender 
Receiver
Integration with Messaging System 
KAFKA MESSAGING SYSTEM 
● Apache Kafka is a distributed publish-subscribe 
messaging system 
● Fast 
● Scalable 
● Durable 
● Distributed
Integration with Messaging System 
Main Terminology: 
● Topic 
● Producer 
● Consumer 
● Broker
Kafka Module in Module Registry 
Open source Kafka module in Vert.x’ module registry 
● http://modulereg.vertx.io/
Using Vert.x Module 
// programmatically 
// command line
Using Kafka Module 
Configuration is a JSON object:
StatsD Support 
Config
Metrics of Vert.x Project 
On 4 Cores virtual machine we had the following 
results: 
●~28 K requests per second without Kafka, 
with lookup from Redis 
●~18 K requests per second with Kafka and 
lookup from Redis
Metrics of Vert.x Project 
Test Traffic ~1000-3000 requests per minute: 
● mean response time: 1-2ms 
● 90% of responses 0.86 ms 
●fully cached: 0.65 ms 
● CPU Load: 1-3% 
● Memory: 90MB (300MB reserved)
GET INVOLVED 
Kafka Module - https://github.com/zanox/mod-kafka 
Kinesis Module - https://github.com/zanox/mod-kinesis
https://github.com/Mr-Steel/vertx_fatjar

More Related Content

PDF
Development with Vert.x: an event-driven application framework for the JVM
David Wu
 
PPTX
Reactive applications and microservices with Vert.x tool-kit
Victor Hugo
 
PPTX
vert.x - asynchronous event-driven web applications on the JVM
jbandi
 
PDF
Vert.x introduction
GR8Conf
 
PDF
Vert.x
Matt Stine
 
PPTX
Building microservices with vert.x 3.0
Agraj Mangal
 
PPTX
Vert.x vs akka
Chang-Hwan Han
 
PPTX
Vert.x devoxx london 2013
Stuart (Pid) Williams
 
Development with Vert.x: an event-driven application framework for the JVM
David Wu
 
Reactive applications and microservices with Vert.x tool-kit
Victor Hugo
 
vert.x - asynchronous event-driven web applications on the JVM
jbandi
 
Vert.x introduction
GR8Conf
 
Vert.x
Matt Stine
 
Building microservices with vert.x 3.0
Agraj Mangal
 
Vert.x vs akka
Chang-Hwan Han
 
Vert.x devoxx london 2013
Stuart (Pid) Williams
 

What's hot (20)

PPTX
Event driven microservices with vertx and kubernetes
Andy Moncsek
 
ODP
Vert.x keynote for EclipseCon 2013
timfox111
 
PDF
vert.x - life beyond jetty and apache
Ralph Winzinger
 
PPTX
Vert.x for Microservices Architecture
Idan Fridman
 
PDF
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
jaxLondonConference
 
PDF
Vertx
Alvaro Videla
 
PDF
Microservices with Micronaut
QAware GmbH
 
PDF
Node.js, toy or power tool?
Ovidiu Dimulescu
 
PDF
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
Nurul Ferdous
 
PDF
Cloud networking deep dive
amylynn11
 
PDF
Basic Understanding and Implement of Node.js
Gary Yeh
 
PDF
Running JavaScript Efficiently in a Java World
irbull
 
PDF
Cassandra on Docker
Instaclustr
 
ODP
Introducing OpenStack for Beginners
openstackindia
 
PPTX
Shall we play a game?
Maciej Lasyk
 
PPTX
OpenStack Quantum Intro (OS Meetup 3-26-12)
Dan Wendlandt
 
PDF
Threads Needles Stacks Heaps - Java edition
Ovidiu Dimulescu
 
PPTX
Introduction to node.js by jiban
Jibanananda Sana
 
PPTX
Why Play Framework is fast
Legacy Typesafe (now Lightbend)
 
PPTX
NodeJS - Server Side JS
Ganesh Kondal
 
Event driven microservices with vertx and kubernetes
Andy Moncsek
 
Vert.x keynote for EclipseCon 2013
timfox111
 
vert.x - life beyond jetty and apache
Ralph Winzinger
 
Vert.x for Microservices Architecture
Idan Fridman
 
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
jaxLondonConference
 
Microservices with Micronaut
QAware GmbH
 
Node.js, toy or power tool?
Ovidiu Dimulescu
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
Nurul Ferdous
 
Cloud networking deep dive
amylynn11
 
Basic Understanding and Implement of Node.js
Gary Yeh
 
Running JavaScript Efficiently in a Java World
irbull
 
Cassandra on Docker
Instaclustr
 
Introducing OpenStack for Beginners
openstackindia
 
Shall we play a game?
Maciej Lasyk
 
OpenStack Quantum Intro (OS Meetup 3-26-12)
Dan Wendlandt
 
Threads Needles Stacks Heaps - Java edition
Ovidiu Dimulescu
 
Introduction to node.js by jiban
Jibanananda Sana
 
Why Play Framework is fast
Legacy Typesafe (now Lightbend)
 
NodeJS - Server Side JS
Ganesh Kondal
 
Ad

Viewers also liked (17)

PPTX
Production ready Vert.x
Sascha Möllering
 
PPTX
Vertx in production
Mariam Hakobyan
 
PPTX
Domain Driven Design Quickly
Mariam Hakobyan
 
PDF
Vert.x – The problem of real-time data binding
Alex Derkach
 
PDF
Heatmap
Tikal Knowledge
 
PDF
Lean reactive services with vertx
Giancarlo Frison
 
PDF
Vert.x - 2014 JDay Lviv (English)
Bartek Zdanowski
 
PDF
Real-world applications of the Reactive Extensions
Jonas Chapuis
 
PDF
Map Reduce in Hazelcast - Hazelcast User Group London Version
Christoph Engelbert
 
PPTX
Reactive Systems And Vertx
Okay Aslan
 
PDF
Vert.X like Node.js but polyglot and reactive on JVM
Massimiliano Dessì
 
PDF
Web application development using Play Framework (with Java)
Saeed Zarinfam
 
PPTX
Vert.x v3 - high performance polyglot application toolkit
Sages
 
PDF
Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Red Hat Developers
 
PDF
Reactive Distributed Applications with Vert.x
Red Hat Developers
 
PDF
Glocal Facebook Strategy – Global Framework and Local Customization
AllFacebook.de
 
PDF
Comparing JVM Web Frameworks - February 2014
Matt Raible
 
Production ready Vert.x
Sascha Möllering
 
Vertx in production
Mariam Hakobyan
 
Domain Driven Design Quickly
Mariam Hakobyan
 
Vert.x – The problem of real-time data binding
Alex Derkach
 
Lean reactive services with vertx
Giancarlo Frison
 
Vert.x - 2014 JDay Lviv (English)
Bartek Zdanowski
 
Real-world applications of the Reactive Extensions
Jonas Chapuis
 
Map Reduce in Hazelcast - Hazelcast User Group London Version
Christoph Engelbert
 
Reactive Systems And Vertx
Okay Aslan
 
Vert.X like Node.js but polyglot and reactive on JVM
Massimiliano Dessì
 
Web application development using Play Framework (with Java)
Saeed Zarinfam
 
Vert.x v3 - high performance polyglot application toolkit
Sages
 
Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Red Hat Developers
 
Reactive Distributed Applications with Vert.x
Red Hat Developers
 
Glocal Facebook Strategy – Global Framework and Local Customization
AllFacebook.de
 
Comparing JVM Web Frameworks - February 2014
Matt Raible
 
Ad

Similar to Real World Enterprise Reactive Programming using Vert.x (20)

PDF
Utrecht JUG - Building microservices with Vert.x
Bert Jan Schrijver
 
PPTX
Vert.x - Reactive & Distributed [Devoxx version]
Orkhan Gasimov
 
PDF
Codemotion Amsterdam 2016 - Building microservices with Vert.x
Bert Jan Schrijver
 
PDF
Building microservices with Vert.x - Bert Jan Schrijver - Codemotion Amsterda...
Codemotion
 
PPTX
Sas 2015 event_driven
Sascha Möllering
 
PDF
VJUG 24 - Building microservices with Vert.x
Bert Jan Schrijver
 
PDF
Building Reactive Microservices with Vert.x
Claudio Eduardo de Oliveira
 
PDF
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
tdc-globalcode
 
ODP
Bostonrb Amazon Talk
Brian Kaney
 
PDF
Building microservices with Vert.X @ Fall 2016
Tim van Eijndhoven
 
PDF
Malmberg meetup June 2018 - Building microservices with Vert.x
Bert Jan Schrijver
 
PPT
Docker in the Cloud
Sascha Möllering
 
ODP
Groovy & Grails eXchange 2012 vert.x presentation
Stuart (Pid) Williams
 
PPTX
Vertx
Vijay Shukla
 
PDF
Vert.x NL meetup October 2017 - Building microservices with Vert.x
Bert Jan Schrijver
 
PDF
Dublin JUG February 2018 - Building microservices with Vert.x
Bert Jan Schrijver
 
PDF
JBCNConf 2017 - Building microservices with Vert.x
Bert Jan Schrijver
 
PDF
What we talk about when we talk about DevOps
Ricard Clau
 
PDF
Hashicorp at holaluz
Ricard Clau
 
Utrecht JUG - Building microservices with Vert.x
Bert Jan Schrijver
 
Vert.x - Reactive & Distributed [Devoxx version]
Orkhan Gasimov
 
Codemotion Amsterdam 2016 - Building microservices with Vert.x
Bert Jan Schrijver
 
Building microservices with Vert.x - Bert Jan Schrijver - Codemotion Amsterda...
Codemotion
 
Sas 2015 event_driven
Sascha Möllering
 
VJUG 24 - Building microservices with Vert.x
Bert Jan Schrijver
 
Building Reactive Microservices with Vert.x
Claudio Eduardo de Oliveira
 
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
tdc-globalcode
 
Bostonrb Amazon Talk
Brian Kaney
 
Building microservices with Vert.X @ Fall 2016
Tim van Eijndhoven
 
Malmberg meetup June 2018 - Building microservices with Vert.x
Bert Jan Schrijver
 
Docker in the Cloud
Sascha Möllering
 
Groovy & Grails eXchange 2012 vert.x presentation
Stuart (Pid) Williams
 
Vert.x NL meetup October 2017 - Building microservices with Vert.x
Bert Jan Schrijver
 
Dublin JUG February 2018 - Building microservices with Vert.x
Bert Jan Schrijver
 
JBCNConf 2017 - Building microservices with Vert.x
Bert Jan Schrijver
 
What we talk about when we talk about DevOps
Ricard Clau
 
Hashicorp at holaluz
Ricard Clau
 

Recently uploaded (20)

PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PPTX
Stamford - Community User Group Leaders_ Agentblazer Status, AI Sustainabilit...
Amol Dixit
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PDF
Software Development Company | KodekX
KodekX
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
This slide provides an overview Technology
mineshkharadi333
 
PDF
Best ERP System for Manufacturing in India | Elite Mindz
Elite Mindz
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Stamford - Community User Group Leaders_ Agentblazer Status, AI Sustainabilit...
Amol Dixit
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
Software Development Company | KodekX
KodekX
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Doc9.....................................
SofiaCollazos
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
This slide provides an overview Technology
mineshkharadi333
 
Best ERP System for Manufacturing in India | Elite Mindz
Elite Mindz
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 

Real World Enterprise Reactive Programming using Vert.x