SlideShare a Scribd company logo
1 of 50
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

What's hot

What's hot (20)

Quarkus k8s
Quarkus   k8sQuarkus   k8s
Quarkus k8s
 
Migration Spring PetClinic to Quarkus
Migration Spring PetClinic to QuarkusMigration Spring PetClinic to Quarkus
Migration Spring PetClinic to Quarkus
 
Shaker
ShakerShaker
Shaker
 
Quarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniquesQuarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniques
 
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech TalkSpring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 
Your journey into the serverless world
Your journey into the serverless worldYour journey into the serverless world
Your journey into the serverless world
 
Continuous (Non)-Functional Testing of Microservices on k8s
Continuous (Non)-Functional Testing of Microservices on k8s Continuous (Non)-Functional Testing of Microservices on k8s
Continuous (Non)-Functional Testing of Microservices on k8s
 
Ich brauche einen Abstraktions-Layer für meine Cloud
Ich brauche einen Abstraktions-Layer für meine CloudIch brauche einen Abstraktions-Layer für meine Cloud
Ich brauche einen Abstraktions-Layer für meine Cloud
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5
 
.NET on Linux: Entity Framework Core 1.0
.NET on Linux: Entity Framework Core 1.0.NET on Linux: Entity Framework Core 1.0
.NET on Linux: Entity Framework Core 1.0
 
Adopting GraalVM - NE Scala 2019
Adopting GraalVM - NE Scala 2019Adopting GraalVM - NE Scala 2019
Adopting GraalVM - NE Scala 2019
 
KubeCon EU 2016: Bringing an open source Containerized Container Platform to ...
KubeCon EU 2016: Bringing an open source Containerized Container Platform to ...KubeCon EU 2016: Bringing an open source Containerized Container Platform to ...
KubeCon EU 2016: Bringing an open source Containerized Container Platform to ...
 
Quarkus on Knative at Red Hat Summit 2019
Quarkus on Knative at Red Hat Summit 2019Quarkus on Knative at Red Hat Summit 2019
Quarkus on Knative at Red Hat Summit 2019
 
Automated Serverless Pipelines with #GitOps on Codefresh
Automated Serverless Pipelines with #GitOps on CodefreshAutomated Serverless Pipelines with #GitOps on Codefresh
Automated Serverless Pipelines with #GitOps on Codefresh
 
Using GitLab CI
Using GitLab CIUsing GitLab CI
Using GitLab CI
 
Serverless, Tekton, and Argo CD: How to craft modern CI/CD workflows | DevNat...
Serverless, Tekton, and Argo CD: How to craft modern CI/CD workflows | DevNat...Serverless, Tekton, and Argo CD: How to craft modern CI/CD workflows | DevNat...
Serverless, Tekton, and Argo CD: How to craft modern CI/CD workflows | DevNat...
 
Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018Adopting GraalVM - Scale by the Bay 2018
Adopting GraalVM - Scale by the Bay 2018
 
Efficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVMEfficient DevOps Tooling with Java and GraalVM
Efficient DevOps Tooling with Java and GraalVM
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 

Viewers also liked

Viewers also liked (20)

„Enterprise Event Bus“ Unified Log (Event) Processing Architecture
„Enterprise Event Bus“ Unified Log (Event) Processing Architecture„Enterprise Event Bus“ Unified Log (Event) Processing Architecture
„Enterprise Event Bus“ Unified Log (Event) Processing Architecture
 
Sas 2015 event_driven
Sas 2015 event_drivenSas 2015 event_driven
Sas 2015 event_driven
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
 
Cloud Architecture: Patterns and Best Practices
Cloud Architecture: Patterns and Best PracticesCloud Architecture: Patterns and Best Practices
Cloud Architecture: Patterns and Best Practices
 
Microservices designing deploying
Microservices designing deployingMicroservices designing deploying
Microservices designing deploying
 
Cloud Patterns Beuth Hochschule
Cloud Patterns Beuth HochschuleCloud Patterns Beuth Hochschule
Cloud Patterns Beuth Hochschule
 
Docker in der Cloud
Docker in der CloudDocker in der Cloud
Docker in der Cloud
 
Docker in der AWS Cloud
Docker in der AWS CloudDocker in der AWS Cloud
Docker in der AWS Cloud
 
MTC 2013 monetarisierung
MTC 2013 monetarisierungMTC 2013 monetarisierung
MTC 2013 monetarisierung
 
DevOpsCon Cloud Workshop
DevOpsCon Cloud Workshop DevOpsCon Cloud Workshop
DevOpsCon Cloud Workshop
 
Docker on AWS
Docker on AWSDocker on AWS
Docker on AWS
 
Lift Urban Entrepreneurs Seoul Ideation Workshop, Nov 12, 2016
Lift Urban Entrepreneurs Seoul Ideation Workshop, Nov 12, 2016Lift Urban Entrepreneurs Seoul Ideation Workshop, Nov 12, 2016
Lift Urban Entrepreneurs Seoul Ideation Workshop, Nov 12, 2016
 
Production ready Vert.x
Production ready Vert.xProduction ready Vert.x
Production ready Vert.x
 
Docker in the Cloud
Docker in the CloudDocker in the Cloud
Docker in the Cloud
 
Integrate Jenkins with S3
Integrate Jenkins with S3Integrate Jenkins with S3
Integrate Jenkins with S3
 
BED Con JBoss
BED Con JBossBED Con JBoss
BED Con JBoss
 
Building microservices with vert.x 3.0
Building microservices with vert.x 3.0Building microservices with vert.x 3.0
Building microservices with vert.x 3.0
 
CloudFormation Best Practices
CloudFormation Best PracticesCloudFormation Best Practices
CloudFormation Best Practices
 
Deep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
Deep Dive on Amazon S3 - March 2017 AWS Online Tech TalksDeep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
Deep Dive on Amazon S3 - March 2017 AWS Online Tech Talks
 
Hands-on Labs: Getting Started with AWS - March 2017 AWS Online Tech Talks
Hands-on Labs: Getting Started with AWS  - March 2017 AWS Online Tech TalksHands-on Labs: Getting Started with AWS  - March 2017 AWS Online Tech Talks
Hands-on Labs: Getting Started with AWS - March 2017 AWS Online Tech Talks
 

Similar to Real World Enterprise Reactive Programming using Vert.x

Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
Hendrik Ebbers
 

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

Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
 
Docker Platform and Ecosystem Nov 2015
Docker Platform and Ecosystem Nov 2015Docker Platform and Ecosystem Nov 2015
Docker Platform and Ecosystem Nov 2015
 
Meet Magento Spain 2019 - Our Experience with Magento Cloud
Meet Magento Spain 2019 - Our Experience with Magento CloudMeet Magento Spain 2019 - Our Experience with Magento Cloud
Meet Magento Spain 2019 - Our Experience with Magento Cloud
 
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh VariaCloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
Cloud-powered Continuous Integration and Deployment architectures - Jinesh Varia
 
Simplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI APISimplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI API
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymore
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Apache Drill (ver. 0.1, check ver. 0.2)
Apache Drill (ver. 0.1, check ver. 0.2)Apache Drill (ver. 0.1, check ver. 0.2)
Apache Drill (ver. 0.1, check ver. 0.2)
 
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on ContainersWSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
WSO2ConEU 2016 Tutorial - Deploying WSO2 Middleware on Containers
 
Deploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on Containers
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling Magento
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & Ansible
 
Is OSGi Modularity Always Worth It? - Glyn Normington
Is OSGi Modularity Always Worth It? - Glyn NormingtonIs OSGi Modularity Always Worth It? - Glyn Normington
Is OSGi Modularity Always Worth It? - Glyn Normington
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Real World Enterprise Reactive Programming using Vert.x