SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
#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)

Contenu connexe

Tendances

Introduction to MongoDB and CRUD operations
Introduction to MongoDB and CRUD operationsIntroduction to MongoDB and CRUD operations
Introduction to MongoDB and CRUD operationsAnand Kumar
 
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 Cataloghungarianhc
 
Introduction to CouchDB - LA Hacker News
Introduction to CouchDB - LA Hacker NewsIntroduction to CouchDB - LA Hacker News
Introduction to CouchDB - LA Hacker NewsMichael Parker
 
Mango Database - Web Development
Mango Database - Web DevelopmentMango Database - Web Development
Mango Database - Web Developmentmssaman
 
MongoDB at FrozenRails
MongoDB at FrozenRailsMongoDB at FrozenRails
MongoDB at FrozenRailsMike Dirolf
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.Emroz Sardar
 
MongoDB London PHP
MongoDB London PHPMongoDB London PHP
MongoDB London PHPMike Dirolf
 
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 MongoDBStennie Steneker
 
Apache Any23 - Anything to Triples
Apache Any23 - Anything to TriplesApache Any23 - Anything to Triples
Apache Any23 - Anything to TriplesMichele Mostarda
 
Building Your First Application with MongoDB
Building Your First Application with MongoDBBuilding Your First Application with MongoDB
Building Your First Application with MongoDBMongoDB
 
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 presentationMurat Çakal
 
MongoDB Israel June Meetup
MongoDB Israel June MeetupMongoDB Israel June Meetup
MongoDB Israel June MeetupValeri Karpov
 
Webinar: Building Your First App
Webinar: Building Your First AppWebinar: Building Your First App
Webinar: Building Your First AppMongoDB
 
Building Your First MongoDB App
Building Your First MongoDB AppBuilding Your First MongoDB App
Building Your First MongoDB AppHenrik Ingo
 
Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012hungarianhc
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseSudhir Patil
 
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 PresentationWilliam Lyon
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDBStone Gao
 

Tendances (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
 

En vedette

DBIC 2 - Resultsets
DBIC 2 - ResultsetsDBIC 2 - Resultsets
DBIC 2 - ResultsetsAran Deltac
 
Tools of the CPAN Ninja
Tools of the CPAN NinjaTools of the CPAN Ninja
Tools of the CPAN NinjaAran Deltac
 
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...TriFinance Nederland
 
Introduction to using MongoDB with Ruby
Introduction to using MongoDB with RubyIntroduction to using MongoDB with Ruby
Introduction to using MongoDB with RubyJonathan Holloway
 
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 ImportantKrishnan Subramanian
 
Social Business Case Study - Enterasys Networks
Social Business Case Study - Enterasys NetworksSocial Business Case Study - Enterasys Networks
Social Business Case Study - Enterasys NetworksKrishnan Subramanian
 
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 beyondKrishnan Subramanian
 
Mojolicious. The web in a box!
Mojolicious. The web in a box!Mojolicious. The web in a box!
Mojolicious. The web in a box!Anatoly Sharifulin
 
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 2013Arpad Szasz
 
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'tCosimo Streppone
 
Why Every Tester Should Learn Ruby
Why Every Tester Should Learn RubyWhy Every Tester Should Learn Ruby
Why Every Tester Should Learn RubyRaimonds Simanovskis
 
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 JasmineRaimonds Simanovskis
 
Building The Pillars Of Modern Enterprise
Building The Pillars Of Modern EnterpriseBuilding The Pillars Of Modern Enterprise
Building The Pillars Of Modern EnterpriseKrishnan Subramanian
 
Moose Best Practices
Moose Best PracticesMoose Best Practices
Moose Best PracticesAran Deltac
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache CassandraAran 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 JasminePaulo Ragonha
 

En vedette (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
 

Similaire à MongoDB Mojo: Building a Basic Perl App

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBNeil Henegan
 
mongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputingmongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputingmoeincanada007
 
Webinar: Building Your First MongoDB App
Webinar: Building Your First MongoDB AppWebinar: Building Your First MongoDB App
Webinar: Building Your First MongoDB AppMongoDB
 
MongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewMongoDB: a gentle, friendly overview
MongoDB: a gentle, friendly overviewAntonio Pintus
 
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 MongoDBMongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBSean Laurent
 
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 2015Himanshu Desai
 
Mongodb intro
Mongodb introMongodb intro
Mongodb introchristkv
 
Mongo db eveningschemadesign
Mongo db eveningschemadesignMongo db eveningschemadesign
Mongo db eveningschemadesignMongoDB APAC
 
OSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB TutorialOSCON 2012 MongoDB Tutorial
OSCON 2012 MongoDB TutorialSteven Francia
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Railsrfischer20
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 
SDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsSDEC2011 NoSQL concepts and models
SDEC2011 NoSQL concepts and modelsKorea Sdec
 

Similaire à 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
 

Dernier

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 

Dernier (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 

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/