NDataStore
I’m listening to Steve Shaughnessey talk about NDataStore, Borland’s .NET native DB server. Some folks might be familiar with JDataStore, Borland’s fast, cheap Java native DB server. Jens Ole Lauridsen took the front end of a Java compiler, removed the byte code emitter, and converted it to emit C# code. Steve and Jens tweaked the conversion until they could build NDataStore from the JDataStore source code. 95% of the source code originates in Java — the remaining 5% is the binding to the .NET environment which is unique to NDataStore and written in C#. The final product is 100% C# and deploys as a single, 1.1 MB DLL.
There’s a second version for .NET Compact Framework which is essentially the same product less fail over, the remote server component, and a few other things which are less useful on a handheld.
JDataStore, NDataStore, and the CF edition of NDataStore use identical file formats. So you can build a DB on Solaris with JDataStore, and copy it onto a handheld device and open it in NDataStore. This is unlike SQL Server’s CE edition, where you can’t even build a DB on a PC. NDataStore is also smaller than SQL Server CE, both in terms of install footprint and DB size.
Steve showed benchmarks comparing the .NET and Java editions and "native" MySQL vs. .NET and Java. He also compared in-process local execution with execution via the remote driver. The tests were performed using a subset of the TPC benchmarks. He first increased MySQL’s low default cache size to a level on par with NDataStore and made MySQL’s sort buffer twice as large as NDataStore. He tried with and without logging with MySQL and left sync_binlog at its default of false, sacrificing guaranteed crash recovery, which should help MySQL’s performance at the cost of data integrity.
Populate DB
Lower numbers are better
45.596 JDataStore local
51.775 NDataStore local
72.284 JDataSore remote
74.117 MySQL (no logging)
105.390 MySQL (with bin logging)
Create Indexes
Lower numbers are better
2.263 JDataStore remote
2.323 NDataStore local
2.754 JDataStore local
14.761 MySQL
16.233 MySQL with Bin logging
TPC-c New Orders
Higher numbers are better
7796 tpm NDataStore Local
6922 tpm JDataStore Local
6631 tpm MySQL (big advantage due to sync_binlog)
6526 tpm MySQL bin logging (big advantage due sync_binlog)
5988 tpm JDataStore Remote
The Java->C# converter also automatically translated all the tests which have been built for JDataStore over the years.
NDataStore inherits all of JDataStore 7’s fault tolerance features, including failover mirroring. JDataStore/NDataStore use a log file, but it’s managed automatically — no administrator is required.
At 5:00 today, Jens Ole Lauridsen will be demonstrating how to use Delphi and C# to write DB triggers, stored procs, and UDFs for NDataStore using both the normal framework and CF.