万本电子书0元读

万本电子书0元读

顶部广告

Mastering MongoDB 3.x:An expert's guide to building fault-tolerant MongoDB appli电子书

售       价:¥

0人正在读 | 0人评论 9.8

作       者:Alex Giamas

出  版  社:Packt Publishing

出版时间:2017-11-17

字       数:40.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
An expert's guide to build fault tolerant MongoDB applicationAbout This Book·Master the advanced modeling, querying, and administration techniques in MongoDB and become a MongoDB expert·Covers the latest updates and Big Data features frequently used by professional MongoDB developers and administrators·If your goal is to become a certified MongoDB professional, this book is your perfect companionWho This Book Is ForMastering MongoDB is a book for database developers, architects, and administrators who want to learn how to use MongoDB more effectively and productively.If you have experience in, and are interested in working with, NoSQL databases to build apps and websites, then this book is for you.What You Will Learn·Get hands-on with advanced querying techniques such as indexing, expressions, arrays, and more.·Configure, monitor, and maintain highly scalable MongoDB environment like an expert.·Master replication and data sharding to optimize read/write performance.·Design secure and robust applications based on MongoDB.·Administer MongoDB-based applications on-premise or in the cloud·Scale MongoDB to achieve your design goals·Integrate MongoDB with big data sources to process huge amounts of dataIn DetailMongoDB has grown to become the de facto NoSQL database with millions of users—from small startups to Fortune 500 companies. Addressing the limitations of SQL schema-based databases, MongoDB pioneered a shift of focus for DevOps and offered sharding and replication maintainable by DevOps teams. The book is based on MongoDB 3.x and covers topics ranging from database querying using the shell, built in drivers, and popular ODM mappers to more advanced topics such as sharding, high availability, and integration with big data sources.You will get an overview of MongoDB and how to play to its strengths, with relevant use cases. After that, you will learn how to query MongoDB effectively and make use of indexes as much as possible. The next part deals with the administration of MongoDB installations on-premise or in the cloud. We deal with database internals in the next section, explaining storage systems and how they can affect performance. The last section of this book deals with replication and MongoDB scaling, along with integration with heterogeneous data sources. By the end this book, you will be equipped with all the required industry skills and knowledge to become a certified MongoDB developer and administrator.Style and approachThis book takes a practical, step-by-step approach to explain the concepts of MongoDB. Practical use-cases involving real-world examples are used throughout the book to clearly explain theoretical concepts.
目录展开

Title Page

Copyright

Mastering MongoDB 3.x

Credits

About the Author

About the Reviewers

www.PacktPub.com

Why subscribe?

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

MongoDB – A Database for the Modern Web

Web history

Web 1.0

Web 2.0

Web 3.0

SQL and NoSQL evolution

MongoDB evolution

Major feature set for versions 1.0 and 1.2

Version 2

Version 3

Version 3+

MongoDB for SQL developers

MongoDB for NoSQL developers

MongoDB key characteristics and use cases

Key characteristics

What is the use case for MongoDB?

MongoDB criticism

MongoDB configuration and best practices

Operational best practices

Schema design best practices

Best practices for write durability

Best practices for replication

Best practices for sharding

Best practices for security

Best practices for AWS

Reference documentation

MongoDB documentation

Packt references

Further reading

Summary

Schema Design and Data Modeling

Relational schema design

MongoDB schema design

Read-write ratio

Data modeling

Data types

Comparing different data types

Date type

ObjectId

Modeling data for atomic operations

Write isolation

Read isolation and consistency

Modeling relationships

One-to-one

One-to-many, many-to-many

Modeling data for keyword searches

Connecting to MongoDB

Connecting using Ruby

Mongoid ODM

Inheritance with Mongoid models

Connecting using Python

PyMODM ODM

Inheritance with PyMODM models

Connecting using PHP

Doctrine ODM

Inheritance with Doctrine

Summary

MongoDB CRUD Operations

CRUD using the shell

Scripting for the mongo shell

Differences between scripting for the mongo shell and using it directly

Batch inserts using the shell

Batch operations using the mongo shell

Administration

fsync

compact

currentOp/killOp

collMod

touch

MapReduce in the mongo shell

MapReduce concurrency

Incremental MapReduce

Troubleshooting MapReduce

Aggregation framework

SQL to aggregation

Aggregation versus MapReduce

Securing the shell

Authentication and authorization

Authorization with MongoDB

Security tips for MongoDB

Encrypting communication using TLS/SSL

Encrypting data

Limiting network exposure

Firewalls and VPNs

Auditing

Use secure configuration options

Authentication with MongoDB

Enterprise Edition

Kerberos authentication

LDAP authentication

Summary

Advanced Querying

MongoDB CRUD operations

CRUD using the Ruby driver

Creating documents

Read

Chaining operations in find()

Nested operations

Update

Delete

Batch operations

CRUD in Mongoid

Read

Scoping queries

Create, update, and delete

CRUD using the Python driver

Create and delete

Finding documents

Updating documents

CRUD using PyMODM

Creating documents

Updating documents

Deleting documents

Querying documents

CRUD using the PHP driver

Create and delete

Bulk write

Read

Update

CRUD using Doctrine

Create, update, and delete

Read

Best practices

Comparison operators

Update operators

Smart querying

Using regular expressions

Query results and cursors

Storage considerations on delete

Summary

Aggregation

Why aggregation?

Aggregation operators

Aggregation stage operators

Expression operators

Expression Boolean operators

Expression comparison operators

Set expression and array operators

Expression date operators

Expression string operators

Expression arithmetic operators

Aggregation accumulators

Conditional expressions

Other operators

Text search

Variable

Literal

Parsing data type

Limitations

Aggregation use case

Summary

Indexing

Index internals

Index types

Single field indexes

Indexing embedded fields

Indexing embedded documents

Background indexes

Compound indexes

Sorting using compound indexes

Reusing compound indexes

Multikey indexes

Special types of index

Text

Hashed

TTL

Partial

Sparse

Unique

Case-insensitive

Geospatial

Building and managing indexes

Forcing index usage

Hint and sparse indexes

Building indexes on replica sets

Managing indexes

Naming indexes

Special considerations

Using indexes efficiently

Measuring performance

Improving performance

Index intersection

References

Summary

Monitoring, Backup, and Security

Monitoring

What should we monitor?

Page faults

Resident memory

Virtual and mapped memory

Working set

Monitoring memory usage in WiredTiger

Tracking page faults

Tracking B-tree misses

I/O wait

Read and write queues

Lock percentage

Background flushes

Tracking free space

Monitoring replication

Oplog size

Working set calculations

Monitoring tools

Hosted tools

Open source tools

Backups

Backup options

Cloud-based solutions

Backups with file system snapshots

Taking a backup of a sharded cluster

Backups using mongodump

Backups by copying raw files

Backups using queueing

EC2 backup and restore

Incremental backups

Security

Authentication

Authorization

User roles

Database administration roles

Cluster administration roles

Backup restore roles

Roles across all databases

Superuser

Network level security

Auditing security

Special cases

Overview

Summary

Storage Engines

Pluggable storage engines

WiredTiger

Document-level locking

Snapshots and checkpoints

Journaling

Data compression

Memory usage

readConcern

WiredTiger collection-level options

WiredTiger performance strategies

WiredTiger B-tree versus LSM indexes

Encrypted

In-memory

MMAPv1

MMAPv1 storage optimization

Mixed usage

Other storage engines

RocksDB

TokuMX

Locking in MongoDB

Lock reporting

Lock yield

Commonly used commands and locks

Commands requiring a database lock

References

Summary

Harnessing Big Data with MongoDB

What is big data?

Big data landscape

Message queuing systems

Apache ActiveMQ

RabbitMQ

Apache Kafka

Data warehousing

Apache Hadoop

Apache Spark

Spark comparison with Hadoop MapReduce

MongoDB as a data warehouse

Big data use case

Kafka setup

Hadoop setup

Steps

Hadoop to MongoDB pipeline

Spark to MongoDB

References

Summary

Replication

Replication

Logical or physical replication

Different high availability types

Architectural overview

How do elections work?

What is the use case for a replica set?

Setting up a replica set

Converting a standalone server to a replica set

Creating a replica set

Read preference

Write concern

Custom write concern

Priority settings for replica set members

Priority zero replica set members

Hidden replica set members

Delayed replica set members

Production considerations

Connecting to a replica set

Replica set administration

How to perform maintenance on replica sets

Resyncing a member of a replica set

Changing the oplog size

Reconfiguring a replica set when we have lost the majority of our servers

Chained replication

Cloud options for a replica set

mLab

MongoDB Atlas

Replica set limitations

Summary

Sharding

Advantages of sharding

Architectural overview

Development, continuous deployment, and staging environments

Planning ahead on sharding

Sharding setup

Choosing the shard key

Changing the shard key

Choosing the correct shard key

Range-based sharding

Hash-based sharding

Coming up with our own key

Location-based data

Sharding administration and monitoring

Balancing data – how to track and keep our data balanced

Chunk administration

Moving chunks

Changing the default chunk size

Jumbo chunks

Merging chunks

Adding and removing shards

Sharding limitations

Querying sharded data

The query router

Find

Sort/limit/skip

Update/remove

Querying using Ruby

Performance comparison with replica sets

Sharding recovery

Mongos

Mongod process

Config server

A shard goes down

The entire cluster goes down

References

Summary

Fault Tolerance and High Availability

Application design

Schema-less doesn't mean schema design-less

Read performance optimization

Consolidating read querying

Defensive coding

Monitoring integrations

Operations

Security

Enabling security by default

Isolating our servers

Checklists

References

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部