Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET, JSON, Embedded, Free Commercial-Use data management solution? What to do? [closed]

I am trying to develop a data management solution for a commercial product that meets several criteria. The criteria and my reasoning are as follows:

  1. The solution should be in C# or support C#
  2. Manage data as JSON
  3. No external schema maintenance
  4. Be able to cache some or all data in memory and persist to disk
  5. Not require an additional installation
  6. If the solution involves third-party software, the license must support no-cost commercial use

Requirement #1: My application is written in C# and I would prefer that any solution does not involve integrating with applications, libraries, or code in another language.

Requirement #2: There are several JSON-based tools and libraries that I would like to utilize, so I need a solution where data is either in or easily converts to/from JSON.

Requirement #3: I want to avoid the schema maintenance that comes with using relational database solutions. I prefer to manage mismatched data-to-object mappings in code and have code update older data instead of managing schema updates separately.

Requirement #4: I require some or all data to be loaded into memory at all times, and all data to be persisted to disk. Whether data persists in memory or not should be optional per data type.

Requirement #5: When installing my product I don't want to have any secondary installations or have any external services running other than my application. A completely self-contained solution is best.

Requirement #6: The intended use is for a distributed commercial product. I would prefer to avoid any additional fees or licensing issues that come with many third-party solutions.

To date I have tried several solutions. Originally I did not have as many constraints and went with a SQLite.NET and its use wasn't unpleasant, but the overhead from schema maintenance and data format was more than I would like. I investigated a lot of NoSQL solutions (such as RavenDB), other third-party solutions (Karvonite), and simple JSON file storage implementations, but I'm not satisfied with any of them.

Is there a custom approach or solution that I am missing, that someone else has used successfully? I'm hoping that I am simply overlooking the option(s) that I am after, and that some NoSQL and .NET experts out there have enough experience in this area to point me in the right direction.

EDIT: In case any original commentators are confused, I updated the question and title to better adhere to SO's policies.

like image 399
jmsb Avatar asked Feb 06 '14 01:02

jmsb


1 Answers

Fluent NHibernate Automapping on top of SQLite would meet all your requirements except edit #2 - "NoSQL, preferably all data is a JSON document"

It automaps a relational DB schema from your object model...does not use JSON. edit You might be able to save JSON data as BLOB, however. (caveat: I know almost nothing about JSON)

like image 112
Tom Bushell Avatar answered Nov 01 '22 11:11

Tom Bushell