SlideShare a Scribd company logo
7
Most read
8
Most read
9
Most read
Version Stamps
Dr. Dipali Meher
MCS, M.Phil,NET, Ph.D
Assistant Professor
Modern College of Arts Science and Commerce, Ganeshkhind, Pune 16
mailtomeher@gmail.com
Agenda
 Business and System Transactions
 Version Stamps on Multiple Nodes
Collected by Dr. Dipali Meher
Source: NoSQL Distilled:
Introduction
 Lack of transaction in NoSQL
database. But they have
aggregates
 Basically transactions are useful
tool for programmers to support
consistency
Aggregate oriented NoSQL
DB support atomic updates
with aggregates.
Transactional needs are
something to take into
account when you decide
what database to use.
But transactions have
limitations
In transactional system user
has to deal with updates with
human intervention which may
hold the transaction too long.
 Above is done using Version
Stamps
Collected by Dr. Dipali Meher
Source NoSQL Distilled by
Business & System Transactions
Business Transaction: A business transaction may be something like
 Browsing a product catalog
 Choosing a bottle of Milton at a good price,
 Filling in credit card information, and
 Confirming the order
Locks are held for short period of time.
Collected by Dr. Dipali Meher
Source NoSQL Distilled
System Transactions
System Transaction: applications only begin a system transaction at
the end of the interaction with the user.
Locks are held for short period of time.
Collected by Dr. Dipali Meher
Source NoSQL Distilled
As locks are held for long period of time in business transactions and
short period of time in system transactions…
so calculations and decisions may have been made based on data
that’s changed.
Queries should be fired according to changes in data.
Example:
price list may have updated the price of the Milton,
updated the customer’s address,
changing the shipping charges.
Collected by Dr. Dipali Meher
Source NoSQL Distilled
Version Stamp
A field that changes every time the underlying data in
the record changes.
When you read the data you keep a note of the version
stamp, so that when you write data you can check to
see if the version has changed.
Collected by Dr. Dipali Meher
Source NoSQL Distilled
Example Version Stamps
updating resources with HTTP using etag system
Whenever you get a resource, the server responds with an etag in
the header.
etag(opaque string that indicates the version of the resource)
If you then update that resource, you can use a conditional
update by supplying the etag that you got from your last GET.
If the resource has changed on the server, the etags won’t match
and the server will refuse the update,
returning a 412 (Precondition Failed) response.
Collected by Dr. Dipali Meher
Source NoSQL Distilled by
Ways of creating Version Stamps
Counter GUID hash Timestamp
You can use
a counter
always
incrementing
it when you
update the
resource.
A large
random
number
that’s
guaranteed
to be unique.
hash of the
contents of
the
resource
timestamp
of the last
update
Collected by Dr. Dipali Meher
Source NoSQL Distilled
Ways of creating Version Stamps
Counter
You can use a counter always incrementing it when you
update the resource.
Counters are useful since they make it easy to tell if one
version is more recent than another.
They require the server to generate the counter value,
They need a single master to ensure the counters aren’t
duplicated.
Collected by Dr. Dipali Meher
Source NoSQL Distilled
Ways of creating Version Stamps
GUID
 A large random number that’s guaranteed to be unique.
 These use some combination of dates, hardware
information, and whatever other sources of randomness
they can pick up.
 The nice thing about GUIDs is that they can be generated
by anyone and you’ll never get a duplicate;
 A disadvantage is that they are large and can’t be
compared directly for recentness.
Collected by Dr. Dipali Meher
Source NoSQL Distilled
Ways of creating Version Stamps
Hash
 To make a hash of the contents of the resource.
 With a big enough hash key size, a content hash can be
globally unique like a GUID
 Generated by anyone
 Advantage: deterministic any node will generate the same
content hash for same resource data.
 Disadvantages: like GUIDs they can’t be directly compared
for recentness, and they can be lengthy.
Collected by Dr. Dipali Meher
Source NoSQL Distilled
Ways of creating Version Stamps
Timestamp
 To use the timestamp of the last update
 Like counters, they are reasonably short and can be directly
compared for recentness.
 Advantage: doesnot need a single master, Multiple machines can
generate timestamps( their clocks can be kep in synchronization
way)
 Disadvantage :One node with a bad clock can cause all sorts of
data corruptions.
too granular you can get duplicates i.e. it’s no good using timestamps
of a millisecond precision if you get many updates per millisecond.
Collected by Dr. Dipali Meher
Source NoSQL Distilled
blend the advantages of these different version stamp
schemes by using more than one of them to create a
composite stamp example CouchDB uses a combination of
counter and content hash.
version stamps are also useful for providing
Session consistency

More Related Content

What's hot (20)

PPTX
Introduction to NoSQL
Dr-Dipali Meher
 
PPT
Schemaless Databases
Dan Gunter
 
PPTX
NoSQL and MapReduce
J Singh
 
PPTX
Nosql-Module 1 PPT.pptx
Radhika R
 
PPTX
Big data and Hadoop
Rahul Agarwal
 
PDF
UNIT 1 -BIG DATA ANALYTICS Full.pdf
vvpadhu
 
PPTX
Layers and types of cloud
ANUSUYA T K
 
PPT
Unit-3_BDA.ppt
PoojaShah174393
 
PPTX
NOSQL vs SQL
Mohammed Fazuluddin
 
PPTX
Vision of cloud computing
gaurav jain
 
PPTX
GOOGLE FILE SYSTEM
JYoTHiSH o.s
 
PDF
Information retrieval-systems notes
BAIRAVI T
 
PPTX
Understanding Web Cache
ProdigyView
 
PPTX
Developing a Map Reduce Application
Dr. C.V. Suresh Babu
 
PPTX
Sql vs NoSQL-Presentation
Shubham Tomar
 
PPTX
Active database
Dabbal Singh Mahara
 
PPTX
3 tier data warehouse
J M
 
PPTX
NoSQL databases - An introduction
Pooyan Mehrparvar
 
PPTX
Introduction to Hadoop
Dr. C.V. Suresh Babu
 
Introduction to NoSQL
Dr-Dipali Meher
 
Schemaless Databases
Dan Gunter
 
NoSQL and MapReduce
J Singh
 
Nosql-Module 1 PPT.pptx
Radhika R
 
Big data and Hadoop
Rahul Agarwal
 
UNIT 1 -BIG DATA ANALYTICS Full.pdf
vvpadhu
 
Layers and types of cloud
ANUSUYA T K
 
Unit-3_BDA.ppt
PoojaShah174393
 
NOSQL vs SQL
Mohammed Fazuluddin
 
Vision of cloud computing
gaurav jain
 
GOOGLE FILE SYSTEM
JYoTHiSH o.s
 
Information retrieval-systems notes
BAIRAVI T
 
Understanding Web Cache
ProdigyView
 
Developing a Map Reduce Application
Dr. C.V. Suresh Babu
 
Sql vs NoSQL-Presentation
Shubham Tomar
 
Active database
Dabbal Singh Mahara
 
3 tier data warehouse
J M
 
NoSQL databases - An introduction
Pooyan Mehrparvar
 
Introduction to Hadoop
Dr. C.V. Suresh Babu
 

Similar to Version Stamps in NOSQL Databases (20)

PPTX
Distilled Module2_Chapter3_NoSQL.pptx
vivekananda34
 
PDF
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
LinkedIn
 
PDF
Design Patterns For Distributed NO-reational databases
lovingprince58
 
PPTX
jjjjjjjjjjjjjjjjjjjjjjjjjjjjlecture 27.pptx
webinartrainer
 
PPT
Replication
sanjeewajassk
 
PPTX
Basics of Distributed Systems - Distributed Storage
Nilesh Salpe
 
PDF
Design Patterns for Distributed Non-Relational Databases
guestdfd1ec
 
PPTX
NoSQL Introduction, Theory, Implementations
Firat Atagun
 
PPTX
NoSql Database
Suresh Parmar
 
PDF
SDEC2011 NoSQL concepts and models
Korea Sdec
 
PPT
No sql
Murat Çakal
 
PDF
NoSQL databases
Marin Dimitrov
 
PDF
Architecting for the cloud elasticity security
Len Bass
 
PPTX
Cassandra Architecture
Prasad Wali
 
PDF
NoSQL overview implementation free
Benoit Perroud
 
PPT
UnConference for Georgia Southern Computer Science March 31, 2015
Christopher Curtin
 
KEY
Embrace NoSQL and Eventual Consistency with Ripple
Sean Cribbs
 
PPTX
Got documents Code Mash Revision
Maggie Pint
 
PDF
Thoughts on Transaction and Consistency Models
iammutex
 
Distilled Module2_Chapter3_NoSQL.pptx
vivekananda34
 
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
LinkedIn
 
Design Patterns For Distributed NO-reational databases
lovingprince58
 
jjjjjjjjjjjjjjjjjjjjjjjjjjjjlecture 27.pptx
webinartrainer
 
Replication
sanjeewajassk
 
Basics of Distributed Systems - Distributed Storage
Nilesh Salpe
 
Design Patterns for Distributed Non-Relational Databases
guestdfd1ec
 
NoSQL Introduction, Theory, Implementations
Firat Atagun
 
NoSql Database
Suresh Parmar
 
SDEC2011 NoSQL concepts and models
Korea Sdec
 
No sql
Murat Çakal
 
NoSQL databases
Marin Dimitrov
 
Architecting for the cloud elasticity security
Len Bass
 
Cassandra Architecture
Prasad Wali
 
NoSQL overview implementation free
Benoit Perroud
 
UnConference for Georgia Southern Computer Science March 31, 2015
Christopher Curtin
 
Embrace NoSQL and Eventual Consistency with Ripple
Sean Cribbs
 
Got documents Code Mash Revision
Maggie Pint
 
Thoughts on Transaction and Consistency Models
iammutex
 
Ad

More from Dr-Dipali Meher (12)

PPTX
Database Security Methods, DAC, MAC,View
Dr-Dipali Meher
 
PPTX
DataPreprocessing.pptx
Dr-Dipali Meher
 
PPTX
Literature Review
Dr-Dipali Meher
 
PPTX
Research Problem
Dr-Dipali Meher
 
PPTX
Formulation of Research Design
Dr-Dipali Meher
 
PPTX
Types of Research
Dr-Dipali Meher
 
PPTX
Research Methodology-Intorduction
Dr-Dipali Meher
 
PPTX
Introduction to Research
Dr-Dipali Meher
 
PPTX
Neo4j session
Dr-Dipali Meher
 
PPTX
Naive bayesian classification
Dr-Dipali Meher
 
PPTX
Data mining an introduction
Dr-Dipali Meher
 
PPTX
Function Pointer
Dr-Dipali Meher
 
Database Security Methods, DAC, MAC,View
Dr-Dipali Meher
 
DataPreprocessing.pptx
Dr-Dipali Meher
 
Literature Review
Dr-Dipali Meher
 
Research Problem
Dr-Dipali Meher
 
Formulation of Research Design
Dr-Dipali Meher
 
Types of Research
Dr-Dipali Meher
 
Research Methodology-Intorduction
Dr-Dipali Meher
 
Introduction to Research
Dr-Dipali Meher
 
Neo4j session
Dr-Dipali Meher
 
Naive bayesian classification
Dr-Dipali Meher
 
Data mining an introduction
Dr-Dipali Meher
 
Function Pointer
Dr-Dipali Meher
 
Ad

Recently uploaded (20)

PDF
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
PPTX
HEAD INJURY IN CHILDREN: NURSING MANAGEMENGT.pptx
PRADEEP ABOTHU
 
PPTX
Mrs Mhondiwa Introduction to Algebra class
sabinaschimanga
 
PPTX
How to Manage Promotions in Odoo 18 Sales
Celine George
 
PPTX
PPT on the Development of Education in the Victorian England
Beena E S
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PPTX
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
PPTX
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
PPTX
ANORECTAL MALFORMATIONS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PPTX
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
PPTX
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
PPTX
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PDF
Comprehensive Guide to Writing Effective Literature Reviews for Academic Publ...
AJAYI SAMUEL
 
PPTX
Maternal and Child Tracking system & RCH portal
Ms Usha Vadhel
 
PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
PPTX
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PPTX
Modern analytical techniques used to characterize organic compounds. Birbhum ...
AyanHossain
 
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
HEAD INJURY IN CHILDREN: NURSING MANAGEMENGT.pptx
PRADEEP ABOTHU
 
Mrs Mhondiwa Introduction to Algebra class
sabinaschimanga
 
How to Manage Promotions in Odoo 18 Sales
Celine George
 
PPT on the Development of Education in the Victorian England
Beena E S
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
ANORECTAL MALFORMATIONS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
How to Configure Storno Accounting in Odoo 18 Accounting
Celine George
 
CLEFT LIP AND PALATE: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Comprehensive Guide to Writing Effective Literature Reviews for Academic Publ...
AJAYI SAMUEL
 
Maternal and Child Tracking system & RCH portal
Ms Usha Vadhel
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
Modern analytical techniques used to characterize organic compounds. Birbhum ...
AyanHossain
 

Version Stamps in NOSQL Databases

  • 1. Version Stamps Dr. Dipali Meher MCS, M.Phil,NET, Ph.D Assistant Professor Modern College of Arts Science and Commerce, Ganeshkhind, Pune 16 [email protected]
  • 2. Agenda  Business and System Transactions  Version Stamps on Multiple Nodes
  • 3. Collected by Dr. Dipali Meher Source: NoSQL Distilled: Introduction  Lack of transaction in NoSQL database. But they have aggregates  Basically transactions are useful tool for programmers to support consistency Aggregate oriented NoSQL DB support atomic updates with aggregates. Transactional needs are something to take into account when you decide what database to use. But transactions have limitations In transactional system user has to deal with updates with human intervention which may hold the transaction too long.  Above is done using Version Stamps
  • 4. Collected by Dr. Dipali Meher Source NoSQL Distilled by Business & System Transactions Business Transaction: A business transaction may be something like  Browsing a product catalog  Choosing a bottle of Milton at a good price,  Filling in credit card information, and  Confirming the order Locks are held for short period of time.
  • 5. Collected by Dr. Dipali Meher Source NoSQL Distilled System Transactions System Transaction: applications only begin a system transaction at the end of the interaction with the user. Locks are held for short period of time.
  • 6. Collected by Dr. Dipali Meher Source NoSQL Distilled As locks are held for long period of time in business transactions and short period of time in system transactions… so calculations and decisions may have been made based on data that’s changed. Queries should be fired according to changes in data. Example: price list may have updated the price of the Milton, updated the customer’s address, changing the shipping charges.
  • 7. Collected by Dr. Dipali Meher Source NoSQL Distilled Version Stamp A field that changes every time the underlying data in the record changes. When you read the data you keep a note of the version stamp, so that when you write data you can check to see if the version has changed.
  • 8. Collected by Dr. Dipali Meher Source NoSQL Distilled Example Version Stamps updating resources with HTTP using etag system Whenever you get a resource, the server responds with an etag in the header. etag(opaque string that indicates the version of the resource) If you then update that resource, you can use a conditional update by supplying the etag that you got from your last GET. If the resource has changed on the server, the etags won’t match and the server will refuse the update, returning a 412 (Precondition Failed) response.
  • 9. Collected by Dr. Dipali Meher Source NoSQL Distilled by Ways of creating Version Stamps Counter GUID hash Timestamp You can use a counter always incrementing it when you update the resource. A large random number that’s guaranteed to be unique. hash of the contents of the resource timestamp of the last update
  • 10. Collected by Dr. Dipali Meher Source NoSQL Distilled Ways of creating Version Stamps Counter You can use a counter always incrementing it when you update the resource. Counters are useful since they make it easy to tell if one version is more recent than another. They require the server to generate the counter value, They need a single master to ensure the counters aren’t duplicated.
  • 11. Collected by Dr. Dipali Meher Source NoSQL Distilled Ways of creating Version Stamps GUID  A large random number that’s guaranteed to be unique.  These use some combination of dates, hardware information, and whatever other sources of randomness they can pick up.  The nice thing about GUIDs is that they can be generated by anyone and you’ll never get a duplicate;  A disadvantage is that they are large and can’t be compared directly for recentness.
  • 12. Collected by Dr. Dipali Meher Source NoSQL Distilled Ways of creating Version Stamps Hash  To make a hash of the contents of the resource.  With a big enough hash key size, a content hash can be globally unique like a GUID  Generated by anyone  Advantage: deterministic any node will generate the same content hash for same resource data.  Disadvantages: like GUIDs they can’t be directly compared for recentness, and they can be lengthy.
  • 13. Collected by Dr. Dipali Meher Source NoSQL Distilled Ways of creating Version Stamps Timestamp  To use the timestamp of the last update  Like counters, they are reasonably short and can be directly compared for recentness.  Advantage: doesnot need a single master, Multiple machines can generate timestamps( their clocks can be kep in synchronization way)  Disadvantage :One node with a bad clock can cause all sorts of data corruptions. too granular you can get duplicates i.e. it’s no good using timestamps of a millisecond precision if you get many updates per millisecond.
  • 14. Collected by Dr. Dipali Meher Source NoSQL Distilled blend the advantages of these different version stamp schemes by using more than one of them to create a composite stamp example CouchDB uses a combination of counter and content hash. version stamps are also useful for providing Session consistency