We just launched Siaqodb 4.0 as BETA version. This new version brings again some cool features:

  • Document database features
  • Portable Class Library(PCL) support and unify assemblies( no more sync/async assemblies, no more trial assemblies)
  • Nuget packages for all platforms
  • Azure Mobile Services – synchronization with local Siaqodb database

DocumentDB support…yes Siaqodb has now features from document databases; this feature was demanded by our customers and also we consider will bring a lot of value to Siaqodb. Now a certain property/field may be stored as a Document(concept from Document Databases) – full object graph is stored together as a unit/snapshot. To use this feature you have to mark a property/field with [Sqo.Attributes.Document] attribute or to add via SiaqodbConfigurator class.
Example:

class Customer
{
....
[Document]
public Invoice TheInvoice{get;set;}
}

Important to notice is that serialization engine of a Document is plug-able, so you can use Protocol Buffers, BSON, MsgPack or any other serialization engines. We stronlgy recommend to use Protocol Buffers due to availability of Protobuf-NET project which runs on almost all platforms Siaqodb runs; from our tests is fastest serializer for .NET and also have a compact size.
To set your desired serialization plugin you have to implement IDocumentSerializer interface and set it via SiaqodbConfigurator.SetDocumentSerializer(…)
Examples of plugins:

//serialization plugin using protobuf-net

        public class ProtoBufSerializer : IDocumentSerializer
        {

            #region IDocumentSerializer Members

            public object Deserialize(Type type, byte[] objectBytes)
            {
                using (MemoryStream ms = new MemoryStream(objectBytes))
                {
                    return ProtoBuf.Serializer.NonGeneric.Deserialize(type, ms);
                }
            }

            public byte[] Serialize(object obj)
            {
                using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
                {
                    ProtoBuf.Serializer.NonGeneric.Serialize(ms, obj);
                    return ms.ToArray();
                }
            }

            #endregion
        }

        //serialization plugin using BSON
        public class BSONSerializer : IDocumentSerializer
        {
            #region IDocumentSerializer Members
            readonly Newtonsoft.Json.JsonSerializer serializer = new Newtonsoft.Json.JsonSerializer();
            public object Deserialize(Type type, byte[] objectBytes)
            {
                using (MemoryStream ms = new MemoryStream(objectBytes))
                {
                    var jsonTextReader = new Newtonsoft.Json.Bson.BsonReader(ms);
                    return serializer.Deserialize(jsonTextReader, type);
                }
            }

            public byte[] Serialize(object obj)
            {
                using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
                {
                    var writer = new Newtonsoft.Json.Bson.BsonWriter(ms);
                    serializer.Serialize(writer, obj);

                    return ms.ToArray();
                }
            }

            #endregion
        }

Example to set the document serialization plugin:

SiaqodbConfigurator.SetDocumentSerializer(new ProtoBufSerializer());

See how it works in our example project.

About PCL support: you can build now only one PCL DataLayer assembly and use it everywhere without recompilation, this brings a lot of benefits when developing cross platform solutions.
Take a look on our examples project.

Nuget, yes we published¬†Nuget packages¬†so it’s very easy to integrate it in your projects with VisualStudio or XamarinStudio.

Azure Mobile Services Sync: We enable now to use Azure Mobile Services even when the device is offline by giving possibility to Synchronize a Siaqodb local database with a server side database using Azure Mobile Services. We will dedicate another blog post for this. If you are eager to test take a look on our examples projects and tutorial to setup it.

PS:This version is in BETA for now so we do not recommend to use in production yet.

Would be great to hear feedback about new features!