Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Scalable Web Services with Vert.x

Building Scalable Web Services with Vert.x

Web services são aplicações que fazem uso intensivo de I/O. Tradicionalmente tais operações de I/O são implementadas de forma síncrona e a única forma de conseguir paralelismo neste cenário é a utilização de múltiplas threads do processador. Esta abordagem consome uma grande quantidade de recursos e não escala adequadamente.
Vert.x é um toolkit para JVM que permite a utilização de I/O assíncrono. Desta maneira, é possível construir aplicações de real-time altamente escaláveis e utilizando o mínimo de recursos.

rodrigopandini

February 13, 2019
Tweet

More Decks by rodrigopandini

Other Decks in Technology

Transcript

  1. z Summary § Nature of web applications § I/O processing

    § Blocking vs non-blocking § Reactive programming § Vert.x
  2. z Map of the island of I/O-bound programs Source: Node.js

    The Right Way: Practival, Server-Side Javascript That Scales (Wilson, Jim R. 2013)
  3. z I/O bound programs § I/O-Bound programs are constrainer by

    data access § Adding more processing power or RAM often makes little difference
  4. z I/O processing characteristics § Extremely slow compared to CPU

    processing § Depending on the device it can incorporate mechanical parts as hard drives § Even SSD makes use of long and slow buses
  5. z Data transfer rates compared 600 25600 175000 0 20000

    40000 60000 80000 100000 120000 140000 160000 180000 200000 SATA 6.0 Gb/s DDR4 RAM L3 Cache Velocidade em MB/s Velocidade em MB/s
  6. z ReactiveX § Non-blocking APIs are event-driven by nature; §

    ReactiveX is a library for composing asynchronous and event- based programs by using observable sequences.
  7. z What is Vert.x § It is a tool-kit for

    building reactive applications on the JVM.
  8. z Challenges § Stacktraces are useless for debugging § Need

    of criterious logging with correlation Ids § Database deadlocks § Write, run and debug cycle doesn’t work § Tests, tests, tests, tests...