Skip to main content
Blog

JavaOne 2014 – Day 3 – Vert.x + WebSocket + Cloud = Awesome Map Tracking

By 1 oktober 2014januari 30th, 2017No Comments
The first session about introduction to Vert.x is a very informal one by Steve Pousty inviting the audience to participate. He also asked Tim Fox (creator of Vert.x) some questions if he didn’t know the answer. He also talked a bit about platform as a service (openshift from red hat) in combination with Vert.x, but it was very minimal.
Vert.x is a revolutionary system replacing the classical application servers like Jboss and Tomcat with a different mechanism. Vert.x uses at most 2 threads per available CPU core in contrary to the thread per request pattern as is available in traditional application servers. Each thread is basically an event loop handling events in the Vert.x system.

div>Vert.x identifies a basic element called a verticle. A verticle has its private classloader. All communication goes through the event bus using events. This makes it possible to create verticles that have been programmed in different languages on  the JVM . Thus Vert.x is polyglot. Vert.x is especially suitable for the “microservices” trend that is currently happening. Because each verticle has a different classloader, you can also not directly communicate. Furthermore because a verticle runs inside an event loop, you may never call Thread.sleep (because it blocks processing other verticles.

Two types of verticles have been defined:

  1. Default verticle, which is asynchronous
  2. Worker verticle, which is synchronous
Under the hood Vert.x uses hazelcast, socks.js for websockets and jackson for JSON to name a few.
When Steve mentioned that Tim Fox also will give a presentation on Vert.x on thursday, I immediately reserved that session. That’s how much I like the concepts that are used for Vert.x. A couple of weeks back I already saw a presentation of Tim Fox on the internet, which made me very enthusiastic about Vert.x; not to mention that Tim Fox is a great speaker.