SlideShare a Scribd company logo
vert.x
asynchronous applications
       + big data

    Pid – Stuart Williams
      Consulting Architect
        SpringSource

          @pidster
Pid (Stuart Williams)
  Speaker Bio
  ■ Consulting Architect at SpringSource / Pivotal
    Application architecture, performance (and hand-waving)

  ■ Projects                         ■ Communities
   ■ vert.x                           ■ Apache Tomcat
   ■ Apache Oltu (OAuth)              ■ Groovy




                                                              3
vert.x project
 Project Lead
   @timfox

 Committers
   @pidster
   @normanm (netty)




                      4
What is vert.x?
    General purpose application platform
    Superficially similar to Node.js – but not a clone!
    Asynchronous APIs
    Polyglot – mix and match Java, JavaScript/CoffeeScript, Ruby, Groovy
     and Python (others to follow).
    Simple but not Simplistic
    Part of the new breed of application platforms




                                                                        5
Key Features
 Hybrid Reactor
 Polyglot Container
 TCP/SSL clients and servers
 HTTP/HTTPS clients and servers – including WebSockets
 File system
 Event bus
 100% asynchronous




                                                         6
Code!
 Super simple HTTP server
 Serves files by matching request path
 One example for each language




                                         7
JavaScript – Mozilla Rhino
 load('vertx.js’)

 vertx.createHttpServer().requestHandler(function(req) {

   var file = req.path === '/' ? 'index.html' : req.path;
   req.response.sendFile('webroot/' + file);

 }).listen(8080)

                                                            8
Python – www.jython.org
 import vertx

 server = vertx.create_http_server()
 @server.request_handler

 def request_handler(req):
   file = "index.html" if req.uri == "/" else req.uri
   req.response.send_file("webroot/%s"%file)
 server.listen(8080)
                                                        9
Ruby – jruby.org
 require "vertx"

 Vertx::HttpServer.new.request_handler do |req|

   file = req.uri == "/" ? "index.html" : req.uri
   req.response.send_file "webroot/#{file}”

 end.listen(8080)

                                                    10
Groovy – groovy-lang.org
 vertx.createHttpServer().requestHandler { req ->

   def file = req.uri == "/" ? "index.html" : req.uri
   req.response.sendFile "webroot/$file”

 }.listen(8080)




                                                        11
Java
 import org.vertx.java.core.Handler;
 import org.vertx.java.core.http.HttpServerRequest;
 import org.vertx.java.deploy.Verticle;


 public class Server extends Verticle {
     public void start() {
         vertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() {
           public void handle(HttpServerRequest req) {
               String file = req.path.equals("/") ? "index.html" : req.path;
               req.response.sendFile("webroot/" + file);
           }
         }).listen(8080);
     }
 }
                                                                                      12
Scala – soon!
 vertx.createHttpServer
  .requestHandler { req: HttpServerRequest =>

   val file : String = if (req.path == “/”) “/index.html” else req.uri
   req.response.sendFile("webroot/" + file)

 } .listen(8080)



                                                                         13
More languages?
 DynJS
   100% InvokeDynamic
   Alternative to Rhino for JavaScript
   Node.js Compatibility for vert.x

 Clojure?

 What language support do you want see?

                                          14
Thread Pools
 Non-blocking Event Loops
   Core Loop
   Acceptors

 Blocking
   Worker Pool




                            15
Threading Model
    Vert.x implements the Multi-Reactor Pattern
    An event loop is an OS thread
    Handles events for many handlers
    Vert.x has multiple event loops. Typically one per core.
    Don't block the event loop!




                                                                16
Hybrid Threading Model
  Don't force everything to run on an event loop
  Worker verticles can block
  Communicate with other verticles by message passing.
  Allows us to leverage the huge ecosystem of blocking Java libs




                                                                    17
Components
 Server & Client
   TCP
   HTTP
    WebSocket
    SockJS
 Event Bus
   Point-to-point, publish-subscribe
   Transparent clustering

                                       18
Event Bus
 The nervous system of Vert.x
 Verticles communicate using the event bus.
 Super simple API.
 Point to point. Publish/Subscribe. Request/Response.
 Pass simple strings, numbers or other primitive types.
 JSON messages are preferred for structured data.
 Transparent clustering



                                                          19
Event Bus – Example
 var handler = function(message) {
    console.log('Received message ' + message.msg)
  }

 vertx.eventBus.registerHandler('example.address', handler)

 vertx.setPeriodic(1000, function() {
   vertx.eventBus.send('example.address', { msg: 'foo’ })
 })
                                                              20
Event Bus – Extended to Browser
 Event bus extends to client side JavaScript too
 Uses the same API on the client
 Powerful distributed event space spanning both client and server
  nodes
 Ideal for modern “real-time” web applications



                                                                 21
Modules
 Authentication Manager   ■   Web Server
 Form Upload              ■   Work Queue
 JDBC Persistor           ■   AMQP
 Mailer                   ■   More…
 Mongo Persistor
 Session Manager



                                            22
mod-web-server
 load('vertx.js’)
 var config = {
       "web_root": <web_root>,
       "port", <port>,
       "ssl": <ssl>,
       "key_store_password": <key_store_password>,
       "key_store_path": <key_store_path>,
 }
 vertx.deployModule('vertx.web-server-v1.0', config, 1, function() {
     // deployed
 });
                                                                       23
Composition
 Deploy code using code
 Modules are unit of composed code
 Deploy modules using a verticle
 Or provide multiple verticles inside a module
 Remember: verticles communicate using the Event Bus.




                                                        24
Architecture

                      I/O verticles
                                              Logic
                                              verticles
 Separation of concerns
 Workers if required                  Event
                                       Bus
 Polyglot

                                              Worker
                                              verticle

                                                          25
Example
 ….




          26
Big Fast Data
 Realtime Analytics Dashboards & APIs
   WebSocket
   SockJS

 Polyglot Integration
   Use language independent format like JSON, XML for data
   Exchange messages using event bus



                                                             27
Fast Data – RabbitMQ
 AMQP message broker

 Use for queuing, routing messages and WAN clustering




                                                        28
Big/Fast Data – Redis
 “Data Structure Server”
 Key-Value store
 Pub-sub messaging

 Use for caching verticle data, broadcasting to verticles




                                                            29
Big/Fast Data – GemFire
 Compute Grid / Distributed Cache
 Embeddable Key-Value store

 Use for large partitioned caches, high performance compute,
   WANs
 Send data to vert.x using CacheListeners, subscriptions,
   AsyncQueues



                                                               30
Big Data – Hadoop
 Hive – of course!
 SQL queries via JDBC worker verticle
 Standard pattern via event bus

 Use for ad-hoc queries on large datasets




                                            31
Big Data – MQTT
    MQTT is a machine-to-machine (M2M) / "Internet of Things”
     connectivity protocol.
    Extremely lightweight publish/subscribe messaging transport.
    It is useful for connections with remote locations where a small
     code footprint is required and/or network bandwidth is at a
     premium.
    Eclipse Paho

 Coming soon!
                                                                        32
Big Data – Intravert (@zznate - apigee)
  Processors, filters and procedures allow you perform arbitrary
   programmatic transformations on the server side before the results are
   returned to the client.
  Execute procedures and join like logic in a single RPC request
   eliminating round-trips
  A simple transport and JSON API that runs over HTTP allows clients to
   choose from JSON, JSON compressed by smile, & even big fat sexy
   XML
  A real REST interface (ever thought about what would a Cassandra
   hyper media API look like?)
  Work with simple familiar objects like String or Integer instead of bytes
                                                                               33
v2.0 – Features
    New ClassLoader
    Netty 4.0
    Languages as modules
    Flexible Module repositories, including Maven
    Management




                                                     34
v2.0 – Developer experience
    Gradle template project
    Maven archetype and plugins
    Zero setup IDE debugging
    Zero setup IDE testing
    Test Tools project




                                   35
Management
 Management Agent
   Publishes metrics on Event Bus in JSON format
 Management GUI
 JMX Demo




                                                   36
Real Deployment
 vert.x provides a JSON RPC API:

     deployer.js
      JsonRpcServer.groovy
      Integration.groovy – worker
        Spring Integration message flow to RabbitMQ
         Dynamically deploys components to consume queues:
          Consumer.groovy – worker, Spring Integration message flow
          JsonRpcClient.groovy
                                                                       37
Real Deployment
      I/O verticles           Worker Verticles

        HTTP                  Spring Integration
      JSON RPC                AMQP publisher


                      Event
                       Bus


        HTTP                  Spring Integration (Groovy DSL)
    JSON RPC Client           AMQP Consumer


                                          38
Summary
 Write apps as set of loosely coupled components that live
   anywhere
 Polyglot – use the language(s) you want
 Simple concurrency – wave goodbye to most race conditions
 Leverage existing Java library ecosystem
 Module system – empower the community
 Run Node.js apps too

 We believe Vert.x is the platform for the new generation of
  polyglot web and enterprise applications                     39
Q&A

More Related Content

What's hot

Vert.x introduction
Vert.x introductionVert.x introduction
Vert.x introductionGR8Conf
 
Vertx
VertxVertx
Real World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.xReal World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.x
Sascha Möllering
 
Vert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMVert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVM
Massimiliano Dessì
 
vert.x - life beyond jetty and apache
vert.x - life beyond jetty and apachevert.x - life beyond jetty and apache
vert.x - life beyond jetty and apache
Ralph Winzinger
 
Node.js, toy or power tool?
Node.js, toy or power tool?Node.js, toy or power tool?
Node.js, toy or power tool?Ovidiu Dimulescu
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
Nir Noy
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
Nurul Ferdous
 
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
jaxLondonConference
 
Vert.x vs akka
Vert.x vs akkaVert.x vs akka
Vert.x vs akka
Chang-Hwan Han
 
Node js internal
Node js internalNode js internal
Node js internal
Chinh Ngo Nguyen
 
Spicing up JMX with Jolokia (Devoxx 2014)
Spicing up JMX with Jolokia (Devoxx 2014)Spicing up JMX with Jolokia (Devoxx 2014)
Spicing up JMX with Jolokia (Devoxx 2014)
roland.huss
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
Colin Mackay
 
Threads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionThreads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java edition
Ovidiu Dimulescu
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
Akshay Mathur
 
NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS
Ganesh Kondal
 
KubeFuse - A File-System for Kubernetes
KubeFuse - A File-System for KubernetesKubeFuse - A File-System for Kubernetes
KubeFuse - A File-System for Kubernetes
Bart Spaans
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
Gary Yeh
 

What's hot (20)

Vert.x introduction
Vert.x introductionVert.x introduction
Vert.x introduction
 
Vertx
VertxVertx
Vertx
 
Real World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.xReal World Enterprise Reactive Programming using Vert.x
Real World Enterprise Reactive Programming using Vert.x
 
Vert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVMVert.X like Node.js but polyglot and reactive on JVM
Vert.X like Node.js but polyglot and reactive on JVM
 
vert.x - life beyond jetty and apache
vert.x - life beyond jetty and apachevert.x - life beyond jetty and apache
vert.x - life beyond jetty and apache
 
Node.js, toy or power tool?
Node.js, toy or power tool?Node.js, toy or power tool?
Node.js, toy or power tool?
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
 
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, DhakaJavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
JavaScript as a Server side language (NodeJS): JSConf 2011, Dhaka
 
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
Introducing Vert.x 2.0 - Taking polyglot application development to the next ...
 
Vert.x vs akka
Vert.x vs akkaVert.x vs akka
Vert.x vs akka
 
Node js internal
Node js internalNode js internal
Node js internal
 
Node.js code tracing
Node.js code tracingNode.js code tracing
Node.js code tracing
 
Spicing up JMX with Jolokia (Devoxx 2014)
Spicing up JMX with Jolokia (Devoxx 2014)Spicing up JMX with Jolokia (Devoxx 2014)
Spicing up JMX with Jolokia (Devoxx 2014)
 
Introduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azureIntroduction to node js - From "hello world" to deploying on azure
Introduction to node js - From "hello world" to deploying on azure
 
Threads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java editionThreads Needles Stacks Heaps - Java edition
Threads Needles Stacks Heaps - Java edition
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Container orchestration
Container orchestrationContainer orchestration
Container orchestration
 
NodeJS - Server Side JS
NodeJS - Server Side JS NodeJS - Server Side JS
NodeJS - Server Side JS
 
KubeFuse - A File-System for Kubernetes
KubeFuse - A File-System for KubernetesKubeFuse - A File-System for Kubernetes
KubeFuse - A File-System for Kubernetes
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
 

Viewers also liked

Vert.x – The problem of real-time data binding
Vert.x – The problem of real-time data bindingVert.x – The problem of real-time data binding
Vert.x – The problem of real-time data binding
Alex Derkach
 
ABB Semiconductors Newsletter - March 2014
ABB Semiconductors Newsletter - March 2014ABB Semiconductors Newsletter - March 2014
ABB Semiconductors Newsletter - March 2014
Siegfried Quemado
 
กิจกรรมที่ 5ข้อ 3
กิจกรรมที่ 5ข้อ 3กิจกรรมที่ 5ข้อ 3
กิจกรรมที่ 5ข้อ 3Naphatsorn Keadmongkol
 
กิจกรรมที่ 5ข้อ 2
กิจกรรมที่ 5ข้อ 2กิจกรรมที่ 5ข้อ 2
กิจกรรมที่ 5ข้อ 2Naphatsorn Keadmongkol
 
กิจกรรมที่ 5ข้อ 3
กิจกรรมที่ 5ข้อ 3กิจกรรมที่ 5ข้อ 3
กิจกรรมที่ 5ข้อ 3Naphatsorn Keadmongkol
 
กิจกรรมที่ 5 ข้อ1
กิจกรรมที่ 5 ข้อ1กิจกรรมที่ 5 ข้อ1
กิจกรรมที่ 5 ข้อ1Naphatsorn Keadmongkol
 
Максим Сабарня и Иван Дрижирук “Vert.x – tool-kit for building reactive app...
 	Максим Сабарня и Иван Дрижирук “Vert.x – tool-kit for building reactive app... 	Максим Сабарня и Иван Дрижирук “Vert.x – tool-kit for building reactive app...
Максим Сабарня и Иван Дрижирук “Vert.x – tool-kit for building reactive app...
Anna Shymchenko
 
Questions within questions and questions within statements
Questions within questions and questions within statementsQuestions within questions and questions within statements
Questions within questions and questions within statementsMaria Del Mar Arciniegas
 
Vert.x
Vert.xVert.x
Vert.x
Xavier MARIN
 
Light peak presentation
Light peak presentationLight peak presentation
Light peak presentationSimer Sahni
 
Vert.x using Groovy - Simplifying non-blocking code
Vert.x using Groovy - Simplifying non-blocking codeVert.x using Groovy - Simplifying non-blocking code
Vert.x using Groovy - Simplifying non-blocking code
sascha_klein
 
Vert.x 3
Vert.x 3Vert.x 3
Vert.x 3
Xavier MARIN
 
Case studies of mobile device usage
Case studies of mobile device usageCase studies of mobile device usage
Case studies of mobile device usage
Kosie Eloff
 
Building microservices with vert.x 3.0
Building microservices with vert.x 3.0Building microservices with vert.x 3.0
Building microservices with vert.x 3.0
Agraj Mangal
 

Viewers also liked (20)

Vert.x – The problem of real-time data binding
Vert.x – The problem of real-time data bindingVert.x – The problem of real-time data binding
Vert.x – The problem of real-time data binding
 
ABB Semiconductors Newsletter - March 2014
ABB Semiconductors Newsletter - March 2014ABB Semiconductors Newsletter - March 2014
ABB Semiconductors Newsletter - March 2014
 
กิจกรรมที่ 5ข้อ 3
กิจกรรมที่ 5ข้อ 3กิจกรรมที่ 5ข้อ 3
กิจกรรมที่ 5ข้อ 3
 
Datail1
Datail1Datail1
Datail1
 
กิจกรรมที่ 5ข้อ 2
กิจกรรมที่ 5ข้อ 2กิจกรรมที่ 5ข้อ 2
กิจกรรมที่ 5ข้อ 2
 
กิจกรรมที่ 5ข้อ 3
กิจกรรมที่ 5ข้อ 3กิจกรรมที่ 5ข้อ 3
กิจกรรมที่ 5ข้อ 3
 
Phrasal verbs
Phrasal verbsPhrasal verbs
Phrasal verbs
 
Unites 6 and 7
Unites 6 and 7Unites 6 and 7
Unites 6 and 7
 
กิจกรรมที่ 5 ข้อ1
กิจกรรมที่ 5 ข้อ1กิจกรรมที่ 5 ข้อ1
กิจกรรมที่ 5 ข้อ1
 
Detail2
Detail2Detail2
Detail2
 
Detail3
Detail3Detail3
Detail3
 
Wishes and imaginary situations or events
Wishes and imaginary situations or eventsWishes and imaginary situations or events
Wishes and imaginary situations or events
 
Максим Сабарня и Иван Дрижирук “Vert.x – tool-kit for building reactive app...
 	Максим Сабарня и Иван Дрижирук “Vert.x – tool-kit for building reactive app... 	Максим Сабарня и Иван Дрижирук “Vert.x – tool-kit for building reactive app...
Максим Сабарня и Иван Дрижирук “Vert.x – tool-kit for building reactive app...
 
Questions within questions and questions within statements
Questions within questions and questions within statementsQuestions within questions and questions within statements
Questions within questions and questions within statements
 
Vert.x
Vert.xVert.x
Vert.x
 
Light peak presentation
Light peak presentationLight peak presentation
Light peak presentation
 
Vert.x using Groovy - Simplifying non-blocking code
Vert.x using Groovy - Simplifying non-blocking codeVert.x using Groovy - Simplifying non-blocking code
Vert.x using Groovy - Simplifying non-blocking code
 
Vert.x 3
Vert.x 3Vert.x 3
Vert.x 3
 
Case studies of mobile device usage
Case studies of mobile device usageCase studies of mobile device usage
Case studies of mobile device usage
 
Building microservices with vert.x 3.0
Building microservices with vert.x 3.0Building microservices with vert.x 3.0
Building microservices with vert.x 3.0
 

Similar to Vert.x devoxx london 2013

StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
Shubhra Kar
 
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP IntegrationBKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
Linaro
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your way
Johannes Brännström
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?glynnormington
 
OSMC 2023 | IGNITE: Serving Server-Side WASM with Web Awareness with NGINX Un...
OSMC 2023 | IGNITE: Serving Server-Side WASM with Web Awareness with NGINX Un...OSMC 2023 | IGNITE: Serving Server-Side WASM with Web Awareness with NGINX Un...
OSMC 2023 | IGNITE: Serving Server-Side WASM with Web Awareness with NGINX Un...
NETWAYS
 
Cwin16 tls-a micro-service deployment - v1.0
Cwin16 tls-a micro-service deployment - v1.0Cwin16 tls-a micro-service deployment - v1.0
Cwin16 tls-a micro-service deployment - v1.0
Capgemini
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWAREFIWARE
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux
Trayan Iliev
 
Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning
Jim Dowling
 
High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017
Rick Hightower
 
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptxIBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
Georg Ember
 
Vijay Oscon
Vijay OsconVijay Oscon
Vijay Oscon
vijayrvr
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
QAware GmbH
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
Emily Jiang
 
Apache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingApache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless Computing
Upkar Lidder
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
Alex Glikson
 
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
confluent
 
Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJs
Srdjan Strbanovic
 
nuclio Overview October 2017
nuclio Overview October 2017nuclio Overview October 2017
nuclio Overview October 2017
iguazio
 

Similar to Vert.x devoxx london 2013 (20)

StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP IntegrationBKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
BKK16-409 VOSY Switch Port to ARMv8 Platforms and ODP Integration
 
Red Hat and kubernetes: awesome stuff coming your way
Red Hat and kubernetes:  awesome stuff coming your wayRed Hat and kubernetes:  awesome stuff coming your way
Red Hat and kubernetes: awesome stuff coming your way
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
 
OSMC 2023 | IGNITE: Serving Server-Side WASM with Web Awareness with NGINX Un...
OSMC 2023 | IGNITE: Serving Server-Side WASM with Web Awareness with NGINX Un...OSMC 2023 | IGNITE: Serving Server-Side WASM with Web Awareness with NGINX Un...
OSMC 2023 | IGNITE: Serving Server-Side WASM with Web Awareness with NGINX Un...
 
Cwin16 tls-a micro-service deployment - v1.0
Cwin16 tls-a micro-service deployment - v1.0Cwin16 tls-a micro-service deployment - v1.0
Cwin16 tls-a micro-service deployment - v1.0
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux
 
Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning
 
High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017
 
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptxIBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
IBM BP Session - Multiple CLoud Paks and Cloud Paks Foundational Services.pptx
 
Vijay Oscon
Vijay OsconVijay Oscon
Vijay Oscon
 
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
Apache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingApache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless Computing
 
Cloud computing: highlights
Cloud computing: highlightsCloud computing: highlights
Cloud computing: highlights
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
 
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
Scaling Security on 100s of Millions of Mobile Devices Using Apache Kafka® an...
 
Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJs
 
nuclio Overview October 2017
nuclio Overview October 2017nuclio Overview October 2017
nuclio Overview October 2017
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 

Vert.x devoxx london 2013

  • 1.
  • 2. vert.x asynchronous applications + big data Pid – Stuart Williams Consulting Architect SpringSource @pidster
  • 3. Pid (Stuart Williams) Speaker Bio ■ Consulting Architect at SpringSource / Pivotal Application architecture, performance (and hand-waving) ■ Projects ■ Communities ■ vert.x ■ Apache Tomcat ■ Apache Oltu (OAuth) ■ Groovy 3
  • 4. vert.x project Project Lead @timfox Committers @pidster @normanm (netty) 4
  • 5. What is vert.x?  General purpose application platform  Superficially similar to Node.js – but not a clone!  Asynchronous APIs  Polyglot – mix and match Java, JavaScript/CoffeeScript, Ruby, Groovy and Python (others to follow).  Simple but not Simplistic  Part of the new breed of application platforms 5
  • 6. Key Features Hybrid Reactor Polyglot Container TCP/SSL clients and servers HTTP/HTTPS clients and servers – including WebSockets File system Event bus 100% asynchronous 6
  • 7. Code! Super simple HTTP server Serves files by matching request path One example for each language 7
  • 8. JavaScript – Mozilla Rhino load('vertx.js’) vertx.createHttpServer().requestHandler(function(req) { var file = req.path === '/' ? 'index.html' : req.path; req.response.sendFile('webroot/' + file); }).listen(8080) 8
  • 9. Python – www.jython.org import vertx server = vertx.create_http_server() @server.request_handler def request_handler(req): file = "index.html" if req.uri == "/" else req.uri req.response.send_file("webroot/%s"%file) server.listen(8080) 9
  • 10. Ruby – jruby.org require "vertx" Vertx::HttpServer.new.request_handler do |req| file = req.uri == "/" ? "index.html" : req.uri req.response.send_file "webroot/#{file}” end.listen(8080) 10
  • 11. Groovy – groovy-lang.org vertx.createHttpServer().requestHandler { req -> def file = req.uri == "/" ? "index.html" : req.uri req.response.sendFile "webroot/$file” }.listen(8080) 11
  • 12. Java import org.vertx.java.core.Handler; import org.vertx.java.core.http.HttpServerRequest; import org.vertx.java.deploy.Verticle; public class Server extends Verticle { public void start() { vertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() { public void handle(HttpServerRequest req) { String file = req.path.equals("/") ? "index.html" : req.path; req.response.sendFile("webroot/" + file); } }).listen(8080); } } 12
  • 13. Scala – soon! vertx.createHttpServer .requestHandler { req: HttpServerRequest => val file : String = if (req.path == “/”) “/index.html” else req.uri req.response.sendFile("webroot/" + file) } .listen(8080) 13
  • 14. More languages? DynJS 100% InvokeDynamic Alternative to Rhino for JavaScript Node.js Compatibility for vert.x Clojure? What language support do you want see? 14
  • 15. Thread Pools Non-blocking Event Loops Core Loop Acceptors Blocking Worker Pool 15
  • 16. Threading Model  Vert.x implements the Multi-Reactor Pattern  An event loop is an OS thread  Handles events for many handlers  Vert.x has multiple event loops. Typically one per core.  Don't block the event loop! 16
  • 17. Hybrid Threading Model  Don't force everything to run on an event loop  Worker verticles can block  Communicate with other verticles by message passing.  Allows us to leverage the huge ecosystem of blocking Java libs 17
  • 18. Components Server & Client TCP HTTP WebSocket SockJS Event Bus Point-to-point, publish-subscribe Transparent clustering 18
  • 19. Event Bus The nervous system of Vert.x Verticles communicate using the event bus. Super simple API. Point to point. Publish/Subscribe. Request/Response. Pass simple strings, numbers or other primitive types. JSON messages are preferred for structured data. Transparent clustering 19
  • 20. Event Bus – Example var handler = function(message) { console.log('Received message ' + message.msg) } vertx.eventBus.registerHandler('example.address', handler) vertx.setPeriodic(1000, function() { vertx.eventBus.send('example.address', { msg: 'foo’ }) }) 20
  • 21. Event Bus – Extended to Browser Event bus extends to client side JavaScript too Uses the same API on the client Powerful distributed event space spanning both client and server nodes Ideal for modern “real-time” web applications 21
  • 22. Modules  Authentication Manager ■ Web Server  Form Upload ■ Work Queue  JDBC Persistor ■ AMQP  Mailer ■ More…  Mongo Persistor  Session Manager 22
  • 23. mod-web-server load('vertx.js’) var config = { "web_root": <web_root>, "port", <port>, "ssl": <ssl>, "key_store_password": <key_store_password>, "key_store_path": <key_store_path>, } vertx.deployModule('vertx.web-server-v1.0', config, 1, function() { // deployed }); 23
  • 24. Composition Deploy code using code Modules are unit of composed code Deploy modules using a verticle Or provide multiple verticles inside a module Remember: verticles communicate using the Event Bus. 24
  • 25. Architecture I/O verticles Logic verticles Separation of concerns Workers if required Event Bus Polyglot Worker verticle 25
  • 27. Big Fast Data Realtime Analytics Dashboards & APIs WebSocket SockJS Polyglot Integration Use language independent format like JSON, XML for data Exchange messages using event bus 27
  • 28. Fast Data – RabbitMQ AMQP message broker Use for queuing, routing messages and WAN clustering 28
  • 29. Big/Fast Data – Redis “Data Structure Server” Key-Value store Pub-sub messaging Use for caching verticle data, broadcasting to verticles 29
  • 30. Big/Fast Data – GemFire Compute Grid / Distributed Cache Embeddable Key-Value store Use for large partitioned caches, high performance compute, WANs Send data to vert.x using CacheListeners, subscriptions, AsyncQueues 30
  • 31. Big Data – Hadoop Hive – of course! SQL queries via JDBC worker verticle Standard pattern via event bus Use for ad-hoc queries on large datasets 31
  • 32. Big Data – MQTT  MQTT is a machine-to-machine (M2M) / "Internet of Things” connectivity protocol.  Extremely lightweight publish/subscribe messaging transport.  It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.  Eclipse Paho Coming soon! 32
  • 33. Big Data – Intravert (@zznate - apigee)  Processors, filters and procedures allow you perform arbitrary programmatic transformations on the server side before the results are returned to the client.  Execute procedures and join like logic in a single RPC request eliminating round-trips  A simple transport and JSON API that runs over HTTP allows clients to choose from JSON, JSON compressed by smile, & even big fat sexy XML  A real REST interface (ever thought about what would a Cassandra hyper media API look like?)  Work with simple familiar objects like String or Integer instead of bytes 33
  • 34. v2.0 – Features  New ClassLoader  Netty 4.0  Languages as modules  Flexible Module repositories, including Maven  Management 34
  • 35. v2.0 – Developer experience  Gradle template project  Maven archetype and plugins  Zero setup IDE debugging  Zero setup IDE testing  Test Tools project 35
  • 36. Management Management Agent Publishes metrics on Event Bus in JSON format Management GUI JMX Demo 36
  • 37. Real Deployment vert.x provides a JSON RPC API:  deployer.js  JsonRpcServer.groovy  Integration.groovy – worker  Spring Integration message flow to RabbitMQ Dynamically deploys components to consume queues:  Consumer.groovy – worker, Spring Integration message flow  JsonRpcClient.groovy 37
  • 38. Real Deployment I/O verticles Worker Verticles HTTP Spring Integration JSON RPC AMQP publisher Event Bus HTTP Spring Integration (Groovy DSL) JSON RPC Client AMQP Consumer 38
  • 39. Summary Write apps as set of loosely coupled components that live anywhere Polyglot – use the language(s) you want Simple concurrency – wave goodbye to most race conditions Leverage existing Java library ecosystem Module system – empower the community Run Node.js apps too We believe Vert.x is the platform for the new generation of polyglot web and enterprise applications 39
  • 40. Q&A