some (important) database concepts

13
Some (important) database concepts Ishan Agrawal Founder and CTO, Ondago.tv @ishanagr

Upload: ishanagrawal90

Post on 13-Jan-2017

216 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Some (important) database concepts

Some (important) database concepts

Ishan AgrawalFounder and CTO, Ondago.tv

@ishanagr

Page 2: Some (important) database concepts

Prerequisites

• Basic understanding of how databases work.

• Basic understanding the why and how of SQL and NoSQL databases.

• Basic understanding of distributed computing.

Page 3: Some (important) database concepts

Distributed Databases

• Most popular databases have distributed implementations

• DynamoDB• Cassandra• Riak• Couchbase• Redis• Aerospike

Page 4: Some (important) database concepts

Distributed Databases

• Replication• Redundancy• Backups• Parallelism• Availability• Consistency• Sharding

Page 5: Some (important) database concepts

Brewer’s CAP theorem (1998)It is impossible for a distributed computer system to simultaneously provide all three of the following guarantees:

• Consistency – A read is guaranteed to return the most recent write for a given client.

• Availability - A non-failing node will return a reasonable response within a reasonable amount of time (no error or timeout).

• Partition Tolerance - The system will continue to function when network partitions occur.

Page 6: Some (important) database concepts

Partition Tolerance

• Not much of an option

Page 7: Some (important) database concepts

CP

• Consistency over Availability

• Disallow any updates to the system.

Page 8: Some (important) database concepts

AP

• Availability over Consistency

• Allow updates in both – inconsistency

• Eventual Consistency

Page 9: Some (important) database concepts

CA? (2012)

• We cannot have full consistency with full availability.

• A bit of both?

• Read from all, block updates.• Asynchronous syncs – eventual consistency.

Page 10: Some (important) database concepts

Recommended Readings

• Designing Data-Intensive Applications – Martin Kleppmann

• Dynamo – Amazon’s Highly Available KV store

• CAP theorem revisited – Robert Griener

Page 11: Some (important) database concepts

Shameless Plug

• Extreme Engineering Mumbai• http://www.meetup.com/Extreme-Engineering-Mu

mbai/

• Scalable Engineering• Book Chapters• Research Papers• Tech conference post-mortem’s

Ps: If you are Business person looking for a tech co-founder please try another meetup!

Page 12: Some (important) database concepts

Shameless Plug #2

• Evens This Week Mumbai• http://bit.ly/mumbaieventsthisweek

• Every Monday, all cool events

Page 13: Some (important) database concepts

Thanks for your time!@ishanagr