Skip to end of metadata
Go to start of metadata

Unlike the Client/Server mode where the entire database works on the server side and the client sends commands and data to it, the RemoteHeap allows users to physically separate the StorageEngine from the Heap. Since the StorageEngine and the Heap are ideologically separated, it is not necessary for them to be close to each other. With the RemoteHeap the StorageEngine works on the client side, while the Heap layer works on the server side. The server only holds the heap, i.e. the raw data, while the entire database engine works on the client side.

For example, we can create a StorageEngine that works with remote heap:

    using (IStorageEngine engine = STSdb.FromHeap(new RemoteHeap("host", 7183)))
        ITable<int, string> table = engine.OpenXTable<int, string>("table");
        for (int i = 0; i < 100000; i++)
            table[i] = i.ToString();

The RemoteHeap will internally connect with the specified host and port to a listening HeapServer. On the heap server side we have to start a HeapServer instance:

    IHeap heap = new Heap(new FileStream("test.stsdb4", FileMode.OpenOrCreate));
    HeapServer server = new HeapServer(heap, 7183);

RemoteHeap and HeapServer are only a bridge between the storage engine and heap layers. HeapServer can work with any IHeap implementation, thus providing different heap topologies.

Since the database engine works closer to the client, the user can work with all supported database types, avoiding the limitations of the classic database client/server mode.

NOTE: Our tests show that with the remote heap the database is about 20% faster in write and 40 to 60% faster in read than the equivalent write and read in client/server mode. But keep in mind that the remote heap is still experimental - we release it mostly for demonstration purposes. Probably the model will be changed and developed within the database releases.

Heap    Go to Home    Roadmap

  • No labels