SlideShare a Scribd company logo
vert.x
life beyond jetty & apache
The C10k Problem
How to handle 10000+ parallel connections?
But why should I? For online banking?!?
Nope. „The internet of Things“, Social Web
The Internet of Things
Wired: Up to 50.000.000.000 devices until 2020
Social Web
The C10k Problem
Increasing challenge to handle a large number of concurrent
clients / connections in a high performance environment
Check. No problem any more.
But how did we solve this?!?
Time flies ...
... when you‘re idle
250 MIPS on MBAir, 7 TFLOPS on Mac Pro
Bad processes
Bad threading
Bad, bad I/O
Time flies ...
L1-cache ... 3 cycles
L2-cache ... 14 cycles
RAM ... 250 cycles
Disk ... 41.000.000 cycles
Network ... 240.000.000 cycles
And the winner is
single threading
asynchronicity
nginx, akka, node, LMAX
vert.x
Reactor Pattern
single threaded
eventloop
clients
workers
thread pool
callbacks
(events)
everything runs in parallel
except your code
Babel ... my ass!
No JVM in the Old Testament
JavaScript, Ruby, Python, Groovy, Java ...
True polyglot within a single application
Verticles
vertx run app.js

var console = require('vertx/console');
console.log("hello, this is vert.x speaking");
Verticles
vertx run App.java

import org.vertx.java.platform.Verticle;
public class App extends Verticle {
public void start() {
System.out.println("hello, speaking java right now");
}
}
Verticles
vertx run app.js

Verticles
vertx run loader.js

var container = require('vertx/container');
container.deployVerticle("app.js");
container.deployVerticle("App.java");
Verticles
vertx run app.js -instances 4

EventBus
EventBus
send(„myQ“, msg);
registerHandler(„myQ“,);
Cluster
vertx run app.js -instances 4 -cluster

EventBus
<script src=“vertxbus.js“/>
Happy Coding!
Java 7 (Closures, dynamically typed languages)
vertx.io
Editor
Hacking Days 2013
Up next ...
The C10M Problem
Check? Well, maybe ...
Prism
Thanks
@rwinz
ralph.winzinger@senacor.com

More Related Content

vert.x - life beyond jetty and apache