This project is read-only.

Project Description

Transparent Persistence.Net is a simple persistence API that allows generic IDictionary access to your data.

Physical storage is performed Apache Cassandra service in it's current release. Further iterations will allow SQL and memcached based backends.

General Information

  • What are the requirements of including this library in my system?

Bbm.Persistence requires .Net version 2.0. Although untested, it should also with Mono runtime.
Currently only available persistence storage is done through Apache Cassandra - http://cassandra.apache.org/.

For testing purposes, a memory based cache mechanism is provided through the class "MemoryHog". The name represents it's being unable to release any memory, or perform any expiration.
  • How are the values stored in the cache?

Bbm.Persistence comes with a Json.Net based serialization strategy. While keys of the collections are always strings, any objects that can be handled by Json.Net serializers can be stored as values.

Alternative serialization strategies can be provided by implementing ISeriliazationStrategy interface.

Examples

Hello World
static void Main()
{
  var config = new CacheConfiguration(
    new GenericJsonSerializer(), 
    new CassandraStoreFactory("localhost", 9160, "Keyspace1", "Standard1"), 
    null);
  var context = new CacheContext(config);

  var collection = context.Access<string>();
  
  collection["greeting"] = "Hello world";

  Console.WriteLine(collection["greeting"]);
}

Last edited Mar 16, 2010 at 3:26 PM by sukru, version 6