high performance, lightweight and boilerplate free distributed eventloop'ish Actor implementation designed for Java 8.
Kontraktor enables you to abstract away the network layer used. So any server/service built with kontraktor can be made available via TCP (blocking or NIO), WebSockets, Http Long Poll out of the box. Either with binary serialization or JSon encoding.
Kontraktor is high performance, you can do up to 2 million point2point async remote calls per second over tcp.
what changed compared to 2.0 ?
- simplified thread scheduling model. An Actor has a fixed assigned thread. Many actors can be scheduled on the same thread explicitely, no "magic" auto-scaling + pool execution. In the end its important to know what's going on, especially when mixing actors and idiomatic java style block-all-the-threads concurrency.
- rewrote and redesigned remoting layer such that a minimum of transport specific code is required. Reduces errors as most part of remoting logic is shared accross all transport options (tcp, tcp nio, websocket, http long poll, fst-serialization, json-serialization).
- changed naming of concurrency primitives EcmaScript 6/7 style. In 2.0
Futureclashed with JDK, so now
IPromise. Also concurrency tooling has been renamed ES6/7 alike:
await. As the concurrency model is similar to Node.js (difference: we can run N instances, we have threads :) ), this seemed the best option to avoid alienation, at the same time prevent name clashes with java.util.concurrent.
Old Blogposts (samples are of OLD 2.0 version, would need minor rewrite (mostly