Vertx – reactive toolkit

19

Transcript of Vertx – reactive toolkit

Page 1: Vertx – reactive toolkit
Page 3: Vertx – reactive toolkit

Vert.x – Reactive ToolkitAvi Saidian @HPE

Page 4: Vertx – reactive toolkit

Overview

Created by Tim Fox (VMWare) at 2011 Joined the Eclipse Foundation at 2013 June 24 2015 released version 3.0 October 8 – 3.1 is out

Page 5: Vertx – reactive toolkit

Reactive Frameworks

ReactiveX - http://reactivex.io/ Typesafe Akka Dropwizard Vertx Netflix OSS Others…

Page 6: Vertx – reactive toolkit

Key Features

Polyglot Java Javascript Ruby Groovy

Page 7: Vertx – reactive toolkit

Key Features

Verticles Basic execution unit Actor like model Always run in the same thread Can have many instances Classloader isolated Communicate over messaging BUS

Page 8: Vertx – reactive toolkit

Demo

Hello Polyglot JS:

Page 9: Vertx – reactive toolkit

Key Features

Event Bus Point To Point Publish/Subscribe Request/Reply Pass Strings, Buffer,

Primitives and JSON Support Custom

Types (codec)

Page 10: Vertx – reactive toolkit

Key Features

Ecosystem Lightweight vert.x core Web Data access (mongodb, redis, JDBS) Security (basic auth, jdbc auth, jwt, shiro) Reactive (based on RxJava)

Page 11: Vertx – reactive toolkit

Code ExamplesMy server code:

Page 12: Vertx – reactive toolkit

Code ExamplesMy JDBC code:

Page 13: Vertx – reactive toolkit

New In Vert.x 3.1

Vertx-sync - perform async operations in a synchronous way, but without blocking kernel threads.

Vertx-stomp - implementation of a Simple (or Streaming) Text Orientated Messaging Protocol

Vertx-shell - a command line interface for the Vert.x runtime

Next Release 3.2 – end of 2015.

Page 14: Vertx – reactive toolkit

Demo Time

High Availability Server Load Balancing RealTime event bus

Page 15: Vertx – reactive toolkit

Live Vertx Project

Mobile Apps Sentiment Analysis (MASA) Project: Async Collection Of Data

Get Comments Detect Language Persistency

Async Processing of Comments Sentiment Score Classify Informative Score Persistency

Page 16: Vertx – reactive toolkit

2 Data Flows

Start

Crawler

Get

Data

Identify Language

PersistSen

timent Score

Classify

Informative Scor

e

Update

Page 17: Vertx – reactive toolkit

Questions?

Page 19: Vertx – reactive toolkit

Backup: Vert.x on Docker

There are vertx containers on Docker HUB: Vertx/vertx3 Vertx-exec