08448380779 Call Girls In Civil Lines Women Seeking Men
Real World Enterprise Reactive Programming using Vert.x
1. Mariam Hakobyan,
Sascha Möllering,
| zanox AG
Björn Stahl
Real World Enterprise Reactive
Programming using Vert.x
2. 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
7. 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.”
9. WHAT IS A VERTICLE?
● Classes with an own Classloader
● operates Single Threaded
● executed by an Event Loop
10. V V V W W W
Event Loop Pool
Event Bus
TAKE A LOOK INSIDE
11. 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
13. 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!)
16. 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
19. 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)
21. 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
37. 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
41. Integration with Messaging System
KAFKA MESSAGING SYSTEM
● Apache Kafka is a distributed publish-subscribe
messaging system
● Fast
● Scalable
● Durable
● Distributed
47. 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
48. 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)