Redis in action:
Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems. By supporting five different types of data structures, Redis accommodates a wide variety of problems without the conceptual gymnastics required by othe...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Shelter Island, NY
Manning
2013
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Zusammenfassung: | Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems. By supporting five different types of data structures, Redis accommodates a wide variety of problems without the conceptual gymnastics required by other databases |
Beschreibung: | XXV, 293 S. Ill., graph. Darst. |
ISBN: | 9781617290855 1617290858 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV041158382 | ||
003 | DE-604 | ||
005 | 20150206 | ||
007 | t | ||
008 | 130722s2013 ad|| |||| 00||| eng d | ||
020 | |a 9781617290855 |c (pbk.) No price |9 978-1-617290-85-5 | ||
020 | |a 1617290858 |9 1-617290-85-8 | ||
024 | 3 | |a 9781617290855 | |
035 | |a (OCoLC)855548960 | ||
035 | |a (DE-599)BSZ389965502 | ||
040 | |a DE-604 |b ger | ||
041 | 0 | |a eng | |
049 | |a DE-83 |a DE-29T |a DE-860 | ||
082 | 0 | |a 005.7575 | |
084 | |a ST 270 |0 (DE-625)143638: |2 rvk | ||
100 | 1 | |a Carlson, Josiah L. |e Verfasser |4 aut | |
245 | 1 | 0 | |a Redis in action |c Josiah L. Carlson |
264 | 1 | |a Shelter Island, NY |b Manning |c 2013 | |
300 | |a XXV, 293 S. |b Ill., graph. Darst. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
520 | |a Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems. By supporting five different types of data structures, Redis accommodates a wide variety of problems without the conceptual gymnastics required by other databases | ||
650 | 4 | |a Data warehousing | |
650 | 4 | |a Database management | |
650 | 4 | |a Management information systems | |
650 | 4 | |a Open source software | |
650 | 4 | |a Database design | |
650 | 4 | |a Entrepôts de données (Informatique) | |
650 | 4 | |a Bases de données / Conception | |
650 | 4 | |a Bases de données / Gestion | |
650 | 4 | |a Systèmes d'information de gestion | |
650 | 4 | |a Logiciels libres | |
650 | 0 | 7 | |a In-Memory-Datenbank |0 (DE-588)7744803-0 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Datenbankentwurf |0 (DE-588)4127613-9 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Redis |0 (DE-588)1066443475 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a NoSQL-Datenbanksystem |0 (DE-588)7722784-0 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Redis |0 (DE-588)1066443475 |D s |
689 | 0 | 1 | |a Datenbankentwurf |0 (DE-588)4127613-9 |D s |
689 | 0 | 2 | |a NoSQL-Datenbanksystem |0 (DE-588)7722784-0 |D s |
689 | 0 | 3 | |a In-Memory-Datenbank |0 (DE-588)7744803-0 |D s |
689 | 0 | |5 DE-604 | |
856 | 4 | 2 | |m HBZ Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=026133687&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-026133687 |
Datensatz im Suchindex
_version_ | 1804150563649093632 |
---|---|
adam_text | Titel: Redis in action
Autor: Carlson, Josiah L
Jahr: 2013
contents
foreword xv
preface xvii
acknowledgments xix
about this book xxi
about the cover illustration xxv
Part 1 Getting started ...........................................
Getting to know Redis 3
1.1 What is Redis? 4
Redis compared to other databases and software 4 • Other
features 6 • Why Redis ? 6
1.2 What Redis data structures look like 7
Strings in Redis 9 • Lists in Redis 10 • Sets in Redis 11
Hashes in Redis 12 • Sorted sets in Redis 13
1.3 Hello Redis 15
Voting on articles 15 • Posting and fetching articles 19
Grouping articles 20
1.4 Getting help 22
1.5 Summary 22
Anatomy of a Redis web application 24
2.1 Login and cookie caching 25
2.2 Shopping carts in Redis 29
2.3 Web page caching 30
2.4 Database row caching 31
2.5 Web page analytics 34
2.6 Summary 36
Part 2 Core concepts ,
Commands in Redis 39
3.1 Strings 40
3.2 Lists 43
3.3 Sets 46
3.4 Hashes 48
3.5 Sorted sets 50
3.6 Publish/subscribe 54
3.7 Other commands 57
Sorting 57 • Basic Redis transactions 58 • Expiring keys 61
3.8 Summary 62
Keeping data safe and ensuring performance 63
4.1 Persistence options 64
Persisting to disk with snapshots 65 • Append-only file
persistence 68 • Rewriting/compacting append-only files 70
4.2 Replication 70
Configuring Redis for replication 71 • Redis replication startup
process 12 • Master/slave chains 73 ¦ Verifying disk writes 74
4.3 Handling system failures 75
Verifying snapshots and append-only files 76 • Replacing a failed
master 77
4.4 Redis transactions 78
Defining users and their inventory 79 • Listing items in the
marketplace 80 • Purchasing items 82
4.5 Non-transactional pipelines 84
4.6 Performance considerations 87
4.7 Summary 89
Using Redis for application support 90
5.1 Logging to Redis 91
Recent logs 91 • Common logs 92
5.2 Counters and statistics 93
Storing counters in Redis 94 • Storing statistics in Redis 98
Simplifying our statistics recording and discovery 100
5.3 IP-to-city and -country lookup 102
Loading the location tables 102 • Looking up cities 104
5.4 Service discovery and configuration 104
Using Redis to store configuration information 105 • One Redis
server per application component 106 • Automatic Redis
connection management 107
5.5 Summary 109
Application components in Redis 110
6.1 Autocomplete 111
Autocompletefor recent contacts 111 • Address book autocomplete 113
6.2 Distributed locking 116
Why locks are important 117 • Simple locks 119 Building a
lock in Redis 120 • Fine-grained locking 123 • Locks with
timeouts 126
6.3 Counting semaphores 127
Building a basic counting semaphore 127 • Fail semaphores 129
Refreshing semaphores 132 • Preventing race conditions 132
6.4 Task queues 134
First-in, first-out queues 134 ¦ Delayed tasks 137
6.5 Pull messaging 140
Single-recipient publish/subscribe replacement 140 • Multiple-
recipient publish/subscribe replacement 141
6.6 Distributing files with Redis 146
Aggregating users by location 146 Sending files 148
Receiving files 149 • Processing files 150
6.7 Summary 152
Search-based applications 154
7.1 Searching in Redis 155
Basic search theory 155 • Sorting search results 161
7.2 Sorted indexes 163
Sorting search results with ZSETs 163 • Non-numeric sorting with
ZSETs 165
7.3 Ad targeting 167
What s an ad server ? 168 • Indexing ads 168 • Targeting
ads 171 • Learning from user behavior 175
7.4 Job search 181
Approaching the problem one job at a time 181 • Approaching the
problem like search 182
7.5 Summary 183
Building a simple social network 185
8.1 Users and statuses 186
User information 186 • Status messages 187
8.2 Home timeline 188
8.3 Followers/following lists 190
8.4 Posting or deleting a status update 192
8.5 Streaming API 196
Data to be streamed 196 • Serving the data 197 « Filtering
streamed messages 200
8.6 Summary 206
Part 3 Next steps 9
Reducing memory use 207
9.1 Short structures 208
The ziplist representation 208 • The intset encoding for SETs 210
Performance issues for long ziplists and intsets 211
9.2 Sharded structures 213
HASHes 214 • SETs 217
9.3 Packing bits and bytes 220
What location information should we store ? 220 • Storing packed
data 222 • Calculating aggregates over sharded STRINGs 223
9.4 Summary 225
10
11
Scaling Redis 226
10.1 Scaling reads 226
10.2 Scaling writes and memory capacity 230
Handling shard configuration 231 • Creating a server-sharded
connection decorator 232
10.3 Scaling complex queries 234
Scaling search query volume 234 Scaling search index size 234
Scaling a social network 239
10.4 Summary 246
Scripting Redis with Lua 247
11.1 Adding functionality without writing C 248
Loading Lua scripts into Redis 248 • Creating a new status
message 250
11.2 Rewriting locks and semaphores with Lua 253
Why locks in Lua ? 253 • Rewriting our lock 254
Counting semaphores in Lua 256
11.3 Doing away with WATCH/MULTI/EXEC 258
Revisiting group autocomplete 258 • Improving the marketplace,
again 260
11.4 Sharding LISTs with Lua 263
Structuring a sharded LIST 263 • Pushing items onto the sharded
LIST 264 • Popping items from the sharded LIST 266
Performing blocking pops from the sharded LIST 267
11.5 Summary 269
appendix A Quick and dirty setup 271
appendix B Other resources and references 2 79
index 283
|
any_adam_object | 1 |
author | Carlson, Josiah L. |
author_facet | Carlson, Josiah L. |
author_role | aut |
author_sort | Carlson, Josiah L. |
author_variant | j l c jl jlc |
building | Verbundindex |
bvnumber | BV041158382 |
classification_rvk | ST 270 |
ctrlnum | (OCoLC)855548960 (DE-599)BSZ389965502 |
dewey-full | 005.7575 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.7575 |
dewey-search | 005.7575 |
dewey-sort | 15.7575 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>02368nam a2200553 c 4500</leader><controlfield tag="001">BV041158382</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20150206 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">130722s2013 ad|| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781617290855</subfield><subfield code="c">(pbk.) No price</subfield><subfield code="9">978-1-617290-85-5</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1617290858</subfield><subfield code="9">1-617290-85-8</subfield></datafield><datafield tag="024" ind1="3" ind2=" "><subfield code="a">9781617290855</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)855548960</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BSZ389965502</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-83</subfield><subfield code="a">DE-29T</subfield><subfield code="a">DE-860</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.7575</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 270</subfield><subfield code="0">(DE-625)143638:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Carlson, Josiah L.</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Redis in action</subfield><subfield code="c">Josiah L. Carlson</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Shelter Island, NY</subfield><subfield code="b">Manning</subfield><subfield code="c">2013</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXV, 293 S.</subfield><subfield code="b">Ill., graph. Darst.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="520" ind1=" " ind2=" "><subfield code="a">Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems. By supporting five different types of data structures, Redis accommodates a wide variety of problems without the conceptual gymnastics required by other databases</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Data warehousing</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Database management</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Management information systems</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Open source software</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Database design</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Entrepôts de données (Informatique)</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Bases de données / Conception</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Bases de données / Gestion</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Systèmes d'information de gestion</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Logiciels libres</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">In-Memory-Datenbank</subfield><subfield code="0">(DE-588)7744803-0</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Datenbankentwurf</subfield><subfield code="0">(DE-588)4127613-9</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Redis</subfield><subfield code="0">(DE-588)1066443475</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">NoSQL-Datenbanksystem</subfield><subfield code="0">(DE-588)7722784-0</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Redis</subfield><subfield code="0">(DE-588)1066443475</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">Datenbankentwurf</subfield><subfield code="0">(DE-588)4127613-9</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="2"><subfield code="a">NoSQL-Datenbanksystem</subfield><subfield code="0">(DE-588)7722784-0</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="3"><subfield code="a">In-Memory-Datenbank</subfield><subfield code="0">(DE-588)7744803-0</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HBZ Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=026133687&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-026133687</subfield></datafield></record></collection> |
id | DE-604.BV041158382 |
illustrated | Illustrated |
indexdate | 2024-07-10T00:40:55Z |
institution | BVB |
isbn | 9781617290855 1617290858 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-026133687 |
oclc_num | 855548960 |
open_access_boolean | |
owner | DE-83 DE-29T DE-860 |
owner_facet | DE-83 DE-29T DE-860 |
physical | XXV, 293 S. Ill., graph. Darst. |
publishDate | 2013 |
publishDateSearch | 2013 |
publishDateSort | 2013 |
publisher | Manning |
record_format | marc |
spelling | Carlson, Josiah L. Verfasser aut Redis in action Josiah L. Carlson Shelter Island, NY Manning 2013 XXV, 293 S. Ill., graph. Darst. txt rdacontent n rdamedia nc rdacarrier Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems. By supporting five different types of data structures, Redis accommodates a wide variety of problems without the conceptual gymnastics required by other databases Data warehousing Database management Management information systems Open source software Database design Entrepôts de données (Informatique) Bases de données / Conception Bases de données / Gestion Systèmes d'information de gestion Logiciels libres In-Memory-Datenbank (DE-588)7744803-0 gnd rswk-swf Datenbankentwurf (DE-588)4127613-9 gnd rswk-swf Redis (DE-588)1066443475 gnd rswk-swf NoSQL-Datenbanksystem (DE-588)7722784-0 gnd rswk-swf Redis (DE-588)1066443475 s Datenbankentwurf (DE-588)4127613-9 s NoSQL-Datenbanksystem (DE-588)7722784-0 s In-Memory-Datenbank (DE-588)7744803-0 s DE-604 HBZ Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=026133687&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Carlson, Josiah L. Redis in action Data warehousing Database management Management information systems Open source software Database design Entrepôts de données (Informatique) Bases de données / Conception Bases de données / Gestion Systèmes d'information de gestion Logiciels libres In-Memory-Datenbank (DE-588)7744803-0 gnd Datenbankentwurf (DE-588)4127613-9 gnd Redis (DE-588)1066443475 gnd NoSQL-Datenbanksystem (DE-588)7722784-0 gnd |
subject_GND | (DE-588)7744803-0 (DE-588)4127613-9 (DE-588)1066443475 (DE-588)7722784-0 |
title | Redis in action |
title_auth | Redis in action |
title_exact_search | Redis in action |
title_full | Redis in action Josiah L. Carlson |
title_fullStr | Redis in action Josiah L. Carlson |
title_full_unstemmed | Redis in action Josiah L. Carlson |
title_short | Redis in action |
title_sort | redis in action |
topic | Data warehousing Database management Management information systems Open source software Database design Entrepôts de données (Informatique) Bases de données / Conception Bases de données / Gestion Systèmes d'information de gestion Logiciels libres In-Memory-Datenbank (DE-588)7744803-0 gnd Datenbankentwurf (DE-588)4127613-9 gnd Redis (DE-588)1066443475 gnd NoSQL-Datenbanksystem (DE-588)7722784-0 gnd |
topic_facet | Data warehousing Database management Management information systems Open source software Database design Entrepôts de données (Informatique) Bases de données / Conception Bases de données / Gestion Systèmes d'information de gestion Logiciels libres In-Memory-Datenbank Datenbankentwurf Redis NoSQL-Datenbanksystem |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=026133687&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT carlsonjosiahl redisinaction |