CouchDB : The Definitive Guide (1ST)

個数:
  • ポイントキャンペーン

CouchDB : The Definitive Guide (1ST)

  • 提携先の海外書籍取次会社に在庫がございます。通常2週間で発送いたします。
    重要ご説明事項
    1. 納期遅延や、ご入手不能となる場合が若干ございます。
    2. 複数冊ご注文の場合、分割発送となる場合がございます。
    3. 美品のご指定は承りかねます。
  • ≪洋書のご注文につきまして≫ 「海外取次在庫あり」および「国内仕入れ先からお取り寄せいたします」表示の商品でも、納期の目安期間内にお届けできないことがございます。あらかじめご了承ください。

  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 245 p.
  • 言語 ENG,ENG
  • 商品コード 9780596155896
  • DDC分類 005.74

Full Description


This book introduces you to Apache CouchDB, a document-oriented database that offers a different way to model your data. CouchDB is a schema-free database, designed to work with applications that handle document-based information such as contacts, invoices, and receipts. In "CouchDB: The Definitive Guide", three of the core developers gently explain how to work with CouchDB, using clear and practical scenarios. Each chapter showcases key features, such as simple document CRUD (create, read, updated, delete), advanced MapReduce, and deployment tuning for performance and reliability. With this book, you will: understand the basics of document-based storage and manipulation; model data as self-contained JSON documents; manage basic document CRUD; handle evolving data naturally; query and aggregate data in CouchDB, using MapReduce views; replicate data between nodes; and, carry out deployment tuning for performance and reliability. This is the only book available on CouchDB.

Table of Contents

Foreword                                           xv
Preface xvii
Part I. Introduction
1. WhyCouchDB? 3
Relax 3
A Different Way to Model Your Data 4
A Better Fit for Common Applications 5
Self-Contained Data 5
Syntax and Semantics 6
Building Blocks for Larger Systems 6
CouchDB Replication 8
Local Data Is King 8
Wrapping Up 9
2. Eventual Consistency 11
Working with the Grain 11
The CAP Theorem 12
Local Consistency 13
The Key to Your Data 13
No Locking 14
Validation 15
Distributed Consistency 16
Incremental Replication 16
Case Study 17
Wrapping Up 20
3. Getting Started 21
All Systems Are Go! 21
Welcome to Futon 23
Your First Database and Document 24
Running a Query Using MapReduce 27
Triggering Replication 31
Wrapping Up 32
4. The Core API 33
Server 33
Databases 34
Documents 38
Revisions 39
Documents in Detail 40
Replication 42
Wrapping Up 44
Part II. Developing with CouchDB
5. Design Dominants 47
Document Modeling 47
The Query Server 48
Applications Are Documents 48
A Basic Design Document 51
Looking to the Future 52
6. Riding Your Data with Views 53
What Is a View? 53
Efficient Lookups 56
Find One 56
Find Many 57
Reversed Results 58
The View to Get Comments for Posts 59
Reduce/Rereduce 61
Lessons Learned 64
Wrapping Up 64
7. Yalta ion Function 67
Document Validation Functions 67
Validation's Context 69
Writing One 69
Type 69
Required Fields 71
Timestamps 72
Authorship 73
Wrapping Up 73
8. Slow Functions 75
The Show Function API 76
Side Effect-Free 77
Design Documents 78
Querying Show Functions 78
Design Document Resources 79
Query Parameters 79
Accept Headers 80
Etags 81
Functions and Templates 81
The !json Macro 82
The !code Macro 82
Learning Shows 83
Using Templates 83
Writing Templates 85
9. Transforming Views with List Functions 87
Arguments to the List Function 87
An Example List Function 89
List Theory 91
Querying Lists 92
Lists, Etags, and Caching 93
Part III. Example Application
10. Standalone Applications 97
Use the Correct Version 97
Portable JavaScript 98
Applications Are Documents 99
Standalone 100
In the Wild 101
Wrapping Up 108
11. Managing Design Documents 109
Working with the Example Application 109
Installing CouchApp 110
Using CouchApp 110
Download the Sofa Source Code 111
CouchApp Clone 111
ZIP and TAR Files 112
Join the Sofa Development Community on 112
GitHub
The Sofa Source Tree 112
Deploying Sofa 115
Pushing Sofa to Your CouchDB 115
Visit the Application 115
Set Up Your Admin Account 116
Deploying to a Secure CouchDB 117
Configuring CouchApp with .couchapprc 117
12. Storing Documents 119
JSON Document Format 120
Beyond _id and _rev: Your Document Data 122
The Edit Page 123
The HTML Scaffold 124
Saving a Document 125
Validation 128
Save Your First Post 130
Wrapping Up 130
13. Showing Documents In Custom Formats 131
Rendering Documents with Show Functions 132
The Post Page Template 133
Dynamic Dates 134
14. Viewing Lists of Blog Posts 135
Map of Recent Blog Posts 135
Rendering the View as HTML Using List 137
Function
Sofa's List Function 137
The Final Result 141
Part IV. Deploying CouchDB
15. Scaling Basics 145
Scaling Read Requests 146
Scaling Write Requests 146
Scaling Data 147
Basics First 147
16. Replication 149
The Magic 150
Simple Replication with the Admin Interface 150
Replication in Detail 151
Continuous Replication 152
That's It? 152
17. Conflict Management 153
The Split Brain 154
Conflict Resolution by Example 155
Working with Conflicts 158
Deterministic Revision IDs 161
Wrapping Up 161
18. Load Balancing 163
Having a Backup 163
19. Load Balancing 165
Introducing CouchDB Lounge 165
Consistent Hashing 166
Redundant Storage 167
Redundant Proxies 167
View Merging 167
Growing the Cluster 168
Moving Partitions 170
Splitting Partitions 170
Part V. Reference
20. Change Notifications 173
Polling for Changes 174
Long Polling 175
Continuous Changes 176
Filters 177
Wrapping Up 178
21. View Cookbook for SQL Jockeys 179
Using Views 179
Defining a View 179
Querying a View 180
MapReduce Functions 180
Look Up by Key 181
Look Up by Prefix 182
Aggregate Functions 183
Get Unique Values 185
Enforcing Uniqueness 187
22. Security 189
The Admire Party 189
Creating New Admin Users 190
Hashing Passwords 191
Basic Authentication 191
Update Validations Again 192
Cookie Authentication 193
Network Server Security 194
23. High Performance 195
Good Benchmarks Are Non-Trivial 195
High Performance CouchDB 197
Hardware 197
An Implementation Note 197
Bulk Inserts and Mostly Monotonic DocIDs 198
Optimized Examples: Views and Replication 198
Bulk Document Inserts 198
Batch Mode 199
Single Document Inserts 200
Hovercraft 201
Trade-Offs 201
But...My Boss Wants Numbers! 202
A Call to Arms 202
24. Recipes 205
Banking 205
Accountants Don't Use Erasers 205
Wrapping Up 208
Ordering Lists 208
A List of Integers 208
A List of Floats 210
Pagination 211
Example Data 211
A View 212
Setup 213
Slow Paging (Do Not Use) 213
Fast Paging (Do Use) 215
Jump to Page 216
Part VI. Appendixes
A. Installing on Unix-like Systems 219
B. Installing on Mac OS X 221
C. Installing on Windows 223
D. Installing from Source 225
E. JSON Primer 231
F. The Power of B-trees 233
Index 237