CSharp: All content tagged as CSharp in NoSQL databases and polyglot persistence
The more I scan the NoSQL news around the internet, the more I hear about MongoDB in the Windows environment which seems to be catching up a lot lately (nb this seems somehow inline with MongoDB strategy of becoming the next gen MySQL).
NORM - Making MongoDB mainstream for .NET developers
At this point I discovered a new attempt to create a C# Driver for MongoDB that would allow seamless POCO conversion and LINQ support. The project is called NoRM and it’s the best hope for making MongoDB mainstream for the .NET Community.
- Fredrik Kalseth: ☞ NoSQL: Getting started with MongoDB and NoRM. It was only yesterday, when I told you there are good signs of increased activity in the MongoDB and C# world. ¶
- Personal experience: getting CouchDB 0.11 installed on a MacOS with MacPorts seems to be “mission impossible”. With the help of #couchdb guys on IRC I finally got it working, but only after cleaning up (read removing) MacPorts ¶
Even if according to the ☞ 10gen survey the number of people using MongoDB from or on a Windows environment is pretty small, I continue to see some articles here and there, so I thought that the Windows MongoDB users will benefit from getting a chance to see what have been written so far.
To get you started, I would recommend MongoDB in the Windows Environment which will walk you through the installation phase and introduce a couple of MongoDB libraries. There is also the video embedded below from ☞ Mohammad Azam
The very next thing you’ll probably be interested into is the ☞ current state of MongoDB and C#. Just in case the existing libraries are not in the shape you’d like them to be, you might want to read about the ☞ details of building a MongoDB driver.
As always, if you have some favorite articles, please do not hesitate to share them with the rest of the NoSQL community.
As I said in MongoDB MapReduce tutorial, the best way to validate that you’ve got the basics right about a system is to use some basic code. And this is exactly the idea behind this post: to take a look at a very (very) basic tagging app in InfoGrid and Neo4j.
The code with more details can be found ☞ here.
The Neo4j code was contributed by Mattias Persson from Neo Technology (thanks Mattias).
Note: I couldn’t figure out a way to make the code more readable that this. But you can hover over the code snippets and you’ll get the option to see the original source code.
Here are my notes about the two code snippets above:
- everything in Neo4j must happen inside a transaction even if it’s a graph traversal operation (this gives a very strong Isolation level). The InfoGrid traversal code seem to happen outside the transaction, so it sounds like it supports a more relaxed isolation level (interesting question here is: if traversal would happen inside a transaction, would that isolate it from seeing possible external modifications?)
- InfoGrid’s central element is
MeshObject, while Neo4j has
Relationship. Generally speaking I have found the terminology in InfoGrid a bit more unusual (f.e.
- the Neo4j uses also the
LuceneIndexServicefor indexing both the tag and web resources nodes, but that’s only becaus e the code there makes sure not to duplicate either tags or web resources (i.e. this functionality is not present in the InfoGrid code and I don’t know how that would look like)
- in both cases a relationship gives you access at both its ends. While both InfoGrid and Neo4j documentation speak about bidirectional arcs
Update: The guys from Sones picked up my challenge and they show up their C# implementation on this ☞ post. I have included below the code for reference
Update: I’ve just got another submission from Filament. Code is included below and their original post is ☞ here
I’ve put together a couple of posts that are taking MongoDB for a ride on a Windows environment.
Firstly, you have to install MongoDB. You can use a MongoDB Windows installer ☞ or choose to run it in a virtual machine.
In case you decide to go the first route, you may find this post ☞ useful as it will walk you from getting MongoDB installed on your Windows machine, start using the MongoDB console and then using mongodb-csharp to connect to MongoDB from C#. In case you prefer to jump directly to coding, you should probably check Getting started with MongoDB and C#.
This other post ☞ will show you how to get MongoDB running inside VirtualBox hosted on Windows machine with a Ubuntu 9.10 guest. Then you’ll be able to use Visual Studio and one of the many MongoDB C# libraries to connect to MongoDB.
If instead of C# you’d like to try out MongoDB from F# then you’ll probably like to check this article ☞, which covers some nice features of using the F# dynamic constructs.
Rubyist and Pythonistas have a lot more materials to play with and here are just a few examples:
- Introduction to MongoDB screencast
- MongoDB for Python or Ruby. Your choice
- MongoDB and Ruby with Hashrocket guys
- MongoDB with Kyle Banker
Last, but not least, I couldn’t find anything about Visual Basic and MongoDB :-)!