2013-02-02 02 Нелюбин. Почему NoSql

27
Почему NoSQL

Transcript of 2013-02-02 02 Нелюбин. Почему NoSql

Page 1: 2013-02-02 02 Нелюбин. Почему NoSql

Почему NoSQL

Page 2: 2013-02-02 02 Нелюбин. Почему NoSql

NoSQL

SQL

Page 3: 2013-02-02 02 Нелюбин. Почему NoSql

NoSQL DEFINITION:Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open-source and horizontally scalable.

The original intention has been modern web-scale databases. The movement began early 2009 and is growing rapidly. Often more characteristics apply such as: schema-free, easy replication support, simple API, eventually consistent / BASE (not ACID), a huge amount of data and more. So the misleading term"nosql" (the community now translates it mostly with "not only sql") should be seen as an alias to something like the definition above.

http://nosql-database.org/

Page 5: 2013-02-02 02 Нелюбин. Почему NoSql

NoSQL

SQL

NewSQL

Page 6: 2013-02-02 02 Нелюбин. Почему NoSql

NewSQL

"NewSQL" is our shorthand for the various new scalable/high performance SQL database vendors. We have previously referred to these products as 'ScalableSQL' to differentiate them from the incumbent relational database products. Since this implies horizontal scalability, which is not necessarily a feature of all the products, we adopted the term 'NewSQL' in the new report.

And to clarify, like NoSQL, NewSQL is not to be taken too literally: the new thing about the NewSQL vendors is the vendor, not the SQL.

Matthew Aslett

Page 7: 2013-02-02 02 Нелюбин. Почему NoSql

NoSQL, NewSQL and Beyond

http://www.infoq.com/news/2011/04/newsql

Page 8: 2013-02-02 02 Нелюбин. Почему NoSql

Когда SQL не хватает?

Page 9: 2013-02-02 02 Нелюбин. Почему NoSql

SQL мешает?

Page 10: 2013-02-02 02 Нелюбин. Почему NoSql

Модели представления данных

● Tabular○ Relational○ BigTable○ Column-oriented

● Key-Value○ Multi-Value

● Document● Object● Graph

○ RDF

Page 11: 2013-02-02 02 Нелюбин. Почему NoSql

High Load

Page 12: 2013-02-02 02 Нелюбин. Почему NoSql

Вертикальное масштабирование

Page 13: 2013-02-02 02 Нелюбин. Почему NoSql

Оптимизация кода

Page 14: 2013-02-02 02 Нелюбин. Почему NoSql

Оптимизация БД

● Оптимизация запросов● Оптимизация индексов● Денормализация● Тюнинг

Page 15: 2013-02-02 02 Нелюбин. Почему NoSql

Кэширование

There are only two hard things in Computer Science: cache invalidation and naming things.

Phil Karlton

Page 16: 2013-02-02 02 Нелюбин. Почему NoSql

Горизонтальное масштабирование

Page 17: 2013-02-02 02 Нелюбин. Почему NoSql

Репликация

Page 18: 2013-02-02 02 Нелюбин. Почему NoSql

Репликация

● потеря целостности

● данные должны помещаться на один сервер

● излишние копии данных

● масштабирование чтения

Page 19: 2013-02-02 02 Нелюбин. Почему NoSql

Шардинг

Page 20: 2013-02-02 02 Нелюбин. Почему NoSql

Шардинг

● нет joinов● нет foreign key● накладные

расходы● низкая

надежность

● масштабирование чтения и записи

● Big Data

Page 21: 2013-02-02 02 Нелюбин. Почему NoSql

RTB

RTB - Real Time Bidding

DSP - Demand Side PlatformSSP - Supply Side PlatformAd Exchange - биржа

Publisher - площадка для показа рекламыAdvertiser - рекламодатель

Page 23: 2013-02-02 02 Нелюбин. Почему NoSql

RTB

High Load● десятки тысяч запросов в секунду● 100ms на ответ

Big Data● миллиарды записей● десятки тысяч новых записей в день

Page 24: 2013-02-02 02 Нелюбин. Почему NoSql

Datacenter Awareness

Page 25: 2013-02-02 02 Нелюбин. Почему NoSql

Дружба

Page 26: 2013-02-02 02 Нелюбин. Почему NoSql

Как живет продукт

Page 27: 2013-02-02 02 Нелюбин. Почему NoSql

Спасибо

Вопросы?