Raviteja Dodda presented on building a location-based backend platform using MongoDB and MongoEngine. He discussed using MongoDB's geospatial indexing and query capabilities to build a check-in rewards app that allows users to check-in to places and earn rewards. He outlined the data models for places, users, check-ins and rewards, and provided examples of geospatial queries to find places and rewards near a given location. Raviteja concluded by encouraging attendees to build their own location-based applications using MongoDB's simple and powerful geospatial features.
Geospatial Indexing and Querying with MongoDBGrant Goodale
油
This document discusses using MongoDB to store and query location data. Key points include:
- MongoDB supports geospatial indexing and querying using Geo2D indexes on location fields.
- Queries like $near, $box, $center, and $polygon allow searching by proximity or within regions.
- Data should be structured with location as an array [long, lat] for spherical queries.
- Scaling involves sharding on a geo field, but has query limitations in MongoDB 1.8.
Webinar: Back to Basics: Thinking in DocumentsMongoDB
油
New applications, users and inputs demand new types of data, like unstructured, semi-structured and polymorphic data. Adopting MongoDB means adopting to a new, document-based data model.
While most developers have internalized the rules of thumb for designing schemas for relational databases, these rules don't apply to MongoDB. Documents can represent rich data structures, providing lots of viable alternatives to the standard, normalized, relational model. In addition, MongoDB has several unique features, such as atomic updates and indexed array keys, that greatly influence the kinds of schemas that make sense.
In this session, Buzz Moschetti explores how you can take advantage of MongoDB's document model to build modern applications.
Relational databases are central to web applications, but they have also been the primary source of pain when it comes to scale and performance. Recently, non-relational databases (also referred to as NoSQL) have arrived on the scene. This session explains not only what MongoDB is and how it works, but when and how to gain the most benefit.
Getting Started with Geospatial Data in MongoDBMongoDB
油
MongoDB supports geospatial data and specialized indexes that make building location-aware applications easy and scalable.
In this session, you will learn the fundamentals of working with geospatial data in MongoDB. We will explore how to store and index geospatial data and best practices for using geospatial query operators and methods. By the end of this session, you should be able to implement basic geolocation functionality in an application.
In this webinar, you will learn:
- Getting geospatial data into MongoDB and how to build geospatial indexes.
- The fundamentals of MongoDB's geospatial query operators and how to design queries that meet the needs of your application.
- Advanced geospatial capabilities with Java geospatial libraries and MongoDB.
Back to Basics Webinar 4: Advanced Indexing, Text and Geospatial IndexesMongoDB
油
This is the fourth webinar of a Back to Basics series that will introduce you to the MongoDB database. This webinar will introduce you to the aggregation framework.
MongoDB is an open source document database, and the leading NoSQL database. MongoDB is a document oriented database that provides high performance, high availability, and easy scalability. It is Maintained and supported by 10gen.
MongoDBs basic unit of storage is a document. Documents can represent rich, schema-free data structures, meaning that we have several viable alternatives to the normalized, relational model. In this talk, well discuss the tradeoff of various data modeling strategies in MongoDB.
MongoDB is a non-relational database that stores data in JSON-like documents with dynamic schemas. It features flexibility with JSON documents that map to programming languages, power through indexing and queries, and horizontal scaling. The document explains that MongoDB uses JSON and BSON formats to store data, has no fixed schema so fields can evolve freely, and demonstrates working with the mongo shell and RoboMongo GUI.
This document discusses MongoDB, a document-oriented NoSQL database. It begins with an introduction to NoSQL databases and their advantages over relational databases. MongoDB is then described in more detail, including its features like storing dynamic JSON documents, indexing, replication, querying and MapReduce capabilities. Examples of CRUD operations on MongoDB documents are provided. The document concludes by discussing when MongoDB may be applicable and who uses it, as well as comparing MongoDB to SQL databases.
The document discusses schema design basics for MongoDB, including terms, considerations for schema design, and examples of modeling different types of data structures like trees, single table inheritance, and many-to-many relationships. It provides examples of creating indexes, evolving schemas, and performing queries and updates. Key topics covered include embedding data versus normalization, indexing, and techniques for modeling one-to-many and many-to-many relationships.
The document provides an overview of MongoDB and how it can be used practically with Ruby projects. It discusses how MongoDB simplifies schema design by allowing embedded documents that match how objects are structured in code. This avoids the need to map objects to SQL schemas. Examples are given of how MongoDB could be used for a blogging application with embedded comments and tags, for logging with capped collections, and for an accounting application with embedded transaction entries. The document also introduces MongoMapper as an ORM for MongoDB that provides an ActiveRecord-like syntax for modeling documents and relationships in Ruby code.
This presentation was given at the LDS Tech SORT Conference 2011 in Salt Lake City. The slides are quite comprehensive covering many topics on MongoDB. Rather than a traditional presentation, this was presented as more of a Q & A session. Topics covered include. Introduction to MongoDB, Use Cases, Schema design, High availability (replication) and Horizontal Scaling (sharding).
Back to Basics Webinar 2: Your First MongoDB ApplicationMongoDB
油
The document provides instructions for installing and using MongoDB to build a simple blogging application. It demonstrates how to install MongoDB, connect to it using the mongo shell, insert and query sample data like users and blog posts, update documents to add comments, and more. The goal is to illustrate how to model and interact with data in MongoDB for a basic blogging use case.
This document is a chapter-by-chapter summary of the book "MongoDB: The Definitive Guide". It covers topics such as getting started with MongoDB, creating, updating and deleting documents, querying, indexing, aggregation, administration, replication and sharding. Example applications discussed include a chemical search engine built with Java, a news aggregator using PHP, a custom form submission application in Ruby, and a real-time analytics application in Python. Additional appendices provide information on installing MongoDB and details about the mongo shell and MongoDB internals.
Back to Basics Webinar 3: Schema Design Thinking in DocumentsMongoDB
油
This is the third webinar of a Back to Basics series that will introduce you to the MongoDB database. This webinar will explain the architecture of document databases.
Back to Basics: My First MongoDB ApplicationMongoDB
油
- The document is a slide deck for a webinar on building a basic blogging application using MongoDB.
- It covers MongoDB concepts like documents, collections and indexes. It then demonstrates how to install MongoDB, connect to it using the mongo shell, and insert documents.
- The slide deck proceeds to model a basic blogging application using MongoDB, creating collections for users, articles and comments. It shows how to query, update, and import large amounts of seeded data.
This document provides an overview of MongoDB administration commands and CRUD operations. It discusses how to select databases, show collections, import/export data, and perform basic CRUD operations like insert, find, update, and remove in MongoDB. It also covers additional find methods like logical operators, array operations, and accessing embedded documents. Methods for updating include $set, $inc, $unset, and multi updates.
This document provides an introduction to MongoDB, including what it is, why it may be used, and how its data model works. Some key points:
- MongoDB is a non-relational database that stores data in flexible, JSON-like documents rather than fixed schema tables.
- It offers advantages like dynamic schemas, embedding of related data, and fast performance at large scales.
- Data is organized into collections of documents, which can contain sub-documents to represent one-to-many relationships without joins.
- Queries use JSON-like syntax to search for patterns in documents, and indexes can improve performance.
Webinar: Building Your First App with MongoDB and JavaMongoDB
油
The document discusses building Java applications that use MongoDB as the database. It covers connecting to MongoDB from Java using the driver, designing schemas for embedded documents and arrays, building Java objects to represent and insert data, and performing basic operations like inserts. The document also mentions using an object-document mapper like Morphia to simplify interactions between Java objects and MongoDB documents.
The document discusses schema design in MongoDB. It explains that MongoDB uses documents rather than tables and rows. Documents can be normalized, with links between separate documents, or denormalized by embedding related data. Embedding is recommended for fast queries but normalized schemas also work well. The document also covers indexing strategies, profiling database performance, and provides examples of schema designs for events, seating, and a feed reader application.
This document contains information about Justin Smestad and MongoDB. It includes Justin's contact information and background working as a software engineer with skills in Ruby, JavaScript, Clojure, and passion for DevOps. It also provides an overview of MongoDB, describing it as a scalable, high-performance, open source, schema-free, document-oriented database. Key features of MongoDB like indexing, master-slave replication, and horizontal scaling with replica sets and sharding are summarized.
This tutorial will introduce the features of MongoDB by building a simple location-based application using MongoDB. The tutorial will cover the basics of MongoDBs document model, query language, map-reduce framework and deployment architecture.
The tutorial will be divided into 5 sections:
Data modeling with MongoDB: documents, collections and databases
Querying your data: simple queries, geospatial queries, and text-searching
Writes and updates: using MongoDBs atomic update modifiers
Trending and analytics: Using mapreduce and MongoDBs aggregation framework
Deploying the sample application
Besides the knowledge to start building their own applications with MongoDB, attendees will finish the session with a working application they use to check into locations around Portland from any HTML5 enabled phone!
TUTORIAL PREREQUISITES
Each attendee should have a running version of MongoDB. Preferably the latest unstable release 2.1.x, but any install after 2.0 should be fine. You can dowload MongoDB at http://www.mongodb.org/downloads.
Instructions for installing MongoDB are at http://docs.mongodb.org/manual/installation/.
Additionally we will be building an app in Ruby. Ruby 1.9.3+ is required for this. The current latest version of ruby is 1.9.3-p194.
For windows download the http://rubyinstaller.org/
For OSX download http://unfiniti.com/software/mac/jewelrybox/
For linux most users should know how to for their own distributions.
We will be using the following GEMs and they MUST BE installed ahead of time so you can be ahead of the game and safe in the event that the Internet isnt accommodating.
bson (1.6.4)
bson_ext (1.6.4)
haml (3.1.4)
mongo (1.6.4)
rack (1.4.1)
rack-protection (1.2.0)
rack shotgun (0.9)
sinatra (1.3.2)
tilt (1.3.3)
Prior ruby experience isnt required for this. We will NOT be using rails for this app.
The document discusses various options for processing and aggregating data in MongoDB, including the Aggregation Framework, MapReduce, and connecting MongoDB to external systems like Hadoop. The Aggregation Framework is described as a flexible way to query and transform data in MongoDB using a JSON-like syntax and pipeline stages. MapReduce is presented as more versatile but also more complex to implement. Connecting to external systems like Hadoop allows processing large amounts of data across clusters.
Building web applications with mongo db presentationMurat akal
油
The document introduces building web applications using MongoDB, a document-oriented database. It discusses MongoDB's data modeling and querying capabilities, including examples of modeling user and location data for a check-in application. The document also covers indexing, insertion, updating, and analytics queries for the sample location and user data models.
The Fine Art of Schema Design in MongoDB: Dos and Don'tsMatias Cascallares
油
Schema design in MongoDB can be an art. Different trade offs should be considered when designing how to store your data. In this presentation we are going to cover some common scenarios, recommended practices and don'ts to avoid based on previous experiences
CosmosDB service is a NoSQL is a globally distributed, multi-model database database service designed for scalable and high performance modern applications. CosmosDB is delivered as a fully managed service with an enterprise grade SLA. It supports querying of documents using a familiar SQL over hierarchical JSON documents. Azure Cosmos DB is a superset of the DocumentDB service. It allows you to store and query noSQL data, regardless of schema. In this presentation, you will learn: How to get started with DocumentDB you provision a new database account. How to index documents How to create applications using CosmosDb (using REST API or programming libraries for several popular language) Best practices designing applications with CosmosDB Best practices creating queries.
Messaging Architectures with NoSQL Databases as Message StoresSrini Penchikala
油
This document summarizes a presentation on using NoSQL databases as message stores with messaging architectures. The presentation introduces common messaging patterns like message store, claim check, and aggregator. It then discusses using Redis, Oracle NoSQL, and MongoDB as message stores and shows examples implementing messaging patterns with Spring Integration using these NoSQL databases. The document includes an architecture diagram and screenshots from demos of a sample application.
This document discusses building progressive web apps with Angular 2. It covers using service workers to enable offline functionality through caching, implementing an app shell architecture for immediate loading, and other features like background syncing and push notifications. The last section describes the Angular Mobile Toolkit for generating starter code and manifest files to help develop progressive web apps.
MongoDBs basic unit of storage is a document. Documents can represent rich, schema-free data structures, meaning that we have several viable alternatives to the normalized, relational model. In this talk, well discuss the tradeoff of various data modeling strategies in MongoDB.
MongoDB is a non-relational database that stores data in JSON-like documents with dynamic schemas. It features flexibility with JSON documents that map to programming languages, power through indexing and queries, and horizontal scaling. The document explains that MongoDB uses JSON and BSON formats to store data, has no fixed schema so fields can evolve freely, and demonstrates working with the mongo shell and RoboMongo GUI.
This document discusses MongoDB, a document-oriented NoSQL database. It begins with an introduction to NoSQL databases and their advantages over relational databases. MongoDB is then described in more detail, including its features like storing dynamic JSON documents, indexing, replication, querying and MapReduce capabilities. Examples of CRUD operations on MongoDB documents are provided. The document concludes by discussing when MongoDB may be applicable and who uses it, as well as comparing MongoDB to SQL databases.
The document discusses schema design basics for MongoDB, including terms, considerations for schema design, and examples of modeling different types of data structures like trees, single table inheritance, and many-to-many relationships. It provides examples of creating indexes, evolving schemas, and performing queries and updates. Key topics covered include embedding data versus normalization, indexing, and techniques for modeling one-to-many and many-to-many relationships.
The document provides an overview of MongoDB and how it can be used practically with Ruby projects. It discusses how MongoDB simplifies schema design by allowing embedded documents that match how objects are structured in code. This avoids the need to map objects to SQL schemas. Examples are given of how MongoDB could be used for a blogging application with embedded comments and tags, for logging with capped collections, and for an accounting application with embedded transaction entries. The document also introduces MongoMapper as an ORM for MongoDB that provides an ActiveRecord-like syntax for modeling documents and relationships in Ruby code.
This presentation was given at the LDS Tech SORT Conference 2011 in Salt Lake City. The slides are quite comprehensive covering many topics on MongoDB. Rather than a traditional presentation, this was presented as more of a Q & A session. Topics covered include. Introduction to MongoDB, Use Cases, Schema design, High availability (replication) and Horizontal Scaling (sharding).
Back to Basics Webinar 2: Your First MongoDB ApplicationMongoDB
油
The document provides instructions for installing and using MongoDB to build a simple blogging application. It demonstrates how to install MongoDB, connect to it using the mongo shell, insert and query sample data like users and blog posts, update documents to add comments, and more. The goal is to illustrate how to model and interact with data in MongoDB for a basic blogging use case.
This document is a chapter-by-chapter summary of the book "MongoDB: The Definitive Guide". It covers topics such as getting started with MongoDB, creating, updating and deleting documents, querying, indexing, aggregation, administration, replication and sharding. Example applications discussed include a chemical search engine built with Java, a news aggregator using PHP, a custom form submission application in Ruby, and a real-time analytics application in Python. Additional appendices provide information on installing MongoDB and details about the mongo shell and MongoDB internals.
Back to Basics Webinar 3: Schema Design Thinking in DocumentsMongoDB
油
This is the third webinar of a Back to Basics series that will introduce you to the MongoDB database. This webinar will explain the architecture of document databases.
Back to Basics: My First MongoDB ApplicationMongoDB
油
- The document is a slide deck for a webinar on building a basic blogging application using MongoDB.
- It covers MongoDB concepts like documents, collections and indexes. It then demonstrates how to install MongoDB, connect to it using the mongo shell, and insert documents.
- The slide deck proceeds to model a basic blogging application using MongoDB, creating collections for users, articles and comments. It shows how to query, update, and import large amounts of seeded data.
This document provides an overview of MongoDB administration commands and CRUD operations. It discusses how to select databases, show collections, import/export data, and perform basic CRUD operations like insert, find, update, and remove in MongoDB. It also covers additional find methods like logical operators, array operations, and accessing embedded documents. Methods for updating include $set, $inc, $unset, and multi updates.
This document provides an introduction to MongoDB, including what it is, why it may be used, and how its data model works. Some key points:
- MongoDB is a non-relational database that stores data in flexible, JSON-like documents rather than fixed schema tables.
- It offers advantages like dynamic schemas, embedding of related data, and fast performance at large scales.
- Data is organized into collections of documents, which can contain sub-documents to represent one-to-many relationships without joins.
- Queries use JSON-like syntax to search for patterns in documents, and indexes can improve performance.
Webinar: Building Your First App with MongoDB and JavaMongoDB
油
The document discusses building Java applications that use MongoDB as the database. It covers connecting to MongoDB from Java using the driver, designing schemas for embedded documents and arrays, building Java objects to represent and insert data, and performing basic operations like inserts. The document also mentions using an object-document mapper like Morphia to simplify interactions between Java objects and MongoDB documents.
The document discusses schema design in MongoDB. It explains that MongoDB uses documents rather than tables and rows. Documents can be normalized, with links between separate documents, or denormalized by embedding related data. Embedding is recommended for fast queries but normalized schemas also work well. The document also covers indexing strategies, profiling database performance, and provides examples of schema designs for events, seating, and a feed reader application.
This document contains information about Justin Smestad and MongoDB. It includes Justin's contact information and background working as a software engineer with skills in Ruby, JavaScript, Clojure, and passion for DevOps. It also provides an overview of MongoDB, describing it as a scalable, high-performance, open source, schema-free, document-oriented database. Key features of MongoDB like indexing, master-slave replication, and horizontal scaling with replica sets and sharding are summarized.
This tutorial will introduce the features of MongoDB by building a simple location-based application using MongoDB. The tutorial will cover the basics of MongoDBs document model, query language, map-reduce framework and deployment architecture.
The tutorial will be divided into 5 sections:
Data modeling with MongoDB: documents, collections and databases
Querying your data: simple queries, geospatial queries, and text-searching
Writes and updates: using MongoDBs atomic update modifiers
Trending and analytics: Using mapreduce and MongoDBs aggregation framework
Deploying the sample application
Besides the knowledge to start building their own applications with MongoDB, attendees will finish the session with a working application they use to check into locations around Portland from any HTML5 enabled phone!
TUTORIAL PREREQUISITES
Each attendee should have a running version of MongoDB. Preferably the latest unstable release 2.1.x, but any install after 2.0 should be fine. You can dowload MongoDB at http://www.mongodb.org/downloads.
Instructions for installing MongoDB are at http://docs.mongodb.org/manual/installation/.
Additionally we will be building an app in Ruby. Ruby 1.9.3+ is required for this. The current latest version of ruby is 1.9.3-p194.
For windows download the http://rubyinstaller.org/
For OSX download http://unfiniti.com/software/mac/jewelrybox/
For linux most users should know how to for their own distributions.
We will be using the following GEMs and they MUST BE installed ahead of time so you can be ahead of the game and safe in the event that the Internet isnt accommodating.
bson (1.6.4)
bson_ext (1.6.4)
haml (3.1.4)
mongo (1.6.4)
rack (1.4.1)
rack-protection (1.2.0)
rack shotgun (0.9)
sinatra (1.3.2)
tilt (1.3.3)
Prior ruby experience isnt required for this. We will NOT be using rails for this app.
The document discusses various options for processing and aggregating data in MongoDB, including the Aggregation Framework, MapReduce, and connecting MongoDB to external systems like Hadoop. The Aggregation Framework is described as a flexible way to query and transform data in MongoDB using a JSON-like syntax and pipeline stages. MapReduce is presented as more versatile but also more complex to implement. Connecting to external systems like Hadoop allows processing large amounts of data across clusters.
Building web applications with mongo db presentationMurat akal
油
The document introduces building web applications using MongoDB, a document-oriented database. It discusses MongoDB's data modeling and querying capabilities, including examples of modeling user and location data for a check-in application. The document also covers indexing, insertion, updating, and analytics queries for the sample location and user data models.
The Fine Art of Schema Design in MongoDB: Dos and Don'tsMatias Cascallares
油
Schema design in MongoDB can be an art. Different trade offs should be considered when designing how to store your data. In this presentation we are going to cover some common scenarios, recommended practices and don'ts to avoid based on previous experiences
CosmosDB service is a NoSQL is a globally distributed, multi-model database database service designed for scalable and high performance modern applications. CosmosDB is delivered as a fully managed service with an enterprise grade SLA. It supports querying of documents using a familiar SQL over hierarchical JSON documents. Azure Cosmos DB is a superset of the DocumentDB service. It allows you to store and query noSQL data, regardless of schema. In this presentation, you will learn: How to get started with DocumentDB you provision a new database account. How to index documents How to create applications using CosmosDb (using REST API or programming libraries for several popular language) Best practices designing applications with CosmosDB Best practices creating queries.
Messaging Architectures with NoSQL Databases as Message StoresSrini Penchikala
油
This document summarizes a presentation on using NoSQL databases as message stores with messaging architectures. The presentation introduces common messaging patterns like message store, claim check, and aggregator. It then discusses using Redis, Oracle NoSQL, and MongoDB as message stores and shows examples implementing messaging patterns with Spring Integration using these NoSQL databases. The document includes an architecture diagram and screenshots from demos of a sample application.
This document discusses building progressive web apps with Angular 2. It covers using service workers to enable offline functionality through caching, implementing an app shell architecture for immediate loading, and other features like background syncing and push notifications. The last section describes the Angular Mobile Toolkit for generating starter code and manifest files to help develop progressive web apps.
OpenPlans informs communities through open source GIS software, open government applications and strategy, and journalism covering urban policy. For data to be actionable, it needs additional context and platforms for participation and collaboration. Data sites can learn from action sites by providing more opportunities for civic engagement through interpretation and participation. Bridging the civic divide involves making civic tasks easier through personal tasks like shopping or transportation. OpenPlans announced OpenBlock, formerly known as EveryBlock Open Source, a civic engagement platform.
Open 311: A Platform for a Participatory Civic InfrastructureOpenPlans
油
Open311 is a platform that aims to create an open standard for civic participation through 311 services. It allows citizens to track and report non-emergency issues to cities through APIs and open data. This increased transparency and engagement from the public. The platform also explores using 311 data and APIs to enable distributed innovation through new workflows where citizens can submit solutions in addition to just reporting problems. Open311 seeks to reimagine how cities can use participatory infrastructure to support emergent action and democratic participation.
RestMQ is a message queue system based on Redis that allows storing and retrieving messages through HTTP requests. It uses Redis' data structures like lists, sets, and hashes to maintain queues and messages. Messages can be added to and received from queues using RESTful endpoints. Additional features include status monitoring, queue control, and support for protocols like JSON, Comet, and WebSockets. The core functionality is language-agnostic but implementations exist in Python and Ruby.
OSDC 2012 | Building a first application on MongoDB by Ross LawleyNETWAYS
油
MongoDB from "humongous" is an open source, non-relational, document-oriented database. Trading off a few traditional features of databases (notably joins and transactions) in order to achieve much better performance, MongoDB is fast, scalable, and designed for web development. The goal of the MongoDB project is to bridge the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide rich queries and deep functionality).
This talk will introduce the features of MongoDB by walking through how one can building a simple location-based application using MongoDB. The talk will cover the basics of MongoDB's document model, query language, map-reduce framework and deployment architecture.
In an R&D company fast prototyping is vital to develop new projects or proofs of concept quickly and inexpensively. In this talk we will demonstrate how real fast and agile development can be achieved with MongoDB and dynamic languages, with examples and best practices. All the code shown is already uploaded to a public Git repository - https://github.com/pablito56/py-eshop
The document discusses MongoDB basics including:
1) Inserting and querying documents using operators like $lt and $in
2) Returning documents through cursors and using projections to select attributes
3) Updating documents using operators like $push, $inc, and $addToSet for bucketing and incrementing counters
4) The tradeoff between durability and performance using different write concerns like acknowledged, journal sync, and replication.
Webinarserie: Einf端hrung in MongoDB: Back to Basics - Teil 3 - Interaktion ...MongoDB
油
The document discusses MongoDB basics including:
1) Inserting and querying documents using operators like $lt and $in
2) Returning documents through cursors and using projections to select attributes
3) Updating documents using operators like $push, $inc, and $addToSet along with bucketing and pre-aggregated reports
It also covers durability options like acknowledged writes and waiting for replication.
This document provides an overview of ActiveRecord and Mongoid object document mappers for Ruby on Rails applications. It describes MongoDB as a scalable and high-performance NoSQL database without transactions or joins. It explains how Mongoid provides a similar API to ActiveRecord but is designed for MongoDB's schemaless and document-based data model. Various Mongoid associations like embeds_many and embedded_in are demonstrated through code examples. Additional MongoDB features through Mongoid like localization, GridFS for file storage, and hybrid ActiveRecord/Mongoid applications are also briefly covered.
This document discusses using MongoDB to build location-based applications. It describes how to model location and check-in data, perform queries and analytics on that data, and deploy MongoDB in both unsharded and sharded configurations to scale the application. Examples of using MongoDB for a location application include storing location documents with name, address, tags, latitude/longitude, and user tips, and user documents with check-in arrays referencing location IDs.
MongoDB, PHP and the cloud - php cloud summit 2011Steven Francia
油
An introduction to using MongoDB with PHP.
Walking through the basics of schema design, connecting to a DB, performing CRUD operations and queries in PHP.
MongoDB runs great in the cloud, but there are some things you should know. In this session we'll explore scaling and performance characteristics of running Mongo in the cloud as well as best practices for running on platforms like Amazon EC2.
What do you mean, Backwards Compatibility?Trisha Gee
油
Lessons learnt developing the new Java driver for MongoDB. This is a totally different version of my backwards compatibility talk, delivered at JFokus.
Building your first application w/mongoDB MongoSV2011Steven Francia
油
This talk will introduce the features of MongoDB by walking through how one can building a simple location-based application using MongoDB. The talk will cover the basics of MongoDB's document model, query language, map-reduce framework and deployment architecture.
Dev Jumpstart: Build Your First App with MongoDBMongoDB
油
This document provides an overview of MongoDB and how to build a simple blogging application with it. It describes MongoDB as a document database where documents are analogous to JSON objects and collections are analogous to tables in a relational database. It demonstrates how to install and run MongoDB, insert sample data for users and blog posts, query the data, and update documents. The document also lists various MongoDB drivers and provides pointers for next steps in learning about data modeling, replication, performance, and scaling in MongoDB.
Advanced Analytics & Statistics with MongoDBJohn De Goes
油
Big data guru John A. De Goes, CTO of Precog, presents an overview of Quirrel, a high-level, statistically-oriented, open source query language designed for advanced analytics and statistics on large-scale JSON data sets. John discusses how the language can be used to solve a variety of common problems encountered by modern application developers, and then overviews ongoing efforts to port the language to MongoDB as part of a pure open source distribution.
Building Your First MongoDB App ~ Metadata Cataloghungarianhc
油
These are the slides I used for a MongoDB webinar about creating your first application with MongoDB. They start with a general MongoDB overview, continuing onto how to model data for a metadata catalog. At this point in the presentation, I break to do a live demonstration. Afterwards, I touch on scaling your application with MongoDB.
Introduction to MongoDB
MongoDB Database
Document Model
BSON
Data Model
CRUD operations
High Availability and Scalability
Replication
Sharding
Hands-On MongoDB
Webinar: General Technical Overview of MongoDB for Dev TeamsMongoDB
油
In this talk we will focus on several of the reasons why developers have come to love the richness, flexibility, and ease of use that MongoDB provides. First we will give a brief introduction of MongoDB, comparing and contrasting it to the traditional relational database. Next, well give an overview of the APIs and tools that are part of the MongoDB ecosystem. Then well look at how MongoDB CRUD (Create, Read, Update, Delete) operations work, and also explore query, update, and projection operators. Finally, we will discuss MongoDB indexes and look at some examples of how indexes are used.
Christian Kvalheim gave an introduction to NoSQL and MongoDB. Some key points:
1) MongoDB is a scalable, high-performance, open source NoSQL database that uses a document-oriented model.
2) It supports indexing, replication, auto-sharding for horizontal scaling, and querying.
3) Documents are stored in JSON-like records which can contain various data types including nested objects and arrays.
Building Your First Application with MongoDBMongoDB
油
- MongoDB is a document database where documents (equivalent to JSON objects) are stored in collections rather than rows in tables.
- It is horizontally scalable, supports rich queries, and works with many programming languages through official drivers.
- To build a simple blog application, documents like users, posts, and comments can be directly inserted into their respective collections without needing to define a schema first. Properties like embedded documents and arrays allow flexible modeling of relationships.
MongoDB.local DC 2018: Tutorial - Data Analytics with MongoDBMongoDB
油
Data analytics can offer insights into your business and help take it to the next level. In this talk you'll learn about MongoDB tools for building visualizations, dashboards and interacting with your data. We'll start with exploratory data analysis using MongoDB Compass. Then, in a matter of minutes, we'll take you from 0 to 1 - connecting to your Atlas cluster via BI Connector and running analytical queries against it in Microsoft Excel. We'll also showcase the new MongoDB Charts product and you'll see how quick, easy and intuitive analytics can be on the MongoDB platform without flattening the data or spending time and effort on complicated and fragile ETL.
Building Your First MongoDB ApplicationRick Copeland
油
This talk will introduce the features of MongoDB by walking through how one can building a simple location-based checkin application using MongoDB. The talk will cover the basics of MongoDB's document model, query language, map-reduce framework and deployment architecture.
This document summarizes lessons learned from building MongoDB and MongoEngine. Some key lessons include: dive in and start contributing to open source projects to help them progress; metclasses are an important tool that allow ORM functionality to be added to classes; not all new ideas are good and it's important to avoid straying too far from existing patterns that users expect; tracking changes at a granular level allows partial updates but adds complexity. Overall it encourages contributors to learn why certain approaches were taken and focus on improving existing designs rather than introducing radical changes.
Building a Location-based platform with MongoDB from Zero.
1. MongoDB Bangalore Conference
Oct 26th 2012
Building a Location-based platform
with MongoDB from Zero
Raviteja Dodda
Co-Founder & CTO, Pipal Tech Ventures
2. DelightCircle
Offers, New Arrivals & Rewards
from 250 + brands and 12,000 +
stores across the country.
Discover whats nearby, Engage
with your favorite brands, and Earn
real rewards.
SMS: @delight to 92431-92431
Website: DelightCircle.com
3. Some highlights
DelightCircle is an app to help you pick out the best deals in the shops around
you, and also hand you points for just walking into them. A must-have for all
ye Android and iOS shopaholics.
ThinkDigit, Sep 2012
DelightCircle is featured as one of the top 6 mobile apps across the country.
NASSCOM Emerge AppFame Aug 2012
DelightCircle is featured by Samsung App Store & Blackberry App World.
Sep, Oct 2012 - present
4. MongoDB & MongoEngine power the
data storage & processing parts of
DelightCircle backend platform
6. Some Examples
The data can be of users.
User = {loc:[12.97,72.023], name:xyz, email:.., ..}
The data can be of local businesses.
Place = {loc:[12.97,72.023], name:mnz, categories:.., ..}
The data can be of Photos.
Photo = {loc:[12.97,72.023], file: File(), taken_by:User(), ..}
and can be many more types,
leading to the next generation of location-based applications.
7. Lets Dive in !
Build the backend for a check-in based rewards app
8. Requirements
Users can check-in to places using the app, and earn
rewards based on check-ins.
Ex: GET 10% OFF on every 2nd check-in.
Rewards can be created by the merchant, and can be assigned
to specific places of his business.
Rewards should be searchable by users based on the
location and some keywords.
9. Why MongoDB ?
Fast, Easy and Schema-less.
Multiple Language Support & Faster development cycle.
Document Object store maps much more cleanly to OOP.
Replica sets/Automatic failover of failed nodes.
Support for Geo-spatial Indexes and Queries.
It cheats to make the math easier/faster by assuming a flat earth
(where 1 degree of latitude or longitude is always the same).
Has methods to handle curvature of Earth (Spherical if needed)
10. MongoDB a database with real
world solutions for real world
problems
Simple to use & flexible.
11. MongoEngine
Python MongoDB
MongoEngine
Document Object Mapper for Python and MongoDB
Built on top of PyMongo &Very similar to popular Django
ORM
Add all your validation stuff in MongoEngine.
$easy_install mongoengine
12. Structuring & indexing your data
depends on the way you want to
query your data
Data modeling differs between use-
cases.
13. Place Reward
Id
Id
[Place-ref] title
name
[{Place-ref,
location (2d- 1 to n
Loc}, {Place-ref,
index)
Loc}, .. ]
tags, etc.
tags, etc.
Place-ref
1 to 1 Check-in
User
Id
Id User-ref
name User-ref Place-ref
email (index) time (index)
mobile 1 to 1 action
Gender
age, etc.
Schema Design
14. Lets start with Places
Place = {
_id: ObjectId(),
loc: [12.97,72.23], //suggested option
name: A,
tags: [food, restaurant]
}
Place= {
_id: ObjectId(),
loc: {x:12.97, y:72.23},
name: A,
tags: [electronics, mobiles]
}
loc: {lon: 40.739, lat:73.992}, ensure that you follow
the same order for consistency.
15. Place Model - MongoEngine
import mongoengine
connect(my_database) // connecting to DB
Class Place(Document):
loc= GeoPointField() // Geo2D index is
automatically created
name = StringField(max_length=50)
tags = ListField(StringField(max_length=300))
P = Place(name=Pizza Hut, loc=[12.97,77.9],
tags=[pizza, restaurant, ..])
p.save() // saves the document to Mongo
16. Some Geospatial Queries
Find the closest 20 places to a given location.
JavaScript Shell
> db.places.find({loc: {$near: [12.62, 72.323]}}).limit(20)
Python (MongoEngine)
Place.objects(loc__near = [12.62, 72.323]).limit(20)
Results are sorted by distance, no need of an additional
sort.
17. Bounds Queries
Find the closest 20 places to a given location that are
within a distance of 5 km.
JavaScript Shell
> db.places.find( { loc : { $near : [12.62,72.323] ,
$maxDistance : 5/earth_radius } } ).limit(20)
Python (MongoEngine)
Place.objects(loc__within__distance =[ [12.62, 72.323],
5/earth_radius]).limit(20)
Results are not sorted by distance, hence faster
18. User & Check-ins data model
User = {
_id: ObjectId(),
name: A,
email: xyz@domain.com, etc.
}
Check-in = {
_id: ObjectId(),
place: { "$ref" : "Places", "$id" : ObjectId()},
user: { "$ref" : Users", "$id" : ObjectId()},
time: ISODate(),
etc.
}
19. Check-ins - MongoEngine
Class Check-in(Document):
user = ReferenceField(Users, required=True),
place = ReferenceField(Places, required=True),
time = DateTimeField(required = True)
meta = {
ordering: [-time],
indexes: [(user, place)]
}
A Compound Index is created on user and place, since
most of our queries will contain both.
20. Rewards data model
Reward = {
_id: ObjectId(),
name: GET 10% OFF .. ,
places: [{ "$ref" : "Places", "$id" : ObjectId()}, { "$ref"
: Places", "$id" : ObjectId()}, .. ]
etc.
}
If you want to query the rewards based on location
Reward = {
_id: ObjectId(),
places: [ { place: { "$ref" : "Places", "$id" :
ObjectId()}, loc: {x:0, y:0}} , .. ]
etc.
}
21. Rewards - MongoEngine
Class Reward(Document):
name = StringField(required=True),
places =
ListField(EmbeddedDocumentField(PlaceLocation)
)
tags = ListField(StringField())
num_checkins_required = IntField(default=1)
Class PlaceLocation(EmbeddedDocument):
place = ReferenceField(Places)
loc = GeoPointField()
22. Find the rewards nearalocation which have tags
food and pizza.
JavaScript Shell
db.Rewards.find({places.loc:{near:[12.62, 72.3]}, tags:
{$all: [food, pizza]}}).limit(20);
Python (MongoEngine)
Reward.objects(places__loc__near =[12.62,72.323],
tags__all = [food, pizza]).limit(20)
You need to have a compound geo-spatial index defined on
both keys together for better performance of the query.
23. Conclusion
1. Spatial is easy and fun on MongoDB !!
2. You can now build your own check-in application (or)
also build your own field data entry system.
3. Running MongoDB on any cloud infrastructure is quite
easy.
PS: WE ARE HIRING looking for smart hackers
Roles: Backend, iOS Developer, UI/UX Designer, etc.
Mail me at (or) come talk to
me.
24. Questions?
Thank You
Stay Hungry, Stay Foolish !!!
- Steve Jobs
raviteja@delightcircle.com
Twitter, Facebook - @raviteja2007
www.DelightCircle.com
Editor's Notes
#2: Implications and Philoshophy of Client-side rendering
#3: Why am I talking about location-based platforms ? Because we built one DelightCircleGet some white color images for Android, iphone, bb, website, and SMSFor businesses, we provide a location-based marketing platform with a powerful CRM backend, and access to Analytics.
#12: Who are the python developers here ? Can I have a raise of hands ?MongoEngine provides the ability to define your documents well, and will validate the document while saving, as mongodb is schema-less.
#13: You can embed the document some times, sometimes you need to refer. It all depends on the use-cases. Dont worry about the normalization pieces in Mongo.
#15: Define the Schema for Users, Rewards as well.
#16: Document is a class of MongoEngine library, and our Place class inherits the Document class. This is the definition of our document.
#17: Place.objects(loc__within_distance = [[12.62, 72.323], 1]).limit(20)Place.objects(loc__near = [12.62, 72.323]).limit(20)Find the closest 20 places to a given location that are within 1 degree of the location.Place.objects(name= Pizza Hut, loc__near = [12.62, 72.323]).limit(20)Find the closest 20 pizza huts near to a given location.
#18: Place.objects(loc__within_distance = [[12.62, 72.323], 1]).limit(20)Place.objects(loc__near = [12.62, 72.323]).limit(20)Find the closest 20 places to a given location that are within 1 degree of the location.Place.objects(name= Pizza Hut, loc__near = [12.62, 72.323]).limit(20)Find the closest 20 pizza huts near to a given location.
#19: Define the Schema for Users, Rewards as well.
#21: Define the Schema for Users, Rewards as well.