万本电子书0元读

万本电子书0元读

顶部广告

Mastering MongoDB 4.x电子书

售       价:¥

9人正在读 | 0人评论 9.8

作       者:Alex Giamas

出  版  社:Packt Publishing

出版时间:2019-03-30

字       数:49.5万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Leverage the power of MongoDB 4.x to build and administer fault-tolerant database applications Key Features * Master the new features and capabilities of MongoDB 4.x * Implement advanced data modeling, querying, and administration techniques in MongoDB * Includes rich case-studies and best practices followed by expert MongoDB developers Book Description MongoDB is the best platform for working with non-relational data and is considered to be the smartest tool for organizing data in line with business needs. The recently released MongoDB 4.x supports ACID transactions and makes the technology an asset for enterprises across the IT and fintech sectors. This book provides expertise in advanced and niche areas of managing databases (such as modeling and querying databases) along with various administration techniques in MongoDB, thereby helping you become a successful MongoDB expert. The book helps you understand how the newly added capabilities function with the help of some interesting examples and large datasets. You will dive deeper into niche areas such as high-performance configurations, optimizing SQL statements, configuring large-scale sharded clusters, and many more. You will also master best practices in overcoming database failover, and master recovery and backup procedures for database security. By the end of the book, you will have gained a practical understanding of administering database applications both on premises and on the cloud; you will also be able to scale database applications across all servers. What you will learn * Perform advanced querying techniques such as indexing and expressions * Configure, monitor, and maintain a highly scalable MongoDB environment * Master replication and data sharding to optimize read/write performance * Administer MongoDB-based applications on premises or on the cloud * Integrate MongoDB with big data sources to process huge amounts of data * Deploy MongoDB on Kubernetes containers * Use MongoDB in IoT, mobile, and serverless environments Who this book is for This book is ideal for MongoDB developers and database administrators who wish to become successful MongoDB experts and build scalable and fault-tolerant applications using MongoDB. It will also be useful for database professionals who wish to become certified MongoDB professionals. Some understanding of MongoDB and basic database concepts is required to get the most out of this book.
目录展开

About Packt

Why subscribe?

Packt.com

Contributors

About the author

About the reviewers

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Get in touch

Reviews

Section 1: Basic MongoDB – Design Goals and Architecture

MongoDB – A Database for Modern Web

Technical requirements

The evolution of SQL and NoSQL

The evolution of MongoDB

Major feature set for versions 1.0 and 1.2

Version 2

Version 3

Version 4

MongoDB for SQL developers

MongoDB for NoSQL developers

MongoDB's key characteristics and use cases

Key characteristics

Use cases 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 and 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

Section 2: Querying Effectively

MongoDB CRUD Operations

CRUD using the shell

Scripting for the mongo shell

The 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 and 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

Using 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

Creating and deleting

Finding documents

Updating documents

CRUD using PyMODM

Creating documents

Updating documents

Deleting documents

Querying documents

CRUD using the PHP driver

Creating and deleting

BulkWrite

Read

Updating documents

CRUD using Doctrine

Creating, updating, and deleting

Read

Best practices

Comparison operators

Update operators

Smart querying

Using regular expressions

Querying results and cursors

Storage considerations for the delete operation

Change streams

Introduction

Setup

Using change streams

Specification

Important notes

Production recommendations

Replica sets

Sharded clusters

Summary

Multi-Document ACID Transactions

Background

ACID

Atomicity

Consistency

Isolation

Phantom reads

Non-repeatable reads

Dirty reads

Durability

When do we need ACID in MongoDB ?

Building a digital bank using MongoDB

Setting up our data

Transferring between accounts – part 1

Transferring between accounts – part 2

Transferring between accounts – part 3

E-commerce using MongoDB

The best practices and limitations of multi-document ACID transactions

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

Type conversion operators

Other operators

Text search

Variable

Literal

Parsing data type

Limitations

Aggregation use case

Summary

Indexing

Index internals

Index types

Single field indexes

Dropping indexes

Indexing embedded fields

Indexing embedded documents

Background indexes

Compound indexes

Sorting with compound indexes

Reusing compound indexes

Multikey indexes

Special types of indexes

Text indexes

Hashed indexes

Time to live indexes

Partial indexes

Sparse indexes

Unique indexes

Case-insensitive

Geospatial indexes

2d geospatial indexes

2dsphere geospatial indexes

geoHaystack indexes

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

Further reading

Summary

Section 3: Administration and Data Management

Monitoring, Backup, and Security

Monitoring

What should we monitor?

Page faults

Resident memory

Virtual and mapped memory

Working sets

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 filesystem snapshots

Making a backup of a sharded cluster

Making backups using mongodump

Backing up by copying raw files

Making backups using queuing

EC2 backup and restore

Incremental backups

Security

Authentication

Authorization

User roles

Database administration roles

Cluster administration roles

Backup and 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

Further reading

Summary

MongoDB Tooling

Introduction

MongoDB Atlas

Creating a new cluster

Important notes

MongoDB Cloud Manager

MongoDB Ops Manager

MongoDB Charts

MongoDB Compass

MongoDB Connector for Business Intelligence (BI)

An introduction to Kubernetes

Enterprise Kubernetes Operator

MongoDB Mobile

MongoDB Stitch

QueryAnywhere

Rules

Functions

Triggers

Mobile Sync

Summary

Harnessing Big Data with MongoDB

What is big data?

The big data landscape

Message queuing systems

Apache ActiveMQ

RabbitMQ

Apache Kafka

Data warehousing

Apache Hadoop

Apache Spark

Comparing Spark with Hadoop MapReduce

MongoDB as a data warehouse

A big data use case

Setting up Kafka

Setting up Hadoop

Steps for Hadoop setup

Using a Hadoop to MongoDB pipeline

Setting up Spark to MongoDB

Further reading

Summary

Section 4: Scaling and High Availability

Replication

Replication

Logical or physical replication

Different high availability types

An architectural overview

How do elections work?

What is the use case for a replica set?

Setting up a replica set

Converting a standalone server into a replica set

Creating a replica set

Read preference

Write concern

Custom write concerns

Priority settings for replica set members

Zero priority 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

Re-syncing a member of a replica set

Changing the oplog's 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

Why do we use sharding?

Architectural overview

Development, continuous deployment, and staging environments

Planning ahead with 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

Config server

A shard goes down

The entire cluster goes down

Further reading

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

Further reading

Summary

Other Books You May Enjoy

Leave a review - let other readers know what you think

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部