Skip to content
0:00 / 0:00

#kilim#actormodel#jvm

Kilim: Fast, lightweight, cheap message passing in Java.

Google TechTalks

349K subscribers • 56 videos on Hallway

YouTube
  • Recommended by 2 people: 2 on Hacker News.
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

32K views18 years ago2 recommendations

Programming languagesSystems programmingJava and the JVMConcurrency and parallelismFunctional programming

An introduction to Kilim, a Java framework providing lightweight actor-style message passing and user-level threads.

Google Tech Talks June, 11 2008 ABSTRACT Kilim: Fast, lightweight, cheap message passing in Java. A million actors, 3x faster than Erlang. The message passing (MP) paradigm is often seen as a superior alternative to the typical mix of idioms in concurrent (shared-memory, locks) and distributed programming (CORBA/RMI). MP eliminates worries endemic to the shared-memory mindset: lock ordering, failure-coupling, low-level data races and memory models. It simplifies synchronization between data and control planes (no lost signals or updates), and unifies APIs for local and remote process interaction. Curiously however, there are no efficient frameworks for intra-process message-passing, except for Erlang. This talk describes a Java framework called "Kilim" to fix this state of affairs. Kilim provides: 1. Extremely lightweight user-level threads (actors) with automatic stack management, obtained via CPS transformation. 2. A simple type system that ensures actor isolation by controlling pointer aliasing in messages at compile time, and by ensuring linear ownership of mutable message objects. This permits safe, zero-copy communication. 3. A compact run-time library containing typed mailboxes (with optional flow control), user-definable scheduling and python style generators. Kilim is portable; one of our explicit goals was to not require changes to the Java language syntax or to the JVM. Kilim scales comfortably to handle hundreds of thousands of actors and messages on modest hardware. It is fast as well -- task-switching is 1000x faster than Java threads and 60x faster than other lightweight tasking frameworks, and message-passing is 3x faster than Erlang (currently the gold standard for concurrency-oriented programming). Speaker: Sriram Srinivasan Sriram Srinivasan has 19 years of experience delivering a variety of systems spanning wireless sensors, messaging systems, middleware (he was a principal engineer of the Weblogic Application server) and large-scale applications such as cargo planning systems and network management systems. He is currently on leave from industry, pursuing a PhD at the University of Cambridge. He is interested in mixing programming languages, concurrenct & distributed systems and modal logics.

Why it's here

2 people recommend this

What people say. Recommended as a classic demonstration of high-performance actor-model concurrency on the JVM.

wynandon Hacker News • Recommends

On “Concurrency Patterns: Java, Scala, and Clojure”

Actors are decoupled from the means by which they are executed. Scala has a nice system where you can run thousands of event-based actors in a thread pool. It grows the pool as needed (as threads block). See link While it may use threads, Scala's actor system effectively allows you to create thousands of actors. Kilim is actually a pure (depending on whether you see a byte-code processing system as pure) Java system that does the same thing (as far as I can tell): link Kilim's author did a nice Google Talk: link to this video EDIT: Fixed some grammar and added video link.

luciferon Hacker News • Recommends

On “Why Scala Actors are Slow”

…VM landscape". I am not up on my Scala, but the author fails to convey (based on what I do know ;) the competence level that would lend weight to his attempt to address (much less support) the topic. For those interested in other JVM alternatives, Kilim seems quite promising and seems to hold its own quite well in benchmarks against Erlang. link link to this video link scroll to end to see the impressive results for Kilim. link edit: added pdf link…

tezzaon Hacker News • Mentions

On “Plurk Comet: Handling of 100.000+ open connections”

SPEED :: In defence of Java, it is very quick when done right. See Kilim1 for examples. SUPPORT :: On top of the speed Java has a supported hardware stack (Solaris). So if doing 100K connections is important to you, you can find engineers who can diagnose difficult problems on your whole stack. -------------- 1 link to this video at 23:23 . Java is quick without Kilim too, this is just an example with stats.

eternalbanon Hacker News • Mentions

On “Why Erlang? ”

Erlang is a CSP system, first and foremost, and not actors. CSP style concurrency on JVM: link to this video (Kilim, it should be noted, was benchmarked as scaling better than Erlang/OTP.) link (paper in top comment is worth the read.) Disclaimer: I think Erlang/OTP rocks. But JVM has its moments, as well, and in fairness has earned the "most advanced VM" title.