Jetlang provides a high-performance Java line libraries, which complements the Java.util.concurrent package in JDK 1.5 and can be used for applications based on concurrent messaging mechanisms. The library does not provide remote messaging capabilities and is designed to implement an in-memory messaging mechanism:
The main features are:
-
All messages to a particular Fiber is delivered sequentially. Components can easily keep state without synchronizing data access or worrying about thread races.
-
Single Fiber interface The Can is backed by a dedicated thread or a thread pool.
-
Supports Single or multiple subscribers for messages.
-
Subscriptions for single events or event batching
-
Single or recurring event scheduling
-
High performance design optimized-latency and high scalability
-
Publishing is the thread safe, allowing easy integration and other threading models.
-
Low lock contention–minimizing Lock contention are critical for performance. Other concurrency solutions is limited by a single lock typically in a central thread pool or message queue. Jetlang is optimized for low lock contention. Without a central bottleneck, performance easily scales to the needs of the application.
Fiber fiber = new ThreadFiber(); fiber.start(); final CountDownLatch latch = new CountDownLatch(2); Runnable toRun = new Runnable(){ public void run(){ latch.countDown(); } }; //enqueue runnable for execution fiber.execute(toRun); //repeat to trigger latch a 2nd time fiber.execute(toRun);latch.await(10, TimeUnit.SECONDS);//shutdown thread fiber.dispose();
Project home:http://www.open-open.com/lib/view/home/1360159040111
Java High Performance line libraries: Jetlang