• Like
  • Save
Polyglot Persistence
Upcoming SlideShare
Loading in...5
×
 

Polyglot Persistence

on

  • 1,231 views

 

Statistics

Views

Total Views
1,231
Views on SlideShare
810
Embed Views
421

Actions

Likes
1
Downloads
24
Comments
0

5 Embeds 421

http://unlocked.io 358
http://blog.unlocked.io 37
http://irq.tumblr.com 17
http://unlocked.hart.io 8
http://cloud.feedly.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Polyglot Persistence Polyglot Persistence Presentation Transcript

    • POLYGLOT PERSISTENCE alex brandt sr developer Wednesday, August 21, 13
    • 2 Wednesday, August 21, 13
    • 3 Wednesday, August 21, 13
    • 4 Wednesday, August 21, 13
    • 5 RDBMS may not be the best fit Wednesday, August 21, 13
    • 6 Wednesday, August 21, 13
    • 7 Wednesday, August 21, 13
    • INTRODUCTION TO NOSQL • NoSQL Database (1998) • NoREL • “Not only SQL” • NoSQL (2009) 8 Wednesday, August 21, 13
    • 9 5 Characteristics Wednesday, August 21, 13
    • 10 Non-relational Wednesday, August 21, 13
    • 11 Distributed Wednesday, August 21, 13
    • 12 Open-source Wednesday, August 21, 13
    • 13 Horizontally Scalable Wednesday, August 21, 13
    • 14 Schema-less Wednesday, August 21, 13
    • orders customers order lines credit cards ID: 1001 line items: customer: Ann 0321293533 0321601912 0131495054 2 1 1 $48 $48 $39 $51 $39 $51 payment details: Card: Amex CC #: 12345 expires: 04/2001 15 Wednesday, August 21, 13
    • 16 Types in Detail Wednesday, August 21, 13
    • Key/Value DatabaseS 17 Wednesday, August 21, 13
    • Key/Value DatabaseS • Good Use Cases: • Storing Session Information • User Profiles & Preferences • Shopping Cart Data • Bad Use Cases: • Data Relationships •Multi-operation Transactions •Query by Data 18 Wednesday, August 21, 13
    • Key/Value DatabaseS • Good Use Cases: • Storing Session Information • User Profiles & Preferences • Shopping Cart Data • Bad Use Cases: • Data Relationships •Multi-operation Transactions •Query by Data 19 Wednesday, August 21, 13
    • document Database 20 Wednesday, August 21, 13
    • document Databases •Good Use Cases: • Event Logging • Blogging Platforms • Real-time Analytics • Article storage • Bad Use Cases: • Complex Transactions •Queries against Varying Aggregate Structures 21 Wednesday, August 21, 13
    • document Databases •Good Use Cases: • Event Logging • Blogging Platforms • Real-time Analytics • Article storage • Bad Use Cases: • Complex Transactions •Queries against Varying Aggregate Structures 22 Wednesday, August 21, 13
    • COLUMN FAMILY 23 Wednesday, August 21, 13
    • 24 Wednesday, August 21, 13
    • COLUMN-FAMILY datastores •Good Use Cases: • Event Logging • Blogging Platforms • Counters (page visits) • Expiring Usage • Bad Use Cases: • ACID transactions required • Early prototype applications 25 Wednesday, August 21, 13
    • graph database 26 Wednesday, August 21, 13
    • Amanda KNOWS KNOWS KNOWS Robert Gerry Lamar KNOWS App 1 BUILT BUILT KNOWS App 2 USES BUILT Christie KNOWS Destiny Jessica KNOWS App 3 BUILT USES USES USES KNOWS graph database 27 Wednesday, August 21, 13
    • graph databases •Good Use Cases: • Connected Data • Location-based services • Recommendation engines • Bad Use Cases: • Ability to update specific aggregates 28 Wednesday, August 21, 13
    • Companies using nosql 29 DATABASE COMPANIES Wednesday, August 21, 13
    • THE FUTURE IS POLYGLOT 30 Neo4J database Cassandra database Couch database MongoDB database RELATIONAL DATABASE Graph-structured domain rules Columnar data access with decentralization Document structures Document structures with offline processing (Actors) (Actors) (Actors)(Actors) Asynchronous message passing MODULE 1 MODULE 2 MODULE 3 MODULE 4 IEEE Software Sept/October 2010 - Debasish Ghosh / Twitter @debasishg Wednesday, August 21, 13
    • 31 POLYGLOT PATTERN: cache ORDER TAKING RESTAURANT MANAGEMENT REDIS CACHE MYSQL DATABASE SECONDFIRST CONSUMER RESTAURANT OWNER Credit: @crichardson Wednesday, August 21, 13
    • 32 POLYGLOT PATTERN: write to sql and NOSQL NEW TWEET INSERT LPUSHX LTRIM MySQL TWEETS FOLLOWS FOLLOWERS Redis: Timeline FOLLOWER 1 FOLLOWER 2 FOLLOWER 3 Avoid expensive MySQL joins Credit: @crichardson Wednesday, August 21, 13
    • 33 POLYGLOT PATTERN: REPLICATE FROM MYsql to NOSQL QUERY SERVICE UPDATE SERVICE REDIS MYSQL DATABASE SYSTEM OF RECORD MATERIALIZED VIEW READER WRITER replicate and denormalize query() update() Credit: @crichardson Wednesday, August 21, 13
    • 34 Atomic Consistent Isolated Durable ACID to base Basically Available Soft state Eventually consistent Wednesday, August 21, 13