With the advent of mobile web and IoT (Internet of Things), today's applications need to handle a lot of concurrent requests while staying responsive and easy to scale. Infrastructure plays a role in achieving these goals, but changing your programming style can help too.
In this presentation, we will make the case for reactive programming, and introduce RxJava in particular. Then we will guide you through the process of building a real-life web application, based on Vert.x 3 and RxJava, communicating with databases, external services and modern datastores. You will learn how Vert.x integrates with RxJava, and why its simplicity makes it a perfect runtime for reactive applications.
2. Who am I?
● Thomas Segismont
● tsegismont on GitHub, Twitter, Gmail, Freenode...
● Vert.x core team since August 2016
● At Red Hat since November 2012 (RHQ and Hawkular)
#RivieraDev @vertx_project
3. Expectations
● Goals
– Why is reactive programming important?
– What are RxJava and Vert.x?
– How can I combine them to build scalable, efficient and resilient
apps?
● Non goals
– In-depth study of RxJava or Vert.x
#RivieraDev @vertx_project
4. Back to the late 90s…
A hotel room booking engine
13. What is Vert.x
● A toolkit (lib)
● … to build polyglot (on the JVM)
– JS, Groovy, Ruby, Scala (3.4), Kotlin (3.4)
● … reactive systems
#RivieraDev @vertx_project
17. Event Bus
● Nervous system of Vert.x
● Message passing style
● Different messaging paradigms:
– Point to point
– Publish/Subscribe
– Request/Reply
#RivieraDev @vertx_project
18. Running blocking code
● In the real world, most JVM libraries have blocking APIs
– JDBC
– io.File
– Your legacy libs
● With Vert.x you can interact with blocking parts easily
● You won’t throw away your code assets!
#RivieraDev @vertx_project
23. Data and events flows
● It is great at organizing transformation of data and coordination
of events
● It makes most sense when many sources of events are
involved (modern apps!)
#RivieraDev @vertx_project