This project is read-only.

STSdb 4.0

Rating: No reviews yet
Downloads: 10
Released: Nov 8, 2013
Updated: Jan 22, 2014 by ChrisDimitrov
Dev status: Stable Help Icon

Recommended Download

Application STSdb 4.0
application, 1273K, uploaded Jan 22, 2014 - 5 downloads

Other Available Downloads

Source Code STSdb 4.0-source
source code, 430K, uploaded Jan 22, 2014 - 5 downloads

Release Notes

ver. 4.0 (2013-11-08)

INCOMPATIBLE CHANGE: STSdb 4.0 data format is not compatible with W4.0 RC3 build3.
  • new: IData technology - the database can now work directly with the user type. All generated .NET expressions - for compare, serialize, deserialize etc. have been rewritten to work directly with the user types. No more object transformations are needed. This improves the database performance (especially for complex types). Note that in this case the database file may depends from the user types - the engine serializes their full names to rebuild the expressions on engine load.
There are two main scenarios of using the database:
  • If you want to achieve the maximum performance of STSdb 4.0, use OpenXIndex<TKey, TRecord>. We recommended this way if the user types can be distributed with the database file or if the application uses the database as embedded.
  • If you want to keep the database completely independent from your types, use OpenXIndexPortable<TKey, TRecord>() - with the automatically generated transformers.
  • new: database scheme - the IStorageEngine now supports Delete, Rename, Exists for tables.
  • new: nullable types supported.
  • new: IDescriptor now available on each table & file (a small meta-info).
  • new: the user now has the possibility to replace the entire TKey/TRecord generated logic - for compare, serialize & deserialize etc.:
    • KeyType & RecordType
    • KeyComparer & KeyEqualityComparer
    • KeyPersist & RecordPersist
    • KeyIndexerPersist & RecordIndexerPersist (for compression mode)
The database now supports custom comparers, persists etc. The custom logic must be provided immediately after the storage engine was opened, through the table descriptor properties.
  • improved: heap allocation engine; solved database file size. The file is also automatically truncated on engine.Commit().
  • improved: strongly improved delta compression & decompression speed - this affects all integer/float compressions.
  • improved: speed and size with byte[] key/records.
  • improved: engine.Commit()
  • bug fixed: OpenXIndex<TKey, TRecord>() does not work with byte[]
  • bug fixed: in some rare cases Forward()/Backward() methods does not return the records in ascending/descending order
  • bug fixed: the user cannot read 0 bytes from a XFile
  • changed: system & data files are merged into single database file - STSdb.FromFile() now takes one filename parameter.
  • changed: XIndex is renamed to XTable
  • changed: XTable is now thread-safe
  • changed: OpenXTable & OpenXFile now return the same instance for the same name (the previous version always returned new instances).
  • changed: Heap allocation strategies:
    • AllocationStrategy.FromTheCurrentBlock (default)
    • AllocationStrategy.FromTheBeginning - even more effective in size, but affects the performance
  • removed: compressKeys & compressRecords flags. For primitive and linear types the engine uses compression mode; for more complicated types an uncompressed mode is used.
  • removed: Flush() method is no longer available. The tables and files are now automatically flushed on engine.Commit()
  • removed: ~5K lines formal source code (the library is less than 300kb)
  • other: The database now is even more powerfull and intuitive for use. For example:
    using (IStorageEngine engine = STSdb.FromFile("test.stsdb4"))
        ITable<int, Tick> table = engine.OpenXTable<int, Tick>("table");

        for (int i = 0; i < 100000; i++)
            table[i] = new Tick();


	//some record type
	public class Tick
        public string Symbol { get; set; }
        public DateTime Timestamp { get; set; }
        public double Bid { get; set; }
        public double Ask { get; set; }
        public long Volume { get; set; }
        public string Provider { get; set; }
  • other: We also redesigned some of the .NET expressions and now they can be used as general tools, independently from the database. For example, there are public:
    • class Comparer<T> - which generates expressions for fast compare of T instances;
    • class EqualityComparer<T> - which generates expressions for fast equality comparer of T instances;
    • class Persist<T> - which generates expressions for fast serialization/deserialization of T instances.
The last class - Persist<T>, outperforms on both size and speed the .NET BinaryFormatter and the C# port of Google's Protocol Buffers.
We will describe these tools in an STSLabs article.
  • other: added small headers to most of the internal data formats (including the compressions). This should avoid future incompatibilities with the next minor releases.
  • other: starting STSdb 4.0 Developers Guide.
  • other: STSdb W4.0 is now just STSdb 4.0

Overall performance improvements:
  • write speed on sequential keys: +15%
  • read speed on sequential keys: +8%
  • read speed on random keys: +5%
  • database size on random keys: -15% (with the default allocation strategy)

Reviews for this release

No reviews yet for this release.