Actors in the Small 

Facebook Twitter Gplus

JActor

License: LGPL GitHub: Commits, Issues Free (Code): All Releases, All Announcements Google Group

JActor is a high-throughput Java Actor framework, one of the fastest Actor implementations in any language.

  • Two-way messages provide implicit flow control, for better performance under load.
  • A simple machine builder is included to help keep application code clear and simple.
  • A billion actors a second can be created on a single thread.
  • Continuations are context free and can be used to send a response back from any thread–ideal for making actors completely transparent to application code. (new in release 4.5.0)

Benchmarks:

Shared Mailbox Across Mailboxes Asynchronous Mailboxes
msgs per sec 222,861,399 151,987,233 81,083,272

(Test Machine: i7-3770 @ 3.40 GHz, ASUS P8Z77-M Motherboard, 16 GB Corsair DDR3 1600 MHz RAM and Vertex 3 SATA III SSD)
 
Maven:
JActor is available on The (Maven) Central Repository, so Maven users just need to add this to their POM file:

<dependency>
    <groupId>org.agilewiki.jactor</groupId>
    <artifactId>jactor</artifactId>
    <version>4.6.2.0</version>
</dependency>

 
(Be sure to update the version number appropriately, of course.)
 
SLF4J:
JActor makes use of SLF4J to work with a variety of loggers. For example, to use LOG4J you need to include the slf4j-log4j12-1.6.4.jar file. Again, Maven users just need to add this to their POM file:

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.6.4</version>
</dependency>

 
Dependencies: Java 6, slf4j

Dependent Projects

 

 

Documentation

 

  1. The Problem with Actors
    Actor-based programming is quite appealing and holds a lot of potential. … more
  2. Introducing JActor
    Vertical scaling is today a major issue when writing server code. Threads and locks are the traditional approach to making full utilization of fat (multi-core) computers, but result is code that is difficult to maintain and which to often does not run much faster than single-threaded code. … more
  3. JActor API Basics
    Here we cover the basic API of JActor, which is very easy to use as you will see from the examples provided. … more
  4. Exception Handling made Easy
    Message passing between threads and callbacks can both make exception handling more difficult. On the other hand, the use of 2-way messages (request/response) provides us with a natural default: uncaught exceptions should be passed back to the requesting actor for handling. And that is exactly what JActor does. … more
  5. A Bi-Modal Iterator for JActor
    Loops are usually just a while loop with a hasNext() method in the condition and a next() method in the body. But when the response to these methods is asynchronous the loop fails, because the response is not received until after the while loop has completed. …more
  6. The Simple Machines of JActor
    When multiple requests must be sent to other actors in the course of processing a request, the code can become quite muddled by the use of anonymous classes used to implement the callbacks for processing the responses of those requests. … more
  7. JActor Factories
    The JAFactory actor binds actor type names to actor factories, allowing type names to be used in place of class names for serialization/deserialization. … more

 

Slides

 

Actors in the Small

 

Code Examples

Home Products JActor
  • Loading...

    Loading...

    Login

    Register | Lost password?

    Register

    A password will be mailed to you. Log in | Lost password?

    Retrieve password

    A confirmation mail will be sent to your e-mail address. Log in | Register
  • Powered by WebMoods