This release introduces two major features:
- network component to NFSdb, enabling journal replication over TCP/IP with automated multicast discovery.
- java based configuration replaced venerable nfsdb.xml
This nfsdb.xml:
<db>
<journal class="org.nfsdb.examples.model.Quote" defaultPath="quote" timestampColumn="timestamp"
partitionType="MONTH" recordCountHint="1000000" openPartitionTTL="180" lagHours="24" key="sym">
<sym name="sym" indexed="true" maxsize="4" hintDistinctCount="15"/>
<sym name="ex" maxsize="2" hintDistinctCount="1"/>
<sym name="mode" hintDistinctCount="1"/>
</journal>
<journal class="org.nfsdb.examples.model.Price" defaultPath="price" timestampColumn="timestamp"
partitionType="MONTH" recordCountHint="1000000" openPartitionTTL="180" lagHours="24" key="sym">
<sym name="sym" indexed="true" maxsize="4" hintDistinctCount="15"/>
</journal>
</db>
is replaced with this configuration:
public static final JournalConfigurationBuilder CONFIG = new JournalConfigurationBuilder() {{
$(Quote.class)
.partitionBy(PartitionType.MONTH)
.lag(24, TimeUnit.HOURS)
.key("sym")
.$sym("sym").index().size(4).valueCountHint(15)
.$sym("ex").size(2).valueCountHint(1)
.$ts()
;
$(Price.class)
.key("sym")
.partitionBy(PartitionType.MONTH)
.$sym("sym").index().size(4).valueCountHint(15)
.$ts()
;
}};
Changelog:
- added TCP/IP replication
- added java-based configuration
- zero-configuration support for all components to simplify API for light usage.
- API refactoring (simplification) breaks code compatibility with earlier versions. SymbolIndex class is renamed to KVIndex. SymbolIndex.put() is replaced with KVIndex.add()
- Broken binary compatibility with previous versions for Strings. String length now always 4 bytes, which improves performance. Older journals would need to be converted.
- improved index performance
- improved append performance
- revised size calculations to make journals take less space on disk