SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
#MongoDB

MongoDB Mojo:
Building a basic Perl app
Stephen Steneker (@stennie)
Community Support Manager, MongoDB
MongoDB is a ___________ database
•  Document oriented
•  Open source
•  High performance
•  Horizontally scalable
•  Full featured
High Performance
•  Written in C++
•  Extensive use of memory-mapped files

i.e. read-through write-through memory caching.
•  Runs nearly everywhere
•  Data serialized as BSON (fast parsing)
•  Full support for primary & secondary indexes
•  Document model = less work
Scalability & Performance

Database Landscape
Memcached
MongoDB

RDBMS

Depth of Functionality
Full Featured
•  Ad Hoc queries
•  Real time aggregation
•  Rich query capabilities
•  Strongly consistent
•  Geospatial features
•  Support for most programming languages
•  Flexible schema
What We Will Build:
•  “Library”: A demo application
–  Users
–  Books
–  Authors
–  Publishers

Photo by Jessica Spengler: http://www.flickr.com/photos/wordridden/6798197508/
What We Will Need:
•  MongoDB
–  http://www.mongodb.org/downloads
•  CPAN Modules:
–  https://metacpan.org/module/Mojolicious::Lite
–  https://metacpan.org/module/MongoDB
Inside the CPAN Distribution: Requirements
•  Moose
•  DateTime
•  Digest::MD5
•  Tie::IxHash
•  XSLoader
•  boolean
Inside the CPAN Distribution: Client
•  MongoDB::MongoClient
–  new in version 0.502 (Nov-2012)
–  “Safe” (write-acknowledged) by default
–  Encapsulates connection and server info
Inside the MongoDB CPAN Distribution: Classes
•  MongoDB::Database
–  Represents a database (namespace) on the MongoDB server
•  MongoDB::Collection
–  Represents a collection (table? kinda) in a database
•  MongoDB::Cursor
–  Retrieves documents (rows? kinda) from a collection
MongoDB Documents
•  Documents live in Collections
•  Documents have no pre-defined schema
•  Documents have key-value pairs, like Perl hashes
•  Documents can have nested structure (arrays and

other documents), like Perl hashes
•  Documents look something like JSON
MongoDB Documents
{
'title': 'Fellowship of the Ring, The',
'author': ObjectId("507ffbb1d94ccab2da652597"),
'language': 'English',
'genre': ['fantasy', 'adventure'],
'publication': {
'name': 'George Allen & Unwin',
'location': 'London',
'date': new Date('21 July 1954'),
}
}
Class Delegation Structure
Documents

MongoDB::Cursor

Application
has()!

MongoDB::Collection
has()!
MongoDB::Database
has()!
MongoDB::MongoClient
Let’s Build It!
Building the Library
Building the Library
Building the Library
Building the Library
Building the Library
Remember the Genres?
{
'title': 'Fellowship of the Ring, The',
'author': ObjectId("507ffbb1d94ccab2da652597"),
'language': 'English',
'genre': ['fantasy', 'adventure'],
'publication': {
'name': 'George Allen & Unwin',
'location': 'London',
'date': new Date('21 July 1954'),
}
}
Building the Library
Building the Library
What’s on CPAN?
•  ODMs (Object Document Mappers)
–  Like ORMs but simpler
Mongoose
•  Based on MongoMapper

from Ruby.
•  MongoDB Docs -->

Moose objects.

http://search.cpan.org/~rodrigo/Mongoose-0.23/ (28-Jan-2013)
MongoDBI
•  Very Perlish
•  Moose-like Syntax

http://search.cpan.org/~awncorp/MongoDBI-0.02/ (17-Oct-2012)
MongoDB::Async
•  Tracks upstream MongoDB Distribution
•  Uses Coro and libev for asynchronous queries
•  (Mostly) drop-in replacement for MongoDB driver

http://search.cpan.org/~nyaknyan/MongoDB-Async-0.503.2/ (22-Dec-2012)
Where to from here?
•  Learn more about MongoDB

–  http://docs.mongodb.org
•  Learn about the MongoDB Perl API

–  https://metacpan.org/module/MongoDB::Tutorial
•  Community support

–  http://stackoverflow.com/tags/mongodb
–  https://groups.google.com/group/mongodb-user
•  MongoDB University

–  http://education.mongodb.com/
#MongoDB

Thank You!
Stephen Steneker
stennie@mongodb.com

(@stennie)

Weitere ähnliche Inhalte

Was ist angesagt?

Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDB
MongoDB
 
Building web applications with mongo db presentation
Building web applications with mongo db presentationBuilding web applications with mongo db presentation
Building web applications with mongo db presentation
Murat Çakal
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql Database
Sudhir Patil
 

Was ist angesagt? (20)

Introduction to MongoDB and CRUD operations
Introduction to MongoDB and CRUD operationsIntroduction to MongoDB and CRUD operations
Introduction to MongoDB and CRUD operations
 
Building Your First MongoDB App ~ Metadata Catalog
Building Your First MongoDB App ~ Metadata CatalogBuilding Your First MongoDB App ~ Metadata Catalog
Building Your First MongoDB App ~ Metadata Catalog
 
Introduction to CouchDB - LA Hacker News
Introduction to CouchDB - LA Hacker NewsIntroduction to CouchDB - LA Hacker News
Introduction to CouchDB - LA Hacker News
 
Mango Database - Web Development
Mango Database - Web DevelopmentMango Database - Web Development
Mango Database - Web Development
 
MongoDB at FrozenRails
MongoDB at FrozenRailsMongoDB at FrozenRails
MongoDB at FrozenRails
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.
 
MongoDB London PHP
MongoDB London PHPMongoDB London PHP
MongoDB London PHP
 
Agile Schema Design: An introduction to MongoDB
Agile Schema Design: An introduction to MongoDBAgile Schema Design: An introduction to MongoDB
Agile Schema Design: An introduction to MongoDB
 
Apache Any23 - Anything to Triples
Apache Any23 - Anything to TriplesApache Any23 - Anything to Triples
Apache Any23 - Anything to Triples
 
Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDB
 
Building web applications with mongo db presentation
Building web applications with mongo db presentationBuilding web applications with mongo db presentation
Building web applications with mongo db presentation
 
MongoDB Israel June Meetup
MongoDB Israel June MeetupMongoDB Israel June Meetup
MongoDB Israel June Meetup
 
Webinar: Building Your First App
Webinar: Building Your First AppWebinar: Building Your First App
Webinar: Building Your First App
 
Building Your First MongoDB App
Building Your First MongoDB AppBuilding Your First MongoDB App
Building Your First MongoDB App
 
Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql Database
 
Introduction to mongo db
Introduction to mongo dbIntroduction to mongo db
Introduction to mongo db
 
Neo4j + MongoDB - SF Graph Database Meetup Group Presentation
Neo4j + MongoDB - SF Graph Database Meetup Group PresentationNeo4j + MongoDB - SF Graph Database Meetup Group Presentation
Neo4j + MongoDB - SF Graph Database Meetup Group Presentation
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDB
 

Andere mochten auch

Tools of the CPAN Ninja
Tools of the CPAN NinjaTools of the CPAN Ninja
Tools of the CPAN Ninja
Aran Deltac
 
Research Report: Cloud Trends in 2011 and beyond
Research Report: Cloud Trends in 2011 and beyondResearch Report: Cloud Trends in 2011 and beyond
Research Report: Cloud Trends in 2011 and beyond
Krishnan Subramanian
 
Perl hosting for beginners - Cluj.pm March 2013
Perl hosting for beginners - Cluj.pm March 2013Perl hosting for beginners - Cluj.pm March 2013
Perl hosting for beginners - Cluj.pm March 2013
Arpad Szasz
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
Aran Deltac
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Paulo Ragonha
 

Andere mochten auch (20)

Modern Perl
Modern PerlModern Perl
Modern Perl
 
DBIC 2 - Resultsets
DBIC 2 - ResultsetsDBIC 2 - Resultsets
DBIC 2 - Resultsets
 
Tools of the CPAN Ninja
Tools of the CPAN NinjaTools of the CPAN Ninja
Tools of the CPAN Ninja
 
Cloud Computing And You
Cloud Computing And YouCloud Computing And You
Cloud Computing And You
 
Artikel Leon Harinck (TriFinance) ControllersMagazine januari 2013: 'Nieuwe w...
Artikel Leon Harinck (TriFinance) ControllersMagazine januari 2013: 'Nieuwe w...Artikel Leon Harinck (TriFinance) ControllersMagazine januari 2013: 'Nieuwe w...
Artikel Leon Harinck (TriFinance) ControllersMagazine januari 2013: 'Nieuwe w...
 
Introduction to using MongoDB with Ruby
Introduction to using MongoDB with RubyIntroduction to using MongoDB with Ruby
Introduction to using MongoDB with Ruby
 
Open Source & Open Cloud: Why License Is Important
Open Source & Open Cloud: Why License Is ImportantOpen Source & Open Cloud: Why License Is Important
Open Source & Open Cloud: Why License Is Important
 
Social Business Case Study - Enterasys Networks
Social Business Case Study - Enterasys NetworksSocial Business Case Study - Enterasys Networks
Social Business Case Study - Enterasys Networks
 
Research Report: Cloud Trends in 2011 and beyond
Research Report: Cloud Trends in 2011 and beyondResearch Report: Cloud Trends in 2011 and beyond
Research Report: Cloud Trends in 2011 and beyond
 
Mojolicious. The web in a box!
Mojolicious. The web in a box!Mojolicious. The web in a box!
Mojolicious. The web in a box!
 
Perl hosting for beginners - Cluj.pm March 2013
Perl hosting for beginners - Cluj.pm March 2013Perl hosting for beginners - Cluj.pm March 2013
Perl hosting for beginners - Cluj.pm March 2013
 
Mojolicious: what works and what doesn't
Mojolicious: what works and what doesn'tMojolicious: what works and what doesn't
Mojolicious: what works and what doesn't
 
Mojolicious on Steroids
Mojolicious on SteroidsMojolicious on Steroids
Mojolicious on Steroids
 
Why Every Tester Should Learn Ruby
Why Every Tester Should Learn RubyWhy Every Tester Should Learn Ruby
Why Every Tester Should Learn Ruby
 
Rails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
Rails-like JavaScript Using CoffeeScript, Backbone.js and JasmineRails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
Rails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
 
Building The Pillars Of Modern Enterprise
Building The Pillars Of Modern EnterpriseBuilding The Pillars Of Modern Enterprise
Building The Pillars Of Modern Enterprise
 
Moose Best Practices
Moose Best PracticesMoose Best Practices
Moose Best Practices
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
 
Mojolicious and REST
Mojolicious and RESTMojolicious and REST
Mojolicious and REST
 

Ähnlich wie MongoDB Mojo: Building a Basic Perl App

mongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputingmongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputing
moeincanada007
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesign
MongoDB APAC
 
OSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB TutorialOSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB Tutorial
Steven Francia
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
rfischer20
 
SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsSDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and models
Korea Sdec
 

Ähnlich wie MongoDB Mojo: Building a Basic Perl App (20)

MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Mondodb
MondodbMondodb
Mondodb
 
mongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputingmongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputing
 
Webinar: Building Your First MongoDB App
Webinar: Building Your First MongoDB AppWebinar: Building Your First MongoDB App
Webinar: Building Your First MongoDB App
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overview
 
Webinar: Building Your First Application with MongoDB
Webinar: Building Your First Application with MongoDBWebinar: Building Your First Application with MongoDB
Webinar: Building Your First Application with MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
No SQL : Which way to go? Presented at DDDMelbourne 2015
No SQL : Which way to go?  Presented at DDDMelbourne 2015No SQL : Which way to go?  Presented at DDDMelbourne 2015
No SQL : Which way to go? Presented at DDDMelbourne 2015
 
NoSQL, which way to go?
NoSQL, which way to go?NoSQL, which way to go?
NoSQL, which way to go?
 
Mongodb intro
Mongodb introMongodb intro
Mongodb intro
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesign
 
MongoDB
MongoDBMongoDB
MongoDB
 
Drop acid
Drop acidDrop acid
Drop acid
 
OSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB TutorialOSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB Tutorial
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsSDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and models
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

MongoDB Mojo: Building a Basic Perl App

  • 1. #MongoDB MongoDB Mojo: Building a basic Perl app Stephen Steneker (@stennie) Community Support Manager, MongoDB
  • 2. MongoDB is a ___________ database •  Document oriented •  Open source •  High performance •  Horizontally scalable •  Full featured
  • 3. High Performance •  Written in C++ •  Extensive use of memory-mapped files i.e. read-through write-through memory caching. •  Runs nearly everywhere •  Data serialized as BSON (fast parsing) •  Full support for primary & secondary indexes •  Document model = less work
  • 4. Scalability & Performance Database Landscape Memcached MongoDB RDBMS Depth of Functionality
  • 5. Full Featured •  Ad Hoc queries •  Real time aggregation •  Rich query capabilities •  Strongly consistent •  Geospatial features •  Support for most programming languages •  Flexible schema
  • 6. What We Will Build: •  “Library”: A demo application –  Users –  Books –  Authors –  Publishers Photo by Jessica Spengler: http://www.flickr.com/photos/wordridden/6798197508/
  • 7. What We Will Need: •  MongoDB –  http://www.mongodb.org/downloads •  CPAN Modules: –  https://metacpan.org/module/Mojolicious::Lite –  https://metacpan.org/module/MongoDB
  • 8. Inside the CPAN Distribution: Requirements •  Moose •  DateTime •  Digest::MD5 •  Tie::IxHash •  XSLoader •  boolean
  • 9. Inside the CPAN Distribution: Client •  MongoDB::MongoClient –  new in version 0.502 (Nov-2012) –  “Safe” (write-acknowledged) by default –  Encapsulates connection and server info
  • 10. Inside the MongoDB CPAN Distribution: Classes •  MongoDB::Database –  Represents a database (namespace) on the MongoDB server •  MongoDB::Collection –  Represents a collection (table? kinda) in a database •  MongoDB::Cursor –  Retrieves documents (rows? kinda) from a collection
  • 11. MongoDB Documents •  Documents live in Collections •  Documents have no pre-defined schema •  Documents have key-value pairs, like Perl hashes •  Documents can have nested structure (arrays and other documents), like Perl hashes •  Documents look something like JSON
  • 12. MongoDB Documents { 'title': 'Fellowship of the Ring, The', 'author': ObjectId("507ffbb1d94ccab2da652597"), 'language': 'English', 'genre': ['fantasy', 'adventure'], 'publication': { 'name': 'George Allen & Unwin', 'location': 'London', 'date': new Date('21 July 1954'), } }
  • 19. Building the Library Remember the Genres? { 'title': 'Fellowship of the Ring, The', 'author': ObjectId("507ffbb1d94ccab2da652597"), 'language': 'English', 'genre': ['fantasy', 'adventure'], 'publication': { 'name': 'George Allen & Unwin', 'location': 'London', 'date': new Date('21 July 1954'), } }
  • 22. What’s on CPAN? •  ODMs (Object Document Mappers) –  Like ORMs but simpler
  • 23. Mongoose •  Based on MongoMapper from Ruby. •  MongoDB Docs --> Moose objects. http://search.cpan.org/~rodrigo/Mongoose-0.23/ (28-Jan-2013)
  • 24. MongoDBI •  Very Perlish •  Moose-like Syntax http://search.cpan.org/~awncorp/MongoDBI-0.02/ (17-Oct-2012)
  • 25. MongoDB::Async •  Tracks upstream MongoDB Distribution •  Uses Coro and libev for asynchronous queries •  (Mostly) drop-in replacement for MongoDB driver http://search.cpan.org/~nyaknyan/MongoDB-Async-0.503.2/ (22-Dec-2012)
  • 26. Where to from here? •  Learn more about MongoDB –  http://docs.mongodb.org •  Learn about the MongoDB Perl API –  https://metacpan.org/module/MongoDB::Tutorial •  Community support –  http://stackoverflow.com/tags/mongodb –  https://groups.google.com/group/mongodb-user •  MongoDB University –  http://education.mongodb.com/