vert.x - life beyond jetty and apache
TRANSCRIPT
The C10k Problem
How to handle 10000+ parallel connections?
But why should I? For online banking?!?
Nope. „The internet of Things“, 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
Reactor Pattern
single threadedeventloop
clien
ts
workers thread pool
callbacks (events)
everything runs in parallelexcept your code
Babel ... my ass!
No JVM in the Old Testament
JavaScript, Ruby, Python, Groovy, Java ...
True polyglot within a single application
Verticlesvertx run app.js
var console = require('vertx/console');
console.log("hello, this is vert.x speaking");
Verticlesvertx 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"); } }
Verticlesvertx run loader.js
var container = require('vertx/container');
container.deployVerticle("app.js"); container.deployVerticle("App.java");