-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Slab is a storage mechanism for a "Simple Flat POJO" == A Java object whose state contains ONLY primitives or fixed size arrays of primitives.
Ideas borrowed from [Martin Thompson] (http://mechanical-sympathy.blogspot.co.uk/2012/10/compact-off-heap-structurestuples-in.html) blog and [Richard Warburton] (https://github.com/RichardWarburton/slab) slab project.
Unlike references above, this slab's emphasis is on providing a simple Collection-like behaviour to a huge number of objects (> Integer.MAX_VALUE) with reasonable performance, flexible storage abstraction and memory efficient management.
This main features in slab are:
- Basic Collection operations (
add
,get
,remove
,iterator
,size
) that work on long keys (Slab maximum size isLong.MAX_VALUE
). - Abstraction of the underlying storage and its access. (No need to commit to either memory type, serialization protocol etc.)
- Management of free gaps in the slab (that are created by removals) and efficient filling of those gaps to avoid fragmentation.
- Using the Flyweight pattern to access data inside the slab.
- Compaction of the slab to reduce consumed memory.
- Ability to control the addresses returned and abstraction of a virtual addressing scheme.
[Introduction] (https://github.com/langera/slab/wiki/Introduction)
[FAQ] (https://github.com/langera/slab/wiki/FAQ)
[Getting Started] (https://github.com/langera/slab/wiki/Example-Code)
[Performance Results] (https://github.com/langera/slab/wiki/Performance-Results)
[Future Work] (https://github.com/langera/slab/wiki/Future-Work)