Vertx – reactive toolkit
-
Upload
avi-saidian -
Category
Software
-
view
349 -
download
1
Transcript of Vertx – reactive toolkit
![Page 1: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/1.jpg)
![Page 2: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/2.jpg)
Get Reactive
Responsive Resilient Elastic Message Driven
asynchronous message-passing – loose couple location transparency Non-blocking – only consume resources while active
![Page 3: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/3.jpg)
Vert.x – Reactive ToolkitAvi Saidian @HPE
![Page 4: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/4.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/5.jpg)
Reactive Frameworks
ReactiveX - http://reactivex.io/ Typesafe Akka Dropwizard Vertx Netflix OSS Others…
![Page 6: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/6.jpg)
Key Features
Polyglot Java Javascript Ruby Groovy
![Page 7: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/7.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/8.jpg)
Demo
Hello Polyglot JS:
![Page 9: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/9.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/10.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/11.jpg)
Code ExamplesMy server code:
![Page 12: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/12.jpg)
Code ExamplesMy JDBC code:
![Page 13: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/13.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/14.jpg)
Demo Time
High Availability Server Load Balancing RealTime event bus
![Page 15: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/15.jpg)
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](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/16.jpg)
2 Data Flows
Start
Crawler
Get
Data
Identify Language
PersistSen
timent Score
Classify
Informative Scor
e
Update
![Page 17: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/17.jpg)
Questions?
![Page 18: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/18.jpg)
References
http://vertx.io/docs/ http://vertx.io/blog/ Source:
https://github.com/eclipse/vert.x https://github.com/vert-x3/vertx-examples/ https://github.com/vert-x3/
http://www.infoq.com/articles/vertx-3-tim-fox
![Page 19: Vertx – reactive toolkit](https://reader035.fdocuments.us/reader035/viewer/2022062223/587bdefc1a28ab834d8b7199/html5/thumbnails/19.jpg)
Backup: Vert.x on Docker
There are vertx containers on Docker HUB: Vertx/vertx3 Vertx-exec