Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But why? Windows already has ESENT.

That embedded NoSQL database engine is developed and supported by Microsoft. Available since windows 2000, on the phones since 8.0.

The functionality is much more. While you surely can use it as a key-value store, if you need more there’re secondary indices, column schema, multivalued columns, version columns, auto-increment columns, sparse indices, transactions…



Can you point me any tutorial or post that does a walk through on how to use ESENT on UWP applications?

EDIT: I found ManagedESENT and yes there is a way to do it in UWP apps too but API seems like it's from stone-age example:

Api.JetCreateInstance(out instance, "instance");

Api.JetSetSystemParameter(instance, JET_SESID.Nil, JET_param.CircularLog, 1, null);

Api.JetInit(ref instance);


As for the API, I agree that on UWP, it’s too low level.

For desktop platforms, I’ve built my own ORM on top of that: https://esentserialize.codeplex.com/ However, I’m too lazy to port that on Windows Store unless I’m paid for that: the main problem isn’t ESENT, it’s the reflection that I use extensively for serializing/deserialising those records/fields.

Edit: but if you only need key-value storage with both keys and values being blob of bytes, the complete implementation on top of Managed ESENT will be like four pages of C# code.

The main complexity in ESENT isn’t DB initialization. For initialization, you copy-paste DB initialization code from PersistentDictionary or some other sample and forget about that (until much later when you'll be optimizing the DB performance). The hard parts are column schema, index schema, queries, schema upgrades, and also on servers it’s concurrency.


ESENT is a low level API with C interface. It doesn’t matter on which platform you call those API. The differences are negligible. The main one — restriction on which parts of file system are writeable, on UWP you want to place your DB somewhere in ApplicationData.Current.LocalFolder

As for a starting point, I can confirm sample code from there http://lunarfrog.com/blog/extensible-storage-engine works OK with Windows 10 UWP, Visual Studio 2015 Update 1, and ManagedEsent 1.9.3.2 from NuGet. It’s very simple, but it works.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: