working with Mongo Db & MVC - asp.net-mvc

I recently starting working on a project where I am using Mongo Db to interact with an MVC4 web application.
I have limited knowledge of Mongo Db so is there any resources available that come recommended in the context of .net and Mongo? Any books available that are recommended?

I'd suggest you start with the official C# driver from 10gen found here.
There are no books specific to .NET and MongoDB. As the drivers are becoming very similar (as much as possible, yet with variances for specific language/platforms), you should be able to learn from many of the samples available and other resources on the Internet.

I advice this and this, for some of my friends that articles was healpfull.
But when you want to work with mongo - Little MongoDB book is something that you must read.

Related

Neo4j Multi-tenancy

What is the best way to achieve multi-tenancy in neo4j?
I have seen Tinkerpop and Spring Data.
I'm have multiple clients and I would like to store client info in its own database to ensure security.
I do not want to use labels or indexes to solve this problem.
You mention that you've "seen TinkerPop" but I couldn't tell if that meant you've seen it, considered it and dismissed it as a solution here, so apologies if that is the case and I'm not answering your question.
I've successfully used PartitionStrategy (formerly PartitionGraph) from TinkerPop to achieve multi-tenancy in Neo4j (and other graph databases).
You can read more about the approach here in this blog post on the subject.
Neo4j does not support multi-tenant deployments at this time. You can run multiple instances on the same server, each one on a different port.
Alternatively, you can use a managed hosting service like GrapheneDB, which provides secure independent instances. Disclaimer: I work at GrapheneDB.

How to implement data visualization in ruby / ruby on rails using R?

Disclaimer: We're a collection of scientists that are just now getting into python/ruby.
Project summary: We have analytics and usage data from social networking sites that we are using R and Highcharts (via lazy_high_chart gem) to present analytics to users through a website. The user can interact with this data by specifying which and when they want to investigate a social media segment. So the user defines the subject and the website responds with a slew of metrics.
Problem: So far we have been using straight ruby to pull social networking data (one class), send it to the analytics engine (another class), and present it in plotted glory (final class). However, this is all been proof of principle and console driven so it seems inefficient to push it to a site from this start. Should we have started from the ground up with a rails framework and just built the site with all of these analytic engines built into the site? Or...is it better to have this backend pipeline written in ruby that only interfaces with a rails framework trough yet another object?
A suggestion or pointer to a general document that hints on how to integrate backend data crunching with frontend rails would be great.
Your question is basically how to architecture the system, and this is somewhat hard answer since it usually depends on a lot of things: system requirements, application landscape, project planning, skills, etc.
But just looking at the two alternatives you mentioned, I think there's nothing wrong with creating a fresh Rails application, copying your prototype modules into the lib/ directory and connecting things the standard way. You can use rake tasks to keep the console interface you already have. In the end, your setup looks quite similar to a standard web application. (Usually you have a database doing the "data crunching", in your case it is the R engine.)
I don't know any specific documentation about integration Rails with R, but some research about general system integration with Rails should give you a good starting point. (However, this would only be needed if you really want to build two independent systems.)

Using MongoDB for a calendar web app

I have been doing web programming for few years. All this time, I have been using RDBMS. As a side project, I would like to create a web application and would like to use NoSQL. I have never used NoSQL. So I would like to use a NoSQL solution. Web app is going to be a calendar and article list that are going to be shared among a project group. I would be using Ruby on Rails.So would it be fine to use MongoDB for this web app? or do you have any other recommendation?
MongoDB should be fine. I can't think of a particularly compelling reason as to why it'd be superior to an RDBMS or one of the other key-value stores out there for this particular problem, but I can't think of a reason not to use it, either. For a learning project, it should be more than fine.
As far as interfaces go, I'm currently using MongoMapper and am happy with it, and Mongoid is picking up a lot of steam. You can even just use the Mongo driver directly - it's very usable.
Candy looks quite nice as ruby lib. There are other like MongoMapper and Datamapper + do_mongo and likely more.

What's the most productive frontend framework to use with SOLR as the backend?

Want to build a web app using SOLR as the only backend. Most of the data will be stored in SOLR via offline jobs although there is some need for CRUD.
Looking at popular web frameworks today like Rails, Django, web2py etc. despite NoSQL the sweet spot for productivity still seems to be around active record implementations sitting on top of a RDBMS.
What's the best framework, in terms of productivity, for building web apps with SOLR as the backend?
All three of the above answers are great recommendations for development frameworks. I would flip around your question and ask "Which is best web app framework for me", not "which is best with Solr" and make a decision based on your skills, the community that you have around you, and other soft factors. Especially if you are completely agnostic on which way to go.
If you have friends who love Grails and can help you get started, then Grails might be the way to go. Have a Python group that meets regularly? Then Django has a lot to offer. I personally love Rails, and so I would recommend rails. But that is only a recommendation of "What I like" versus "what is best".
The wonderful thing about Solr is how agnostic it is to the front end. It plays nice in so many environments!
The web2py Database Abstraction layer does not support SOLR at this time which means you cannot use the DAL syntax for accessing SOLR and you cannot use automatically generated forms from a SOLR DB schema. Yet you can generate forms using SQLFORM.factory as-if you had a normal relational database and perform the insert/update/select/update into SOLR manually. web2py includes libraries for parsing/writing both JSON and XMl so it will be easy to implement SOLR APIs in few lines of code. If you bring this up on the web2py mailing list we can help with some examples.
EDIT (copied from the answer on the web2py mailing list):
Normally in web2py you define a model
db.define_table('message',Field('body'))
and then web2py generates and processes forms for you:
form=SQLFORM(db.message)
if form.accepts(request.vars):
do_something
In your case you would not use define_table because web2py DAL does
not support SOLR and you cannot generate forms from the schema but you
can install this: http://code.google.com/p/solrpy/
and you can do
#in model
import solr
s = solr.SolrConnection('http://example.org:8083/solr')
#in controller
form=SQLFORM.factory(Field('body'))
if form.accepts(request.vars):
s.add(mody=request.vars.body)
s.commit()
do_something
So the difference is SQLFORM.factory instead of SQLFORM and the extra
line after accepts. That is it.
I would use Sunspot 1.2 and Rails 3.
Sunspot is commonly used as an ActiveRecord extension, but is also designed to be ORM-agnostic. Rails 3 has decoupled ActiveRecord from the framework, making it easy to go entirely ORM-free.
http://outoftime.github.com/sunspot/
By the way , SphinxSearch is a lot faster than solr/lucence and many unique features. Also search accuracy is a lot better comparing from my experience and independent benchmarks.
it have native, very easy python api and it integrates well with web2py.
but it needs a RDBMS tho . I am using it , web2py + sphinxsearch , building an office files search engine.
You can give a try too.
www.sphinxsearch.com

Spiceworks technology

Which technology was used to develop "spiceworks"? Somewhere I found that it was developed on RoR. But what is the back-end technology they use to store data?
Spiceworks stores its information in a sqlite3 database file.
Here are some How-tos from the Spiceworks Community that talk about interesting ways to get at the data directly.
http://community.spiceworks.com/search?query=sqlite&tab=how_tos

Resources