MongoDB is the most famous and loved NoSQL database. It has many features that are easy to handle when compared to conventional RDBMS. These slides contain the basics of MongoDB.
Since its first appearance in 2009, NodeJS has come a long way. Many frameworks have been developed on top of it. These all make our task easy and quick. It is us who need to decide which one to choose? So, here is the list of top 10 NodeJS frameworks that will help you build an awesome application.
In this presentation, Raghavendra BM of Valuebound has discussed the basics of MongoDB - an open-source document database and leading NoSQL database.
----------------------------------------------------------
Get Socialistic
Our website: http://valuebound.com/
LinkedIn: http://bit.ly/2eKgdux
Facebook: https://www.facebook.com/valuebound/
Twitter: http://bit.ly/2gFPTi8
Slidedeck presented at http://devternity.com/ around MongoDB internals. We review the usage patterns of MongoDB, the different storage engines and persistency models as well has the definition of documents and general data structures.
MongoDB is the most famous and loved NoSQL database. It has many features that are easy to handle when compared to conventional RDBMS. These slides contain the basics of MongoDB.
Since its first appearance in 2009, NodeJS has come a long way. Many frameworks have been developed on top of it. These all make our task easy and quick. It is us who need to decide which one to choose? So, here is the list of top 10 NodeJS frameworks that will help you build an awesome application.
In this presentation, Raghavendra BM of Valuebound has discussed the basics of MongoDB - an open-source document database and leading NoSQL database.
----------------------------------------------------------
Get Socialistic
Our website: http://valuebound.com/
LinkedIn: http://bit.ly/2eKgdux
Facebook: https://www.facebook.com/valuebound/
Twitter: http://bit.ly/2gFPTi8
Slidedeck presented at http://devternity.com/ around MongoDB internals. We review the usage patterns of MongoDB, the different storage engines and persistency models as well has the definition of documents and general data structures.
For developers new to MongoDB and Node.js, however, some the common design patterns are very different than those of a RDBMS and traditional synchronous languages. Developers learning these technologies together may find it a bit bewildering. In reality, however, these tools fit perfectly together and enable I high degree of developer productivity and application performance.
This webinar will walk developers through common MongoDB development patterns in Node.js, such as efficiently loading data into MongoDB using MongoDB's bulk API, iterating through query results, and managing simultaneous asynchronous MongoDB queries to provide the best possible application performance. Working Node.js and MongoDB examples will be used throughout the presentation.
Java Persistence Frameworks for MongoDBTobias Trelle
After a short introduction to the MongoDB Java driver we'll have a detailed look at higher level persistence frameworks like Morphia, Spring Data MongoDB and Hibernate OGM with lots of examples.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
Webinar: Building Your First App in Node.jsMongoDB
Node.js is one of the fastest growing and most popular application frameworks today. It offers a set of features that is both useful and challenging to modern web and back-end developer. Most engineers think of it as a cool, simple, and fast application framework that makes iterative development easier.
In this webinar we will talk about how Node.js and MongoDB interact, discuss the best ways to get started, and walk through how to use MongoDB and Node.js in a set of use cases.
Webinar: Building Your First App in Node.jsMongoDB
Node.js is one of the fastest growing and most popular application frameworks today. It offers a set of features that is both useful and challenging to modern web and back-end developer. Most engineers think of it as a cool, simple, and fast application framework that makes iterative development easier.
In this webinar we will talk about how Node.js and MongoDB interact, discuss the best ways to get started, and walk through how to use MongoDB and Node.js in a set of use cases.
Back to Basics Webinar 2 - Your First MongoDB ApplicationJoe Drumgoole
How to build a MongoDB application from scratch in the MongoDB Shell and Python. How to add indexes and use explain to make sure you are using them properly.
One of the strongest points for using a NoSQL database is their focus on distribution — both for replication and sharding. This talks takes a short look at what replication is, why you should use it, and what is so difficult about it. We then take a look at MongoDB’s implementation in general and finally focus on what can go wrong. In a practical demo you see how to find the right balance between performance versus data safety and how to use it in your Java application.
How sitecore depends on mongo db for scalability and performance, and what it...Antonios Giannopoulos
Percona Live 2017 - How sitecore depends on mongo db for scalability and performance, and what it can teach you by Antonios Giannopoulos and Grant Killian
Percona Toolkit for Effective MySQL AdministrationMydbops
Percona Tools are one of most widely tool in MySQL industry. It is used for the effective MySQL administartion and handling complex operational tasks in MySQL.
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...MongoDB
Il s'agit du deuxième webinaire de la série « Retour aux fondamentaux » qui a pour but de vous présenter la base de données MongoDB. Dans ce webinaire, nous vous expliquerons comment créer une application de création de blogs dans MongoDB.
This is sample AWS Cloud formation, in which I am showing, how to invoke AWS Lambda on new item added into S3.
S3 publish message to SNS, then SNS invoke Lambda Function.
This presentation, created by Syed Faiz ul Hassan, explores the profound influence of media on public perception and behavior. It delves into the evolution of media from oral traditions to modern digital and social media platforms. Key topics include the role of media in information propagation, socialization, crisis awareness, globalization, and education. The presentation also examines media influence through agenda setting, propaganda, and manipulative techniques used by advertisers and marketers. Furthermore, it highlights the impact of surveillance enabled by media technologies on personal behavior and preferences. Through this comprehensive overview, the presentation aims to shed light on how media shapes collective consciousness and public opinion.
Collapsing Narratives: Exploring Non-Linearity • a micro report by Rosie WellsRosie Wells
Insight: In a landscape where traditional narrative structures are giving way to fragmented and non-linear forms of storytelling, there lies immense potential for creativity and exploration.
'Collapsing Narratives: Exploring Non-Linearity' is a micro report from Rosie Wells.
Rosie Wells is an Arts & Cultural Strategist uniquely positioned at the intersection of grassroots and mainstream storytelling.
Their work is focused on developing meaningful and lasting connections that can drive social change.
Please download this presentation to enjoy the hyperlinks!
2. Agenda
★ MongoDB Recap
★ How mongoDB works?
★ The _id
★ In n Out of Query Execution.
★ Indexes
★ What is Replication?
★ What is Sharding ?
3. About Us
Amit Thakkar
Tech Blogger @
CodeChutney.in
JavaScript Lover
Working on MEAN Stack
Twitter: @amit_thakkar01
LinkedIn: linkedin.com/in/amitthakkar01
Facebook: facebook.com/amit.thakkar01
Vibhor Kukreja
JavaScript Ninja
Working on MEAN Stack
Twitter: @VibhorKukreja
Email : vibhor.kukreja@intelligrape.com
4. MongoDB Recap
1. No-Sql Database.
2. Installation.
3. Basic CRUD operation.
4. Stores data in JSON.
5. Schemaless.
6. Great Performance.
7. No Joins.
8. Easily scalable.
6. How mongoDB works?
There is a process “mongod” that acts as a database server.
This process attaches itself to a directory with the --dbpath option. The default
dbpath is “/data/db”.
And start listening to a specific port number via --port option.The default port is
27017.
> mongod --dbpath ~/testDB --port 28080
You just need to create the testDB directory before allocating it to the
mongod process.
7.
8. Look what’s inside the created dbpath ?
- /journal
- test.ns // namespace for database
- test.0 // raw data storage files
- test.1 // raw data storage files
But what is this journal directory for?
9. Journal Option
Journal option does a write ahead logging to an ondisk
journal to guarantee write operation. i.e write in memory
and on-disk journal before in the data file. ( Data
Consistency )
Where can we set this option?
There is an configuration file for the mongod process.
> cat /etc/mongodb.conf
10. How to get connected with mongod?
There are two modes to interact with the DB.
1. mongoDB Driver/Plugin
- Node.js (mongoose)
- Grails (GORM)
- Python (pymongo)
2. mongo Shell - supports javascript <3
11. mongo Shell
To connect a mongo shell process with our mongod process, we just have to
specify the port number on which the mongod process is listening.
> mongo --port 28080
To check the status of our mongo server, for a proper analysis we must start
the mongostat process to check the server request/response.
> mongostat --port 28080
12. Yeah !! Our Single instance Server is
Up and Running.
At this point of time , we have just created a single
mongoDB server along with a mongo shell that
interacts with this mongoDB server.
13. The _id
It can be represented as a primary key in an collection.
The mongo _id have few properties like,
It must be unique.
It can store any type of data, except boolean and array.
eg - _id : “intelligrape”
_id : { “company” : “intelligrape” }
_id : 17
_id : true //You can do this, but in this case you can have only two records in this collection
By default it stores ObjectId(“HexString”), and it gives a unique value every time as it is computed with
the help of the following.
● The first 4 bytes representing the seconds
● The next 3 bytes are the machine identifier
● The next 2 bytes consists of process id
● The last 3 bytes are a random counter value
14. _id impact on save() and insert() Query
save( ) - is risky :P
If there is an particular insert key already present in the collection, then it will
replace that old document completely from the collection with the new one.
( without even prompting it :D )
So, it may become risky to use save query in our Applications. Its better to use
the insert() query as it throws “duplicate key error index” error.
15. Importing a document in mongoDB
We can easily import a document in mongoDB. Mongo itself provides a process to
import document.
> mongoimport --db test --port 28080 --type json --collection person < testColl.json
--db defines the database name
--port server port number
--type document type, which is to be import
--collection name of the collection, where insertion is to be done
16. PowerOf2Sizes ( v2.6 +)
What is move and padding in mongoDB storage?
> db.runCommand({ collMod : ”collection_Name”,usePowerOf2Sizes : true })
17. In n Out of Query Execution.
> db.person.find({}).sort({name:1}).skip(2).limit(3);
> db.person.find({}).skip(2).sort({name:1}).limit(3);
> db.person.find({}).limit(3).skip(2).sort({name:1});
What impact does they will make, on the result?
18.
19. Bulk Write Operations ( v2.6+)
Type of bulk operations -
● Ordered
● Unordered
> var bulk = db.person.initializeUnorderedBulkOp();
> bulk.insert( { name : ”Joe” } );
> bulk.insert( { name : ”Tim” } );
> bulk.insert( { name : ”Steve” } );
> bulk.execute();
20. What is an Index?
A data structure that can be used to make certain
queries more efficient.
21.
22. How can we index ?
An index on _id is automatic. For more, ensureIndex :
> db.posts.ensureIndex({“name”:1});
> db.posts.ensureIndex({name: 1, date: ‐1});
> db.posts.ensureIndex({title: 1},{unique: true, sparse:true,dropDups:true});
> db.posts.ensureIndex(...,{background: true});
> db.posts.ensureIndex({“comments.author”: 1});
{“tags”: [“mongodb”, “indexing”], ...}
> db.posts.ensureIndex({“tags”: 1}); // multikey
> db.posts.ensureIndex({“location”: “2d”}); //geospatial
db.post.find({title:”mongo”}).hint({name:1,title:1});
23. What is Replication?
● Replication is the process of synchronizing data across
multiple servers.
● Mongo achieves Replication through Replica Sets
● Replica sets are a form of asynchronous master/slave
replication
● A replica set consists of two or more nodes that are
copies of each other. (i.e.: replicas)
24.
25. Purpose of Replication
● Automated Failover / High Availability
If primary fails then replica set will
attempt to select another member
to become the new primary.
Use heartbeat signal to detect failure
26. ● Distributed Read Load/Read Scaling
By default, the primary node of a replica set is accessed for
all reads and writes.
● Disaster Recovery
So, you have a pool of servers with one primary (the
master) and N secondaries (slaves). If the primarycrashes
or disappears, the other servers will hold an election to
choose a new primary. Arbiter helps to achieve >50 votes
in case of draw.
connectionString = (“mongodb://localhost:37017", replicaSet="s0",w=4,
j=True)
27. Lets Create a Replica Set :P
mkdir -p ~/tempDB/rs1 ~/tempDB/rs2 ~/tempDB/rs3
mongod --replSet m101 --logpath "1.log" --dbpath ~/tempDB/rs1 --port
47017 --fork
mongod --replSet m101 --logpath "2.log" --dbpath ~/tempDB/rs2 --port
47018 --fork
mongod --replSet m101 --logpath "3.log" --dbpath ~/tempDB/rs3 --port
47019 --fork
Seperate mongod processes have been created, lets connect them with
each other.