Zadejte hledaný výraz...
Jakub Glos
Webtrh.cz
Vývoj webových stránek na WordPressu a proklientský přístup pro freelancery
Třídenní infromacemi nabitý prezenční + online kurz v Praze od Webtrhu pouze za 2 871 Kč
Více informací

Jak Friendfeed používá MySQL pro ukládání nestrukturovaných dat

How FriendFeed uses MySQL to store schema-less data
Problém:
Making schema changes or adding indexes to a database with more than 10 - 20 million rows completely locks the database for hours at a time. Removing old indexes takes just as much time, and not removing them hurts performance because the database will continue to read and write to those unused blocks on every INSERT, pushing important blocks out of memory.
Řešení:
Our datastore stores schema-less bags of properties (e.g., JSON objects or Python dictionaries). The only required property of stored entities is id, a 16-byte UUID. The rest of the entity is opaque as far as the datastore is concerned. We can change the "schema" simply by storing new properties.
We index data in these entities by storing indexes in separate MySQL tables. If we want to index three properties in each entity, we will have three MySQL tables - one for each index. If we want to stop using an index, we stop writing to that table from our code and, optionally, drop the table from MySQL. If we want a new index, we make a new MySQL table for that index and run a process to asynchronously populate the index without disrupting our live service.
16. 12. 2010 12:31:49
https://webtrh.cz/diskuse/jak-friendfeed-pouziva-mysql-pro-ukladani-nestrukturovanych-dat/#reply592114
hm
verified
rating uzivatele
(20 hodnocení)
16. 12. 2010 13:04:59
diky za odkaz, zase budu o neco chytrejsi :)
16. 12. 2010 13:04:59
https://webtrh.cz/diskuse/jak-friendfeed-pouziva-mysql-pro-ukladani-nestrukturovanych-dat/#reply592113
Zajímavá by ta denormalizace byla i v kombinaci s obejitím relační vrstvy v MySQL.
http://webtrh.cz/110892-odstraneni-sql-overhead-mysql-750k
16. 12. 2010 13:10:24
https://webtrh.cz/diskuse/jak-friendfeed-pouziva-mysql-pro-ukladani-nestrukturovanych-dat/#reply592112
hm
verified
rating uzivatele
(20 hodnocení)
16. 12. 2010 13:44:28
pro me je zrovna reseni denormalizace dost aktualni, kazda informace mi ted pomuze :)
16. 12. 2010 13:44:28
https://webtrh.cz/diskuse/jak-friendfeed-pouziva-mysql-pro-ukladani-nestrukturovanych-dat/#reply592111
tom11111
verified
rating uzivatele
16. 12. 2010 14:29:22
No já bych tedy na jejich místě zvážil použití úplně jiného úložiště než MySql, když mají tak specifické požadavky.
16. 12. 2010 14:29:22
https://webtrh.cz/diskuse/jak-friendfeed-pouziva-mysql-pro-ukladani-nestrukturovanych-dat/#reply592110
hm
verified
rating uzivatele
(20 hodnocení)
16. 12. 2010 14:31:24
Napsal tom11111;606244
No já bych tedy na jejich místě zvážil použití úplně jiného úložiště než MySql, když mají tak specifické požadavky.
a jakeho mohuli vedet? :)
16. 12. 2010 14:31:24
https://webtrh.cz/diskuse/jak-friendfeed-pouziva-mysql-pro-ukladani-nestrukturovanych-dat/#reply592109
On píše, že zkoušeli nějaké NoSQL databáze (konkrétně zmiňuje CouchDB):
In the tests we read about and ran ourselves, none of the projects were stable or battle-tested enough for our needs. MySQL works. It doesn't corrupt data. Replication works. We understand its limitations already. We like MySQL for storage, just not RDBMS usage patterns.
16. 12. 2010 15:05:09
https://webtrh.cz/diskuse/jak-friendfeed-pouziva-mysql-pro-ukladani-nestrukturovanych-dat/#reply592108
Pro odpověď se přihlašte.
Přihlásit