Version Stamps in NOSQL Databases

Dr-Dipali Meher
Dr-Dipali MeherAssistant Professor at Modern College, Ganeshkhind, Pune 16
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
1 of 14

Recommended

Consistency in NoSQL by
Consistency in NoSQLConsistency in NoSQL
Consistency in NoSQLDr-Dipali Meher
3.9K views51 slides
Data models in NoSQL by
Data models in NoSQLData models in NoSQL
Data models in NoSQLDr-Dipali Meher
966 views29 slides
Software Engineering- Requirement Elicitation and Specification by
Software Engineering- Requirement Elicitation and SpecificationSoftware Engineering- Requirement Elicitation and Specification
Software Engineering- Requirement Elicitation and SpecificationNishu Rastogi
7K views28 slides
Introduction to NoSQL by
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQLDr-Dipali Meher
2.2K views72 slides
Introduction to Software Engineering by
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software EngineeringSADEED AMEEN
10.3K views27 slides
Deadlock in database by
Deadlock in databaseDeadlock in database
Deadlock in databaseTayyab Hussain
3.3K views16 slides

More Related Content

What's hot

6 Data Modeling for NoSQL 2/2 by
6 Data Modeling for NoSQL 2/26 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/2Fabio Fumarola
12.1K views45 slides
Requirement Engineering by
Requirement EngineeringRequirement Engineering
Requirement EngineeringSlideshare
35.8K views38 slides
Polyglot Persistence by
Polyglot Persistence Polyglot Persistence
Polyglot Persistence Dr-Dipali Meher
1.9K views64 slides
Ch1 language design issue by
Ch1 language design issueCh1 language design issue
Ch1 language design issueJigisha Pandya
3.5K views26 slides
03 hive query language (hql) by
03 hive query language (hql)03 hive query language (hql)
03 hive query language (hql)Subhas Kumar Ghosh
2.7K views27 slides
SQL Server Tuning to Improve Database Performance by
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceMark Ginnebaugh
7.4K views38 slides

What's hot(20)

6 Data Modeling for NoSQL 2/2 by Fabio Fumarola
6 Data Modeling for NoSQL 2/26 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/2
Fabio Fumarola12.1K views
Requirement Engineering by Slideshare
Requirement EngineeringRequirement Engineering
Requirement Engineering
Slideshare35.8K views
Ch1 language design issue by Jigisha Pandya
Ch1 language design issueCh1 language design issue
Ch1 language design issue
Jigisha Pandya3.5K views
SQL Server Tuning to Improve Database Performance by Mark Ginnebaugh
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database Performance
Mark Ginnebaugh7.4K views
5 Data Modeling for NoSQL 1/2 by Fabio Fumarola
5 Data Modeling for NoSQL 1/25 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/2
Fabio Fumarola31K views
Cocomo model by Baskarkncet
Cocomo modelCocomo model
Cocomo model
Baskarkncet22.1K views
Memory map by aviban
Memory mapMemory map
Memory map
aviban3K views
Hardware multithreading by Fraboni Ec
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec14.1K views
Software Engineering - chp3- design by Lilia Sfaxi
Software Engineering - chp3- designSoftware Engineering - chp3- design
Software Engineering - chp3- design
Lilia Sfaxi11.7K views
Introduction to Software Project Management by Reetesh Gupta
Introduction to Software Project ManagementIntroduction to Software Project Management
Introduction to Software Project Management
Reetesh Gupta14.9K views
Object Oriented Testing by AMITJain879
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
AMITJain879580 views
Requirement Elicitation Techniques/Methods by SUFYAN SATTAR
Requirement Elicitation Techniques/MethodsRequirement Elicitation Techniques/Methods
Requirement Elicitation Techniques/Methods
SUFYAN SATTAR1.1K views
Google File Systems by Azeem Mumtaz
Google File SystemsGoogle File Systems
Google File Systems
Azeem Mumtaz4.4K views
JAD - Joint Applications Development by John Crosby
JAD - Joint Applications DevelopmentJAD - Joint Applications Development
JAD - Joint Applications Development
John Crosby25.8K views

Similar to Version Stamps in NOSQL Databases

Streaming is a Detail by
Streaming is a DetailStreaming is a Detail
Streaming is a DetailHostedbyConfluent
32 views12 slides
Big Data Serving with Vespa - Jon Bratseth, Distinguished Architect, Oath by
Big Data Serving with Vespa - Jon Bratseth, Distinguished Architect, OathBig Data Serving with Vespa - Jon Bratseth, Distinguished Architect, Oath
Big Data Serving with Vespa - Jon Bratseth, Distinguished Architect, OathYahoo Developer Network
790 views19 slides
Handling Data in Mega Scale Web Systems by
Handling Data in Mega Scale Web SystemsHandling Data in Mega Scale Web Systems
Handling Data in Mega Scale Web SystemsVineet Gupta
1.1K views54 slides
UnConference for Georgia Southern Computer Science March 31, 2015 by
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015Christopher Curtin
1K views76 slides
Robustness In HDFS by
Robustness In HDFSRobustness In HDFS
Robustness In HDFSErin Moore
3 views77 slides
MongoDB Schema Design by Examples by
MongoDB Schema Design by ExamplesMongoDB Schema Design by Examples
MongoDB Schema Design by ExamplesHadi Ariawan
2.5K views15 slides

Similar to Version Stamps in NOSQL Databases(20)

Big Data Serving with Vespa - Jon Bratseth, Distinguished Architect, Oath by Yahoo Developer Network
Big Data Serving with Vespa - Jon Bratseth, Distinguished Architect, OathBig Data Serving with Vespa - Jon Bratseth, Distinguished Architect, Oath
Big Data Serving with Vespa - Jon Bratseth, Distinguished Architect, Oath
Handling Data in Mega Scale Web Systems by Vineet Gupta
Handling Data in Mega Scale Web SystemsHandling Data in Mega Scale Web Systems
Handling Data in Mega Scale Web Systems
Vineet Gupta1.1K views
UnConference for Georgia Southern Computer Science March 31, 2015 by Christopher Curtin
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
Robustness In HDFS by Erin Moore
Robustness In HDFSRobustness In HDFS
Robustness In HDFS
Erin Moore3 views
MongoDB Schema Design by Examples by Hadi Ariawan
MongoDB Schema Design by ExamplesMongoDB Schema Design by Examples
MongoDB Schema Design by Examples
Hadi Ariawan2.5K views
Relational databases vs Non-relational databases by James Serra
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
James Serra22.6K views
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010 by Bhupesh Bansal
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Bhupesh Bansal1.3K views
Netezza fundamentals for developers by Biju Nair
Netezza fundamentals for developersNetezza fundamentals for developers
Netezza fundamentals for developers
Biju Nair106K views
The Evolution of a Scrappy Startup to a Successful Web Service by Poornima Vijayashanker
The Evolution of a Scrappy Startup to a Successful Web ServiceThe Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web Service
MongoDB_Spark by Mat Keep
MongoDB_SparkMongoDB_Spark
MongoDB_Spark
Mat Keep1K views
Enabling SQL Access to Data Lakes by Vasu S
Enabling SQL Access to Data LakesEnabling SQL Access to Data Lakes
Enabling SQL Access to Data Lakes
Vasu S20 views
Big Data by NGDATA
Big DataBig Data
Big Data
NGDATA67.4K views
Black Friday and Cyber Monday- Best Practices for Your E-Commerce Database by Tim Vaillancourt
Black Friday and Cyber Monday- Best Practices for Your E-Commerce DatabaseBlack Friday and Cyber Monday- Best Practices for Your E-Commerce Database
Black Friday and Cyber Monday- Best Practices for Your E-Commerce Database
Tim Vaillancourt301 views
Big Data with hadoop, Spark and BigQuery (Google cloud next Extended 2017 Kar... by Imam Raza
Big Data with hadoop, Spark and BigQuery (Google cloud next Extended 2017 Kar...Big Data with hadoop, Spark and BigQuery (Google cloud next Extended 2017 Kar...
Big Data with hadoop, Spark and BigQuery (Google cloud next Extended 2017 Kar...
Imam Raza1.4K views
NoSQLEU: Different NoSQL tools in Production by Bit Zesty
NoSQLEU: Different NoSQL tools in ProductionNoSQLEU: Different NoSQL tools in Production
NoSQLEU: Different NoSQL tools in Production
Bit Zesty1.5K views

More from Dr-Dipali Meher

DataPreprocessing.pptx by
DataPreprocessing.pptxDataPreprocessing.pptx
DataPreprocessing.pptxDr-Dipali Meher
262 views33 slides
Literature Review by
Literature ReviewLiterature Review
Literature ReviewDr-Dipali Meher
86 views21 slides
Research Problem by
Research ProblemResearch Problem
Research ProblemDr-Dipali Meher
128 views15 slides
Formulation of Research Design by
Formulation of Research DesignFormulation of Research Design
Formulation of Research DesignDr-Dipali Meher
655 views23 slides
Types of Research by
Types of ResearchTypes of Research
Types of ResearchDr-Dipali Meher
167 views23 slides
Research Methodology-Intorduction by
Research Methodology-IntorductionResearch Methodology-Intorduction
Research Methodology-IntorductionDr-Dipali Meher
228 views24 slides

Recently uploaded

Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptx by
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCollective Bargaining and Understanding a Teacher Contract(16793704.1).pptx
Collective Bargaining and Understanding a Teacher Contract(16793704.1).pptxCenter for Integrated Training & Education
93 views57 slides
ANATOMY AND PHYSIOLOGY UNIT 1 { PART-1} by
ANATOMY AND PHYSIOLOGY UNIT 1 { PART-1}ANATOMY AND PHYSIOLOGY UNIT 1 { PART-1}
ANATOMY AND PHYSIOLOGY UNIT 1 { PART-1}DR .PALLAVI PATHANIA
249 views195 slides
11.28.23 Social Capital and Social Exclusion.pptx by
11.28.23 Social Capital and Social Exclusion.pptx11.28.23 Social Capital and Social Exclusion.pptx
11.28.23 Social Capital and Social Exclusion.pptxmary850239
298 views25 slides
The Open Access Community Framework (OACF) 2023 (1).pptx by
The Open Access Community Framework (OACF) 2023 (1).pptxThe Open Access Community Framework (OACF) 2023 (1).pptx
The Open Access Community Framework (OACF) 2023 (1).pptxJisc
110 views7 slides
GSoC 2024 by
GSoC 2024GSoC 2024
GSoC 2024DeveloperStudentClub10
79 views15 slides
The Accursed House by Émile Gaboriau by
The Accursed House  by Émile GaboriauThe Accursed House  by Émile Gaboriau
The Accursed House by Émile GaboriauDivyaSheta
201 views15 slides

Recently uploaded(20)

11.28.23 Social Capital and Social Exclusion.pptx by mary850239
11.28.23 Social Capital and Social Exclusion.pptx11.28.23 Social Capital and Social Exclusion.pptx
11.28.23 Social Capital and Social Exclusion.pptx
mary850239298 views
The Open Access Community Framework (OACF) 2023 (1).pptx by Jisc
The Open Access Community Framework (OACF) 2023 (1).pptxThe Open Access Community Framework (OACF) 2023 (1).pptx
The Open Access Community Framework (OACF) 2023 (1).pptx
Jisc110 views
The Accursed House by Émile Gaboriau by DivyaSheta
The Accursed House  by Émile GaboriauThe Accursed House  by Émile Gaboriau
The Accursed House by Émile Gaboriau
DivyaSheta201 views
Education and Diversity.pptx by DrHafizKosar
Education and Diversity.pptxEducation and Diversity.pptx
Education and Diversity.pptx
DrHafizKosar173 views
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx by ISSIP
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptxEIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
EIT-Digital_Spohrer_AI_Intro 20231128 v1.pptx
ISSIP369 views
PLASMA PROTEIN (2).pptx by MEGHANA C
PLASMA PROTEIN (2).pptxPLASMA PROTEIN (2).pptx
PLASMA PROTEIN (2).pptx
MEGHANA C68 views
Scope of Biochemistry.pptx by shoba shoba
Scope of Biochemistry.pptxScope of Biochemistry.pptx
Scope of Biochemistry.pptx
shoba shoba133 views
REPRESENTATION - GAUNTLET.pptx by iammrhaywood
REPRESENTATION - GAUNTLET.pptxREPRESENTATION - GAUNTLET.pptx
REPRESENTATION - GAUNTLET.pptx
iammrhaywood100 views
Narration ppt.pptx by TARIQ KHAN
Narration  ppt.pptxNarration  ppt.pptx
Narration ppt.pptx
TARIQ KHAN135 views
Community-led Open Access Publishing webinar.pptx by Jisc
Community-led Open Access Publishing webinar.pptxCommunity-led Open Access Publishing webinar.pptx
Community-led Open Access Publishing webinar.pptx
Jisc93 views
Use of Probiotics in Aquaculture.pptx by AKSHAY MANDAL
Use of Probiotics in Aquaculture.pptxUse of Probiotics in Aquaculture.pptx
Use of Probiotics in Aquaculture.pptx
AKSHAY MANDAL100 views
JiscOAWeek_LAIR_slides_October2023.pptx by Jisc
JiscOAWeek_LAIR_slides_October2023.pptxJiscOAWeek_LAIR_slides_October2023.pptx
JiscOAWeek_LAIR_slides_October2023.pptx
Jisc96 views
Structure and Functions of Cell.pdf by Nithya Murugan
Structure and Functions of Cell.pdfStructure and Functions of Cell.pdf
Structure and Functions of Cell.pdf
Nithya Murugan545 views

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 mailtomeher@gmail.com
  • 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