Share
Embed
Transcript
24 slides
-
Agenda • MongoDB and Windows • Client on Windows •
Productions Customers -
Database on Windows • Installing • Deploying • Monitoring •
Known issues • Building -
MongoDB on Windows • It really works • Server
or client or both can be on Windows -
Database on Windows • Current production release is 2.0 •
Prebuilt binaries for 32 and 64 bit • Released the same time as other OS’ • http://www.mongodb.org/downloads • 64 bit recommended and to be used in production • Windows feature set on par with other OS’ -
Installing on windows • Unzip package • Create c:\data\db to
use default directory or use –dbpath • Start mongod – c:\<install path>\bin\mongod.exe • Same options as in non-Windows environment -
Deploying • Usual mongod deployment best practices still hold •
Always run with replica sets for HA and data safety • Run with journaling • Etc. • Run your database process as a service -
mongod.exe as a windows service • Inbuilt service support in
mongod • --install (uses Local System Account) • --remove • Run as admin in Win7, Win2k8 • Other options • --serviceName • --serviceUser • --servicePassword • Ensure service user has access to dbpath -
mongos.exe as a windows service • No support on mongos.exe
currently • Can run mongos.exe as a service using srvany.exe • https://github.com/sridharn/MongoWindows -
mongo.exe on windows • All normal options available • Tab
completion on the mongo shell works on windows as of 2.0 -
Monitoring on Windows • Task Manager • Quick monitoring •
Memory shows resident not mapped • Perfmon – monitor network, disk i/o etc. • Mongostat.exe • Wireshark can be used for packet level monitoring • http://wiki.wireshark.org/Mongo -
Mongodb on Azure • Current POC • Single instance •
http://www.mongodb.org/display/DOCS/MongoDB +on+Azure • blobs mounted as a cloud drive • Use different blobs for logs and data • Can safely give access to logs without data • RS and Sharding support coming -
Known Issues • --fork does not work • Log rotation
does not work on windows • No inbuilt support for running mongos as a windows service -
Building on windows • Source at http://github.com/mongodb/mongo • Get prebuilt
spidermonkey • https://github.com/dwight/vc2010_js • Install on the same level as mongo • Get prebuilt boost libraries • http://www.mongodb.org/pages/viewpageattachm ents.action?pageId=12157032 • Install on root – actual files are at c:\boost\boost\... -
Building on windows contd. • Build using Visual Studio 2010
• …\mongo\db\db_10.sln • Great for navigating source code • Build using scons • Run the right vcvars.bat • --64 – for 64 builds • Build the c++ driver • scons --mongoclient -
Client on Windows • Can connect to server running Windows
or other OS’ • Drivers work on Windows (e.g.) • C# • Python • Java • Perl -
.Net and MongoDB • Current version is 1.2 • Full
feature C# (.Net) driver from 10gen • Written in C# - built in ODM • Used from C#, VB, Powershell and F# • 2 dlls (Bson and Driver) • Works on Mono • Download • Zip or msi from Language Center • Nuget package available -
.Net and MongoDB contd • Source • www.github.com/mongodb/mongo-csharp-driver • VS2008,
VS2010 solutions • VS2010 solution works in MonoDevelop (on Windows, Linux and OS X) • More info • http://www.mongodb.org/display/DOCS/CSharp+ Language+Center • API Docs – http://api.mongodb.org/csharp/current/ -
Python and MongoDB • Current version is 2.0.1 • Support
for Python 2.4, 2.5, 2.6 and 2.7 • Prebuilt installers at pypi.org for 32 and 64 bit builds • Download appropriate version • Works out of the box including C extensions -
Python and MongoDB contd. • Building C extensions • Need
VS2008 for 2.6 and 2.7 • For 2.4 and 2.5 use MingW • To build 64 bit need full VS (not Express) • More info • API Docs – http://api.mongodb.org/python/current -
Java and MongoDB • Current version is 2.6.5 • Pure
Java driver • ODM – Morphia • Download • 1 jar file • More info • http://www.mongodb.org/display/DOCS/Java+Lan guage+Center • API Docs – http://api.mongodb.org/java/current -
Perl on Windows • Current version is 0.45 • Use
Strawberry perl • To install • cpan inc::Module::install • cpan MongoDB • More info • http://www.mongodb.org/display/DOCS/Perl+Languag e+Center • CPAN site - http://search.cpan.org/~kristina/MongoDB- 0.45/lib/MongoDB.pm -
Production Customers • National Archives • Migrated from SQL Server
to MongoDB • Store asset information • Pattern Builders • Streaming analytics engine (.Net) • On Point Medical Diagnostics • Ultimate Software • HR/Payroll SaaS based (.Net) • Struq -
@mongodb © Copyright 2010 10gen Inc. conferences, appearances, and meetups
http://www.10gen.com/events http://bit.ly/mongofb Facebook | Twitter | LinkedIn http://linkd.in/joinmongo download at mongodb.org We’re Hiring ! [email protected] @snanjund