3. Så, vem är Peppe? 31 år Pappa till en, och en till på G Nybliven Västeråsare Gillar: Färgen grönt Felparkerade bilar Att bli bättre Hittas på http://p.bergqvi.st, mail: p@bergqvi.st,twitter: peppelorum
4. Så, vad gör Peppe? Nu: BI-konsult på Acando Då:Webutvecklare (hej Hostit!)IxD-konsult Kognitionsvetenskap i Linköping SystemförvaltareIT-bubblan, var på Sprays sista bjudfest
5. NoSQL? Lotus Notes tack! Samlingsbegrepp Dokumentdatabaser (CouchDB, MongoDB) Key/value Lotus Notes Not SQL? Not only SQL? NoRel?
6. Olika smaker! Google (Bigtable) Används av Google (duh!), Google App Engine Facebook (Cassandra) Nu hos Twitter, Digg, reddit, Rackspace Amazon (SimpleDB) RavenDB (.net) CouchDB, MongoDB Memcache, Redis, Tokyo Cabinet, Neo4j m fl
7. Olika smaker! CouchDB Erlang Protokoll: HTTP/REST, JSON Master-master replikering MVCC Versionshantering Konflikthantering Map/reduce JS queries MongoDB C++ Protokoll: Eget, BSON Master-slav replikering Inbyggd sharding Kraschsäkerhet kommer i 1.8 JS queries
8. Fler smaker! Cassandra Java Protokoll: Eget Skriv snabbare än läs! Map/reduce Skalar väldigt bra Redis C/C++ Protokoll: Telnet-ish Galet snabb! Måste platsa i RAM (ändras iom 2.2 och 2.4) Transaktioner
9. NOSQL vs RDBMS Struktur Modell av verkligheten Relationer! Bra att ha! Reducerar mängden data (2:a normalformen) Kommer iom Django-nonrel & Doctrine ODM ACID A – atomär C – konsistensbevarande I – isolerade från varandra D – hållbara Skalbarhet RDMS, sharding, partionering (ändra kod) NoSQL, med på köpet!
10. När behövs NoSQL? Mycket data Skalbarhet Osäker datastruktur Exempel Följder av detta?
11. Vad innebär det för mig? Ändra kod? Modeller? Controller? Views? Vänta på Django-nonrel/Doctrine ODM etc
12.
13. “Django may be built for the Web, but CouchDB is built of the Web. I’ve never seen software that so completely embraces the philosophies behind HTTP. CouchDB makes Django look old-school in the same way that Django makes ASP look outdated.”— Jacob Kaplan-Moss
Fråga hur många som använder sig av NoSQL idag?Fråga någon om vad NoSQL betyderLotus Notes? Har legat som inspiration till t ex CouchDB och MongoDBThe term NOSQL (Not Only SQL) was used in 1998 as the name for a lightweight open source relational database that did not expose a SQL interface. Its author, Carlo Strozzi, claims that as the NoSQL movement "departs from the relational model altogether it should therefore have been called more appropriately 'NoREL', or something to that effect"
Redis används av Disqus (en av världens största Django-siter btw)Memcache, ofta just cache i ex DB/web
Couch: bra för data som ändras ibland, där versionshantering är viktigt (CMS, CRM, multi-site)Redis: bra på snabbt ändrande data med en viss storlek (Aktiepriser, analytics, realtidsdata insamling)Like many relational database engines, CouchDB provides ACID semantics[9]. It does this by implementing a form of Multi-Version Concurrency Control (MVCC) not unlike InnoDB or Oracle. That means CouchDB can handle a high volume of concurrent readers and writers without conflict.
MongoDB: för allt som MySQL/PostgreSQL kan, men utan fördefinierade kolumnerCassandra: loggning, när du måste ha Java. Realtidsanalys
The document model has some features that encourage scalability. Because all the data needed for most operations is held in a single document, there is no need for joins or multi-object transactions; in fact, these are not directly supported. Omitting joins and transactions eases clustering issues, and both CouchDB and MongoDB support scalable clustering, either through sharding (MongoDB) or consistent hashing (CouchDB).
Söka med t ex Lucene
- Some backends (e.g., MongoDB) use a string instead of an integer for AutoField. If you want to be on the safe side always write code and urlpatterns that would work with both strings and integers.There is no integrity guarantee. When deleting a model instance the related objects will not be deleted. This had to be done because such a deletion process can take too much time. We might solve this in a later release.- JOINs don't work (yet). Queries can only be executed on one single model (filters can't span relationships like user__username=...).- You can't use transactions. If your particular DB supports a special kind of transaction (e.g., run_in_transaction on App Engine) you have to use the platform-specific functions.- Not all DBs provide strong consistency. If you want your code to be fully portable you should assume an eventual consistency model.
Katz drev finansierade utvecklingen själv under drygt två år