JActor2 - A Robust Alternative to Threads and Locks

JActor2 is a multi-threaded OO programming model,
inspired by Alan Kay's early thoughts on Objects.
JActor2 is based on asynchronous 2-way messaging with assured responses.
The net result being code that is both simpler and more robust, and hence easier to maintain.

utils - Advanced Java Utilty Classes

org.agilewiki.utils.immutable.collections

Versioning and non-versioning maps of lists based on AA Trees.
AA Trees are simpler to implement than red-black trees (like TreeMap),
but their performance is similar.

Rediculously fast deserialization/reserialization performance is achieved by only deserializing what
is needed and reserializing only what has changed. Thread safety is achieved through the use of
non-polling atomic references to keep queries completely unconstrained.

org.agilewiki.utils.cache

How do you write a cache that can be used across multiple threads?
The class java.util.LinkedHashMap is a pretty good cache, but it is not thread safe.
And adding a bunch of synchronization locks might not be the fastest way to handle caching in a thread-safe way.

The solution provided here is to have a separate cache for each thread for maintaining hard links to a minimum number of references,
but to track all cache entries in a concurrent
weak-valued hash map. If any cache has an entry for a given key,
then the concurrent hash map will have a weak reference to that entry with the same key.
Retrieval then is made against the concurrent hash map while updating the thread's cache to track references accessed by that thread.

The code is lock-free and high performance.

org.agilewiki.utils.ref

Need to work with a collection of weak references? These can become quite large at times if you are depending on a
reference queue for removing empty references because gc may be slow to detect otherwise unreachable references.
This means that you probably should not use a hash map to hold a weak references collection as a hash map only scales up, never down.
The ConcurrentWeakValueMap addresses these issues for you.

Other Projects

I have not listed all of the projects above. Some are quite old, others moderately current.
Here are all the project repositories on GitHub.

AgileWikiDevelopers Group

A Google Group that you are free to join,
AgileWikiDevelopers covers a number of advanced topics,
as well as being a place for me to chat about
what I am working on.