DjangoCon US 2017 - The denormalized query engine design pattern by Simon WIllison

  Рет қаралды 2,374

DjangoCon US

DjangoCon US

7 жыл бұрын

DjangoCon US 2017 - The denormalized query engine design pattern by Simon WIllison
Most web applications need to offer search functionality. Open source tools like Solr and Elasticsearch are a powerful option for building custom search engines… but it turns out they can be used for way more than just search.
By treating your search engine as a denormalization layer, you can use it to answer queries that would be too expensive to answer using your core relational database. Questions like “What are the top twenty tags used by my users from Spain?” or “What are the most common times of day for events to start?” or “Which articles contain addresses within 500 miles of Toronto?”.
With the denormalized query engine design pattern, modifications to relational data are published to a denormalized schema in Elasticsearch or Solr. Data queries can then be answered using either the relational database or the search engine, depending on the nature of the specific query. The search engine returns database IDs, which are inflated from the database before being displayed to a user - ensuring that users never see stale data even if the search engine is not 100% up to date with the latest changes. This opens up all kinds of new capabilities for slicing, dicing and exploring data.
In this talk, I’ll be illustrating this pattern by focusing on Elasticsearch - showing how it can be used with Django to bring new capabilities to your application. I’ll discuss the challenge of keeping data synchronized between a relational database and a search engine, and show examples of features that become much easier to build once you have this denormalization layer in place.
Use-cases I explore will include:
Finding interesting patterns in your data
Building a recommendation engine
Advanced geographical search and filtering
Reacting to recent user activity on your site
Analyzing a new large dataset using Elasticsearch and Kibana
This talk was presented at: 2017.djangocon...
LINKS:
Follow Carlos Martinez 👇
On Twitter: / simonw
Official homepage: lanyrd.com/prof...
Github: github.com/sim...
Follow DjangCon US 👇
/ djangocon
Follow DEFNA 👇
/ defnado
www.defna.org/

Пікірлер
DjangoCon 2019 - Search From the Ground Up by William S. Vincent
23:39
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 107 МЛН
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 202 М.
Radoslav Georgiev - Django structure for scale and longevity
45:27
EuroPython Conference
Рет қаралды 47 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 510 М.
Elasticsearch anti-patterns and bad practices to be aware of
9:17
George Bridgeman
Рет қаралды 29 М.
DjangoCon 2022 | Data-Oriented Django
34:58
DjangoCon Europe
Рет қаралды 2,9 М.
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57