Presented at JAX London 2013
Vert.x is a lightweight, high performance, application platform for the JVM that's designed for modern mobile, web, and enterprise applications. The recent Vert.x 2.0 release marks a coming of age for Vert.x, as it progresses to a fully independent project. We'll dive into the Vert.x 2.0 release and show how the powerful new module system enables a Vert.x ecosystem by allowing modules to be re-used via Maven and Bintray repositories. You'll also learn about how better build tool and IDE integration makes developing applications with Vert.x a breeze.
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Â
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
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