Tikal Fuse Day   Access Layer Implementation (C#) Based On Mongo Db
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Tikal Fuse Day Access Layer Implementation (C#) Based On Mongo Db






Total Views
Views on SlideShare
Embed Views



2 Embeds 21

http://www.slideshare.net 20
http://demo.tikalk.org 1



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Tikal Fuse Day Access Layer Implementation (C#) Based On Mongo Db Presentation Transcript

  • 1. Tikal Fuse Day Access layer implementation (C#) based on MongoDB Session leaders: Michael Lvov & Igor Zelmanovich
  • 2. Agenda
    • Session ambition  
    • Session prerequisites
    • Motivation
    • MongoDB - document-oriented database
    • MongoDB Dot.Net driver
    • C# examples: Create DB and Insert data
    • C# examples: Queries
    • BlogEngine.NET
  • 3. Session ambition  
    • Implement Data Access layer based on MongoDB and integrate it into BlogEngine.NET project
  • 4. Session prerequisites 
    • Visual Studio 2008
    • MongoDB server (http://www.mongodb.org/display/DOCS/Downloads)
    • MongoDB C# driver (http://github.com/samus/mongodb-csharp/downloads)
    • BlogEngine.NET (v 1.6) source code and binaries from CodePlex (http://blogengine.codeplex.com/releases/view/39387)
    • Github account for getting write access to repository
  • 5. Motivation 
    • Modern projects need to manipulate with huge data amount, as result the necessity of high scalability and  high performance is very actual and always grows
    • RDBMS databases cannot supply ultimate solution and alternative concepts like in NoSQL systems look very interesting
    • Key-value stores like Google Big Table or Cassandra that provide fast and extremely large-scale solution but you can forget the comfort work with SQL queries like in RDBMS databases.    
  • 6. MongoDB - document-oriented database
    • Document-oriented databases combine between advantages of DBMS databases and key-values stores
    • MongoDB is a scalable, high-performance, schema-free document-oriented DB, supports dynamic queries in JSON-style format, indexes, replication, sharding, MapReduce.
    • Development by commercial company as open-source project written in C++. There are a lot of documentation, tutorials and samples on project site. 
    • Interface based on native drivers that exist for most environments: C, C++,Java,Python,Ruby...
  • 7. MongoDB Dot.Net driver
    • Mongodb-csharp
    • Open-source project
    • Written in C#
    • Support Mono
    • LINQ support
  • 8. C# examples: Create DB and Insert data
    • Mongo mongo = new Mongo();
    • mongo.Connect();
    • IMongoCollection postsTbl = mongo.getDB("BlogDB").GetCollection("Posts");
    • Document post = new Document();
    • post["Tittle"] = "Tittle1";
    • post["Timestamp"] = DateTime.Now;
    • postsTbl.Insert(post);
  • 9. C# examples: Queries
    • Document spec = new Document();
    • spec["Tittle"] = "Tittle1";
    • Document myPost = postsTbl.FindOne(spec);
    • or with LINQ
    • IMongoQuery query = postsTbl.AsQueryable();
    • var docs = query.Where(doc => doc["Tittle"] == "Tittle 1");
  • 10. BlogEngine.NET
    • Open source .NET blogging project
    • Very easy to setup and customize
    • Layers separation
    • DataAccess customization – only implement well-defined data provider interface
  • 11. Q & A