https://github.com/ggrandes/figaro
In-process Asynchronous Message System in Java for Event Bus/Actor Model (like Kilim, µJavaActors, Akka,... but very simplified)
https://github.com/ggrandes/figaro
actor-model akka eventbus java kilim
Last synced: 4 months ago
JSON representation
In-process Asynchronous Message System in Java for Event Bus/Actor Model (like Kilim, µJavaActors, Akka,... but very simplified)
- Host: GitHub
- URL: https://github.com/ggrandes/figaro
- Owner: ggrandes
- License: apache-2.0
- Created: 2013-04-22T18:59:18.000Z (about 13 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T09:54:37.000Z (almost 2 years ago)
- Last Synced: 2025-08-23T11:46:18.010Z (10 months ago)
- Topics: actor-model, akka, eventbus, java, kilim
- Language: Java
- Homepage:
- Size: 53.7 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# figaro
In-process Asynchronous Message System in Java for Event Bus/Actor Model (like Kilim, µJavaActors, Akka,... but very simplified). Open Source Java project under Apache License v2.0
### Current Stable Version is [1.0.2](https://search.maven.org/#search|ga|1|g%3Aorg.javastack%20a%3Afigaro)
---
## DOC
#### Usage Example
```java
import org.javastack.figaro.AbstractTalker;
import org.javastack.figaro.GossipMonger;
import org.javastack.figaro.Talker;
import org.javastack.figaro.Whisper;
public class HelloWorld {
public static void main(final String[] args) throws Throwable {
final GossipMonger gossipMonger = GossipMonger.getDefaultInstance();
final Talker recv = new AbstractTalker("dummyReceiver") {
@Override
public void newMessage(final Whisper> whisper) {
System.out.println(getName() + " Receive new whisper: "
+ whisper);
}
};
//
recv.registerListener();
//
gossipMonger.send(new Whisper(recv.getName(), "hello world!"));
//
gossipMonger.shutdown();
}
}
```
* More examples in [Example package](https://github.com/ggrandes/figaro/tree/master/src/main/java/org/javastack/figaro/example/)
---
## MAVEN
Add the dependency to your pom.xml:
org.javastack
figaro
1.0.2
---
## Benchmarks
###### Values are not accurate, but orientative. Higher better. All test Running on Laptop { Windows Vista (32bits), Core 2 Duo 1.4Ghz (U9400), 4GB Ram, Magnetic Disk (WDC-WD5000BEVT-22ZAT0) }.
TalkerType | Msg/s
:--- | ---:
INPLACE UNSYNC | 5.6M
INPLACE SYNC | 2.6M
QUEUED UNBOUNDED | 1.6M
QUEUED BOUNDED(512) | 688K
###### Comparative of Figaro 0.0.4 (queued_unbounded) vs Akka 2.2.0 (unbounded mailbox). Higher better. All test Running on Amazon EC2 { Ubuntu 12.04 LTS (64bits), [CC2.8XLARGE](http://aws.amazon.com/en/ec2/instance-types/#instance-details) (Dual Intel Xeon E5-2670, 8-cores hyperthreading) }.
Threads | 32 | 16 | 8 | 4
:--- | ---: | ---: | ---: | ---:
Akka | 7.6M | 6.6M | 4.1M | 2.6M
Figaro | 12.4M | 14.6M | 5.6M | 3.6M
---
Inspired in [Kilim](http://www.malhar.net/sriram/kilim/) and [μJavaActors](https://github.com/ggrandes/j-javaactors-ibm/), this code is Java-minimalistic version.