Slide 1

Slide 1 text

Sridhar Nanjundeswaran, 10gen [email protected] © Copyright 2010 10gen Inc.

Slide 2

Slide 2 text

Agenda • MongoDB and Windows • Client on Windows • Productions Customers

Slide 3

Slide 3 text

Database on Windows • Installing • Deploying • Monitoring • Known issues • Building

Slide 4

Slide 4 text

MongoDB on Windows • It really works  • Server or client or both can be on Windows

Slide 5

Slide 5 text

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’

Slide 6

Slide 6 text

Installing on windows • Unzip package • Create c:\data\db to use default directory or use –dbpath • Start mongod – c:\\bin\mongod.exe • Same options as in non-Windows environment

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

mongo.exe on windows • All normal options available • Tab completion on the mongo shell works on windows as of 2.0

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Known Issues • --fork does not work • Log rotation does not work on windows • No inbuilt support for running mongos as a windows service

Slide 14

Slide 14 text

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\...

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

Client on Windows • Can connect to server running Windows or other OS’ • Drivers work on Windows (e.g.) • C# • Python • Java • Perl

Slide 17

Slide 17 text

.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

Slide 18

Slide 18 text

.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/

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

@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