NoSQL and NewSQL

Flag as Inappropriate

Please select the category that most closely reflects your concern about the presentation, so that we can review it and determine whether it violates our
Terms of Use or isn't appropriate for all viewers.

Submit

Like this presentation?

Embed this comment into your blog:

Comment URL:

No comments posted yet

Comments

1-10 of 34

Post a comment

http://faculty.up.edu/lulay/failure/vasacasestudy.pdf
Lessons-Learned
The lessons to be learned from the sinking of the Vasa are as relevant today as in 1628.
Those lessons are summarized as follows:
1. Excessive schedule pressure: The Vasa was completed under strong time constraints
to meet a pressing need.
2. Changing needs: Many changes to operational characteristics were made during
construction of the ship.
3. Lack of technical specifications: The (non-existent) specifications were not revised as
the operational requirements changed.
4. Lack of a documented project plan: During a year-long transition in leadership it was
difficult for the assistant to manage the project. This resulted in poor supervision of
the various groups working on the ship (i.e., the shipwright, the ship builder, and the
Lack of technical specifications: The (non-existent) specifications were not revised as
the operational requirements changed.
4. Lack of a documented project plan: During a year-long transition in leadership it was
difficult for the assistant to manage the project. This resulted in poor supervision of
the various groups working on the ship (i.e., the shipwright, the ship builder, and the Prepared by 6 of 7
R. Fairley
numerous subcontractors). There is no evidence that the new project manager (the
former assistant) prepared any plans after the original shipwright died.
5. Excessive innovation: No one in Sweden, including the shipwright, had ever built a
ship having two gun decks.
6. Secondary innovations: Many secondary innovations were added during construction
of the Vasa to accommodate the increased length, the additional gun deck, and other
changes.
7. Requirements creep: It seems that no one was aware of the degree to which the Vasa
had evolved during the 2 ½ years of construction.
8. Lack of scientific methods: There were no known methods for calculating center of
gravity, stiffness, and the resulting stability relationships of the Vasa.
9. Ignoring the obvious: The Vasa was launched after failing a stability test.
10. Possible mendacity: Results of the stability test were known to some but were not
communicated to others

Before we jump on new technology..
Why the Vasa Sank ?
Excessive innovation
Lack of scientific methods
Ignoring the obvious
The Vasa was designed to be one of the premier warships of the 17th century.
Unfortunately, the ship sank two hours after its initial launch in an 8-knot wind

Key/Value
Have the key? Get the value
That’s about it when it comes to querying
Map/Reduce (sometimes)
Good for
cache aside (e.g. Hibernate 2nd level cache)
Simple, id based interactions (e.g. user profiles)
In most cases, values are Opaque
17

Slide 18

Key/Value
Scaling out is relatively easy
(just hash the keys)
Some will do that automatically for you
Fixed vs. consistent hashing
18

Column Based
Mostly derived from Google’s BigTable / Amazon Dynamo papers
One giant table of rows and columns
Column == pair (name and a value, sometimes timestamp)
Each row can have a different number of columns
Table is sparse: (#rows) × (#columns) ≥ (#values)
21

Document
Model is not flat, data store is aware of it
Arrays, nested documents
Better support for ad hoc queries
MongoDB excels at this
Very intuitive model
Flexible schema

Slide 25

What if you didn’t have to choose?
25

Slide 26

A Brief Intro to GigaSpaces
In Memory Data Grid
With optional write behind to a secondary storage
26

Slide 27

Few things on memory and cost..
Memory can be x10, x100 lower than disk based solution for high performance apps (Stanford research)
An entire application data can fit into a single blade
1TB cost only $1.8k/Month
® Copyright 2011 Gigaspaces Ltd. All Rights Reserved
27

Use the Right API for the Job
31
Even for the same data…
POJO & JPA for Java apps with complex domain model
Document for a more dynamic view
Memcached for simple, language neutral data access
JDBC for:
Interaction with legacy apps
Flexible ad-hoc querying (e.g. projections)

Slide 32

Memcached (the Daemon is in the Details)
Memcached Client

Slide 33

JPA
It’s all about relationships…
33

Slide 34

JPA Relationships
To embed or not to embed, that is the question….
Easy to partition and scale
Easy to query:
user.accounts[*].type = ‘checking’
Owned relationships only

Summary
One API doesn’t fit all
Use the right API for the job
Combine In-Memory & File-based solution for best cost/performance
Know the tradeoffs
Always ask what you’re giving up, not just what you’re gaining
38

Summary: Common patterns in SQL and NoSQL and the emergence of the NewSQL model.
The talk walk through common references - Google BigTable, MongoDB, Memcache ..
It shows how you can combine the best of each of those API's into one common scalable data service using GigaSpaces.
A live demo is also avaliable here:
http://www.youtube.com/watch?v=jC57mId3SMg