SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Vert.x 2
Taking polyglot application
development to the next level

Tim Fox
Vert.x Project Lead
Red Hat
twitter:@timfox
Bio
■ Employed By Red Hat to lead the Vert.x project
■ Some projects I've been involved with: Vert.x (creator), RabbitMQ,
HornetQ (creator), JBoss AS, Mobicents...
Project Info
■ Independent Community Project
■ The main project is an Eclipse Foundation project
■ All code is on GitHub
■ 100% open source (ASL 2.0 + Creative Commons)
■ One of the most popular Java projects on GitHub
Vert.x Overview
■ Lightweight reactive application platform
■ Polyglot
■ High performance
■ Superficially similar to Node.js – but not a clone!
■ Asynchronous APIs
■ Simple but not simplistic
■ Embeddable
Polyglot
Fully supported:

Beta level support:
Core Asychronous APIs
■ TCP/SSL clients and servers
■ HTTP/HTTPS clients and servers
■ Websockets
■ SockJS
■ File system
■ Event bus
■ DNS (new)
■ UDP (new)
■ Core is small and static – most new functionality in modules
■ Don't call us, we'll call you!
Why Asynchronous?
■ Modern servers need to handle many connections – web servers,
websockets, IoT
■ OS threads are still a precious resource
■ Need to service many connections with small number of threads
■ Blocked OS threads means they can't do other work
Verticle
■ Execution unit of Vert.x
■ Single threaded – less scope for race conditions
■ Verticles communicate by message passing
■ Sounds like the Actor Model?
Simple web server demo
■ Vertx run webserver.js
■ Show code in gedit
■ Explain about raw verticles
■ Also show WebServer.java
■ Run it too
■ Talk about Java source verticles
Performance demo
■ Run the perf server and client demo
■
Event Bus
■ The nervous system of Vert.x
■ Verticles send messages over the event bus
■ Point to point. Publish/Subscribe. Request/Response
■ Pass strings, buffers, primitive types or JSON
■ JSON messages are preferred for structured data
Clustered Event Bus
■ Lightweight peer-to-peer messaging system
■ Connects multiple Vert.x JVM instances
■ Applications are loosely coupled components distributed across your
network
■ No monolithic “application server”
■ Cluster manager is pluggable, default is Hazelcast
■ Cluster manager used for group management, not transport
Event bus in the 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
Clustered event bus demo
■ receiver.js and Sender.java
■ Show code
■ Show messages being received
■ Start bridge (need 3rd console for this)
■ Show browser receiving messages too
Modules
■ Modules encapsulate code and resources
■ One or more modules per application
■ Must include a mod.json descriptor file
■ Can be runnable or non runnable
■ Module class-loaders provide isolation
Explore module demo
■ Look at a simple runnable module on disk
■ Show the mod.json
■ It's a simple TCP echo server
■ Run it with vertx runmod
An ecosystem of modules
■ Sharing modules encourages reuse
■ Modules can be pushed to any Maven or Bintray repository
■ Vert.x can resolve modules at build time or run time
■ Want to encourage an ecosystem of modules
■ Register your modules in the registry
Module resolve demo
■ Delete the module that we explored in the last example
■ Do a vertx runmod on it again
■ Explore the mods directory again
It's all about the modules
■ MongoDB
■ Redis

■ Facebook
■ Yoke

■ MySQL/PostgreSQL
■ SMTP

■ Stomp
■ BSON

■ JDBC
■ Jersey

■ work-queue
■ NoDyn

■ Promises
■ Guice

■ GCM
■ SocketIO

■ Spring
■ Vertigo

■ Sessions
■ Via

■ Metrics

■ RxJava
Fat jars
■ Build module into self contained "fat" executable jar
■ Convenient for devops
■ Fairly small overhead
Fat jar demo
■ Do vertx fatjar of the module from before
■ Take a look at the jar, look at its size
■ Execute it
■ Maybe unzip it and look inside
High Availability
■ Automatic failover of deployed modules
■ Nodes can be grouped
■ Network partition detection with quora
HA demo
■ Keep bridge running from before
■ Use one Scala sender.scala module and one Groovy
sender module
■ Start them both with -ha flag
■ Look at browser
■ Kill one ps aux | grep Sender.java
■ Look at browser again
■ Start an empty vertx
■ Fail it back
Developing with Vert.x
■ Vert.x is IDE and build system agnostic
■ Can just a text editor if you like
■ Maven archetype
■ Gradle template
■ Debug and test in IDE
■ Module auto-redeploy during development
Auto-redeploy demo
■ Show Maven project in eclipse
■ Project is module with sender.rb in it
■ mvn vertx:runModEclipse
■ Look at browser
■ Make change
■ Look at browser again
Summary
■ Write apps as set of loosely coupled components that live anywhere
where you want
■ Polyglot – use the language(s) you want
■ Simple concurrency – wave goodbye to most race conditions
■ Module system – empower the community
■ High availability
■ Ease of development
We believe Vert.x is the platform for the new generation of reactive
polyglot web and enterprise applications
Get involved!
■ Loads more to do
■ Active and growing community
■ Github: https://github.com/vert-x/vert.x
■ Google group: vertx
■ IRC channel: #vertx on freenode.net
Q&A
http://vertx.io/

Contenu connexe

Tendances

Tendances (20)

Vert.x vs akka
Vert.x vs akkaVert.x vs akka
Vert.x vs akka
 
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with MinecraftReplatforming Legacy Packaged Applications: Block-by-Block with Minecraft
Replatforming Legacy Packaged Applications: Block-by-Block with Minecraft
 
The Next Generation Cloud: Unleashing the Power of the Unikernal
The Next Generation Cloud: Unleashing the Power of the UnikernalThe Next Generation Cloud: Unleashing the Power of the Unikernal
The Next Generation Cloud: Unleashing the Power of the Unikernal
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
 
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
 
Your journey into the serverless world
Your journey into the serverless worldYour journey into the serverless world
Your journey into the serverless world
 
Integration in the Age of DevOps
Integration in the Age of DevOpsIntegration in the Age of DevOps
Integration in the Age of DevOps
 
Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymore
 
Stackato v2
Stackato v2Stackato v2
Stackato v2
 
Innovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCInnovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXC
 
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
The Pivotal Engineering Dojo: Earning Your Black Belt in Cloud Foundry Engine...
 
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
KVM High Availability Regardless of Storage - Gabriel Brascher, VP of Apache ...
 
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerHandling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
 
PaaS on top of CloudStack
PaaS on top of CloudStackPaaS on top of CloudStack
PaaS on top of CloudStack
 
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
Build content centric apps with eclipse and nuxeo - ny java-sig november 2011
 
Apache CloudStack at LinuxCon Japan
Apache CloudStack at LinuxCon JapanApache CloudStack at LinuxCon Japan
Apache CloudStack at LinuxCon Japan
 
New stuff in CloudStack!
New stuff in CloudStack!New stuff in CloudStack!
New stuff in CloudStack!
 
XCP-ng - Olivier Lambert
XCP-ng - Olivier Lambert XCP-ng - Olivier Lambert
XCP-ng - Olivier Lambert
 
It's in the cloud
It's in the cloudIt's in the cloud
It's in the cloud
 
Messaging For the Cloud and Microservices
Messaging For the Cloud and MicroservicesMessaging For the Cloud and Microservices
Messaging For the Cloud and Microservices
 

En vedette

45 second video proposal
45 second video proposal45 second video proposal
45 second video proposal
Nicole174
 
Interactive media applications
Interactive media applicationsInteractive media applications
Interactive media applications
Nicole174
 

En vedette (20)

Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...Practical Performance: Understand the Performance of Your Application - Chris...
Practical Performance: Understand the Performance of Your Application - Chris...
 
Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)Scaling Scala to the database - Stefan Zeiger (Typesafe)
Scaling Scala to the database - Stefan Zeiger (Typesafe)
 
Design is a Process, not an Artefact - Trisha Gee (MongoDB)
Design is a Process, not an Artefact - Trisha Gee (MongoDB)Design is a Process, not an Artefact - Trisha Gee (MongoDB)
Design is a Process, not an Artefact - Trisha Gee (MongoDB)
 
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
A real-time architecture using Hadoop & Storm - Nathan Bijnens & Geert Van La...
 
Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)Big Events, Mob Scale - Darach Ennis (Push Technology)
Big Events, Mob Scale - Darach Ennis (Push Technology)
 
How Windows 10 will change the way we use devices
How Windows 10 will change the way we use devicesHow Windows 10 will change the way we use devices
How Windows 10 will change the way we use devices
 
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
Packed Objects: Fast Talking Java Meets Native Code - Steve Poole (IBM)
 
Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)Databases and agile development - Dwight Merriman (MongoDB)
Databases and agile development - Dwight Merriman (MongoDB)
 
45 second video proposal
45 second video proposal45 second video proposal
45 second video proposal
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
 
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
Garbage Collection: the Useful Parts - Martijn Verburg & Dr John Oliver (jCla...
 
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)What You Need to Know About Lambdas - Jamie Allen (Typesafe)
What You Need to Know About Lambdas - Jamie Allen (Typesafe)
 
Real-world polyglot programming on the JVM - Ben Summers (ONEIS)
Real-world polyglot programming on the JVM  - Ben Summers (ONEIS)Real-world polyglot programming on the JVM  - Ben Summers (ONEIS)
Real-world polyglot programming on the JVM - Ben Summers (ONEIS)
 
Interactive media applications
Interactive media applicationsInteractive media applications
Interactive media applications
 
Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)Streams and Things - Darach Ennis (Ubiquiti Networks)
Streams and Things - Darach Ennis (Ubiquiti Networks)
 
Big data from the LHC commissioning: practical lessons from big science - Sim...
Big data from the LHC commissioning: practical lessons from big science - Sim...Big data from the LHC commissioning: practical lessons from big science - Sim...
Big data from the LHC commissioning: practical lessons from big science - Sim...
 
Why other ppl_dont_get_it
Why other ppl_dont_get_itWhy other ppl_dont_get_it
Why other ppl_dont_get_it
 
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
How Hailo fuels its growth using NoSQL storage and analytics - Dave Gardner (...
 
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
Little words of wisdom for the developer - Guillaume Laforge (Pivotal)
 
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
 

Similaire à Introducing Vert.x 2.0 - Taking polyglot application development to the next level - Tim Fox (Red Hat)

Similaire à Introducing Vert.x 2.0 - Taking polyglot application development to the next level - Tim Fox (Red Hat) (20)

Vert.x keynote for EclipseCon 2013
Vert.x keynote for EclipseCon 2013Vert.x keynote for EclipseCon 2013
Vert.x keynote for EclipseCon 2013
 
Intro to Node.js (v1)
Intro to Node.js (v1)Intro to Node.js (v1)
Intro to Node.js (v1)
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6Tech io nodejs_20130531_v0.6
Tech io nodejs_20130531_v0.6
 
Node js internal
Node js internalNode js internal
Node js internal
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 
Mini-Training: Node.js
Mini-Training: Node.jsMini-Training: Node.js
Mini-Training: Node.js
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
 
Node.js Chapter1
Node.js Chapter1Node.js Chapter1
Node.js Chapter1
 
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
 
Nodejs overview
Nodejs overviewNodejs overview
Nodejs overview
 
Mongo and node mongo dc 2011
Mongo and node mongo dc 2011Mongo and node mongo dc 2011
Mongo and node mongo dc 2011
 
Node.js an Exectutive View
Node.js an Exectutive ViewNode.js an Exectutive View
Node.js an Exectutive View
 
02 Node introduction
02 Node introduction02 Node introduction
02 Node introduction
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
From CoreOS to Kubernetes and Concourse CI
From CoreOS to Kubernetes and Concourse CIFrom CoreOS to Kubernetes and Concourse CI
From CoreOS to Kubernetes and Concourse CI
 

Plus de jaxLondonConference

Plus de jaxLondonConference (17)

Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
Conflict Free Replicated Data-types in Eventually Consistent Systems - Joel J...
 
JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)JVM Support for Multitenant Applications - Steve Poole (IBM)
JVM Support for Multitenant Applications - Steve Poole (IBM)
 
How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)					How Java got its Mojo Back - James Governor (Redmonk)
How Java got its Mojo Back - James Governor (Redmonk)
 
Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)Java Testing With Spock - Ken Sipe (Trexin Consulting)
Java Testing With Spock - Ken Sipe (Trexin Consulting)
 
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
What makes Groovy Groovy  - Guillaume Laforge (Pivotal)What makes Groovy Groovy  - Guillaume Laforge (Pivotal)
What makes Groovy Groovy - Guillaume Laforge (Pivotal)
 
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
The Java Virtual Machine is Over - The Polyglot VM is here - Marcus Lagergren...
 
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
Java EE 7 Platform: Boosting Productivity and Embracing HTML5 - Arun Gupta (R...
 
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
Exploring the Talend unified Big Data toolset for sentiment analysis - Ben Br...
 
The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)
 
TDD at scale - Mash Badar (UBS)
TDD at scale - Mash Badar (UBS)TDD at scale - Mash Badar (UBS)
TDD at scale - Mash Badar (UBS)
 
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
Run Your Java Code on Cloud Foundry - Andy Piper (Pivotal)
 
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
Put your Java apps to sleep? Find out how - John Matthew Holt (Waratek)
 
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
 
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
Do You Like Coffee with Your dessert? Java and the Raspberry Pi - Simon Ritte...
 
Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...Large scale, interactive ad-hoc queries over different datastores with Apache...
Large scale, interactive ad-hoc queries over different datastores with Apache...
 
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
 
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
 

Dernier

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Introducing Vert.x 2.0 - Taking polyglot application development to the next level - Tim Fox (Red Hat)

  • 1. Vert.x 2 Taking polyglot application development to the next level Tim Fox Vert.x Project Lead Red Hat twitter:@timfox
  • 2. Bio ■ Employed By Red Hat to lead the Vert.x project ■ Some projects I've been involved with: Vert.x (creator), RabbitMQ, HornetQ (creator), JBoss AS, Mobicents...
  • 3. Project Info ■ Independent Community Project ■ The main project is an Eclipse Foundation project ■ All code is on GitHub ■ 100% open source (ASL 2.0 + Creative Commons) ■ One of the most popular Java projects on GitHub
  • 4. Vert.x Overview ■ Lightweight reactive application platform ■ Polyglot ■ High performance ■ Superficially similar to Node.js – but not a clone! ■ Asynchronous APIs ■ Simple but not simplistic ■ Embeddable
  • 6. Core Asychronous APIs ■ TCP/SSL clients and servers ■ HTTP/HTTPS clients and servers ■ Websockets ■ SockJS ■ File system ■ Event bus ■ DNS (new) ■ UDP (new) ■ Core is small and static – most new functionality in modules ■ Don't call us, we'll call you!
  • 7. Why Asynchronous? ■ Modern servers need to handle many connections – web servers, websockets, IoT ■ OS threads are still a precious resource ■ Need to service many connections with small number of threads ■ Blocked OS threads means they can't do other work
  • 8. Verticle ■ Execution unit of Vert.x ■ Single threaded – less scope for race conditions ■ Verticles communicate by message passing ■ Sounds like the Actor Model?
  • 9. Simple web server demo ■ Vertx run webserver.js ■ Show code in gedit ■ Explain about raw verticles ■ Also show WebServer.java ■ Run it too ■ Talk about Java source verticles
  • 10. Performance demo ■ Run the perf server and client demo ■
  • 11. Event Bus ■ The nervous system of Vert.x ■ Verticles send messages over the event bus ■ Point to point. Publish/Subscribe. Request/Response ■ Pass strings, buffers, primitive types or JSON ■ JSON messages are preferred for structured data
  • 12. Clustered Event Bus ■ Lightweight peer-to-peer messaging system ■ Connects multiple Vert.x JVM instances ■ Applications are loosely coupled components distributed across your network ■ No monolithic “application server” ■ Cluster manager is pluggable, default is Hazelcast ■ Cluster manager used for group management, not transport
  • 13. Event bus in the 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
  • 14. Clustered event bus demo ■ receiver.js and Sender.java ■ Show code ■ Show messages being received ■ Start bridge (need 3rd console for this) ■ Show browser receiving messages too
  • 15. Modules ■ Modules encapsulate code and resources ■ One or more modules per application ■ Must include a mod.json descriptor file ■ Can be runnable or non runnable ■ Module class-loaders provide isolation
  • 16. Explore module demo ■ Look at a simple runnable module on disk ■ Show the mod.json ■ It's a simple TCP echo server ■ Run it with vertx runmod
  • 17. An ecosystem of modules ■ Sharing modules encourages reuse ■ Modules can be pushed to any Maven or Bintray repository ■ Vert.x can resolve modules at build time or run time ■ Want to encourage an ecosystem of modules ■ Register your modules in the registry
  • 18. Module resolve demo ■ Delete the module that we explored in the last example ■ Do a vertx runmod on it again ■ Explore the mods directory again
  • 19. It's all about the modules ■ MongoDB ■ Redis ■ Facebook ■ Yoke ■ MySQL/PostgreSQL ■ SMTP ■ Stomp ■ BSON ■ JDBC ■ Jersey ■ work-queue ■ NoDyn ■ Promises ■ Guice ■ GCM ■ SocketIO ■ Spring ■ Vertigo ■ Sessions ■ Via ■ Metrics ■ RxJava
  • 20. Fat jars ■ Build module into self contained "fat" executable jar ■ Convenient for devops ■ Fairly small overhead
  • 21. Fat jar demo ■ Do vertx fatjar of the module from before ■ Take a look at the jar, look at its size ■ Execute it ■ Maybe unzip it and look inside
  • 22. High Availability ■ Automatic failover of deployed modules ■ Nodes can be grouped ■ Network partition detection with quora
  • 23. HA demo ■ Keep bridge running from before ■ Use one Scala sender.scala module and one Groovy sender module ■ Start them both with -ha flag ■ Look at browser ■ Kill one ps aux | grep Sender.java ■ Look at browser again ■ Start an empty vertx ■ Fail it back
  • 24. Developing with Vert.x ■ Vert.x is IDE and build system agnostic ■ Can just a text editor if you like ■ Maven archetype ■ Gradle template ■ Debug and test in IDE ■ Module auto-redeploy during development
  • 25. Auto-redeploy demo ■ Show Maven project in eclipse ■ Project is module with sender.rb in it ■ mvn vertx:runModEclipse ■ Look at browser ■ Make change ■ Look at browser again
  • 26. Summary ■ Write apps as set of loosely coupled components that live anywhere where you want ■ Polyglot – use the language(s) you want ■ Simple concurrency – wave goodbye to most race conditions ■ Module system – empower the community ■ High availability ■ Ease of development We believe Vert.x is the platform for the new generation of reactive polyglot web and enterprise applications
  • 27. Get involved! ■ Loads more to do ■ Active and growing community ■ Github: https://github.com/vert-x/vert.x ■ Google group: vertx ■ IRC channel: #vertx on freenode.net