Kilim is a message-passing framework for Java that provides ultra-lightweight threads and facilities for fast, safe, zero-copy messaging between these threads.
It consists of a bytecode postprocessor (a “weaver”), a run time library with buffered mailboxes (multi-producer, single consumer queues) and a user-level scheduler and a type system that puts certain constraints on pointer aliasing within messages to ensure interference-freedom between threads.
The idea of Kilim is fundamentally different from the idea of the observer design pattern. The Observer design pattern decouples the sender and the receiver of a message. Instead, Kilim is responsible for the non-blocking exchange of messages between different threads. These messages are sent directly from the sender to the receiver. Therefore the sender knows the receiver. The communication takes place asynchronously and the framework is responsible for buffering the messages if the recipient is not able to process quickly enough. This can be used to a much more efficient use of modern multi-core processors.