Archive

Posts Tagged ‘Document Store’

Cashbox for Mobile

May 24th, 2011 Comments off

Cashbox now has a version that runs in WP7. This uses Isolated Storage instead of a file stream for storage and a slightly different JSON serializer that can run without codegen. This approach should work with other mobile platforms using mono once Xamarin has new .NET for platform ready. Setting up your app to use a DocumentSession is really easy.

The API should be the same as the regular build of Cashbox.

Download for fun today! Post any issues on github.

Categories: .NET Tags: , , , , ,

Cashbox v1.0

March 18th, 2011 Comments off

Cashbox 1.0 is ready! For all your document store needs. I think most of the important things are covered nicely in the comments of the code sample below. Know that every 100 writes (store/delete) a temp file is created to compact space. Currently this isn’t configurable but will likely be in the future. Get Cashbox from the “Downloads” button!

Categories: .NET Tags: , , ,

Announcing a Simple NoSQL/Document Store: Cashbox

January 16th, 2011 Comments off

I have been unable to find a completely managed, zero config document store. So I wrote one…

The use case for this is…

  • data only needed in a single process
  • want zero configuration
  • limited amount of data, millions of records will likely become slow
  • want all managed code

If you need something with higher performance, multiple clients, or shared across many processes I would stick with other document stores out there. However, if you needs are simple, here you go. I am releasing this as a v0.9, “works on my box”/RC version. If someone has a need for it, please try it and provide feedback on the Cashbox Github page. Just drop in an issue.

using (Cashbox.DocumentSession session =
               Cashbox.DocumentSessionFactory.Create(storeFilename))
{
	for (int i = 0; i <100; i++)
	{
		string key = i.ToString();
		session.Store<TestDocument>(key, new TestDocument(i));
	} // inserted some records, with a simple numeric key

	session.Delete<TestDocument>(55.ToString()); // delete a record

	session.Retrieve<TestDocument>(55.ToString()); // should be null

	session.Retrieve<TestDocument>(10).IntValue; // should be 10
}
Categories: .NET Tags: , , ,