Version Stamps in NOSQL Databases

Dr-Dipali Meher
Dr-Dipali MeherAssistant Professor um 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 von 14

Recomendados

Data models in NoSQL von
Data models in NoSQLData models in NoSQL
Data models in NoSQLDr-Dipali Meher
981 views29 Folien
Design of Hadoop Distributed File System von
Design of Hadoop Distributed File SystemDesign of Hadoop Distributed File System
Design of Hadoop Distributed File SystemDr. C.V. Suresh Babu
549 views9 Folien
Consistency in NoSQL von
Consistency in NoSQLConsistency in NoSQL
Consistency in NoSQLDr-Dipali Meher
3.9K views51 Folien
Introduction to NoSQL von
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQLDr-Dipali Meher
2.2K views72 Folien
Big Data Architecture von
Big Data ArchitectureBig Data Architecture
Big Data ArchitectureGuido Schmutz
25.3K views41 Folien
Data Mining von
Data MiningData Mining
Data Miningksanthosh
4.7K views14 Folien

Más contenido relacionado

Was ist angesagt?

Big data and Hadoop von
Big data and HadoopBig data and Hadoop
Big data and HadoopRahul Agarwal
82.3K views18 Folien
NOSQL- Presentation on NoSQL von
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLRamakant Soni
28.5K views18 Folien
Polyglot Persistence von
Polyglot Persistence Polyglot Persistence
Polyglot Persistence Dr-Dipali Meher
1.9K views64 Folien
Schema migrations in no sql von
Schema migrations in no sqlSchema migrations in no sql
Schema migrations in no sqlDr-Dipali Meher
479 views31 Folien
Hadoop basics von
Hadoop basicsHadoop basics
Hadoop basicsPraveen Kumar Donta
1.5K views60 Folien
Big Data Analytics von
Big Data AnalyticsBig Data Analytics
Big Data AnalyticsGhulam Imaduddin
35.2K views52 Folien

Was ist angesagt?(20)

NOSQL- Presentation on NoSQL von Ramakant Soni
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
Ramakant Soni28.5K views
Big Data in Healthcare Made Simple: Where It Stands Today and Where It’s Going von Health Catalyst
Big Data in Healthcare Made Simple: Where It Stands Today and Where It’s GoingBig Data in Healthcare Made Simple: Where It Stands Today and Where It’s Going
Big Data in Healthcare Made Simple: Where It Stands Today and Where It’s Going
Health Catalyst119.8K views
A Comparison of Stock Trend Prediction Using Accuracy Driven Neural Network V... von idescitation
A Comparison of Stock Trend Prediction Using Accuracy Driven Neural Network V...A Comparison of Stock Trend Prediction Using Accuracy Driven Neural Network V...
A Comparison of Stock Trend Prediction Using Accuracy Driven Neural Network V...
idescitation2K views
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop... von Simplilearn
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...
Hadoop Tutorial For Beginners | Apache Hadoop Tutorial For Beginners | Hadoop...
Simplilearn2.1K views
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo... von Simplilearn
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...
Hadoop Training | Hadoop Training For Beginners | Hadoop Architecture | Hadoo...
Simplilearn992 views
Knowledge discovery process von Shuvra Ghosh
Knowledge discovery process Knowledge discovery process
Knowledge discovery process
Shuvra Ghosh5.9K views
Hadoop Architecture and HDFS von Edureka!
Hadoop Architecture and HDFSHadoop Architecture and HDFS
Hadoop Architecture and HDFS
Edureka!4.3K views
Introduction to basic data analytics tools von Nascenia IT
Introduction to basic data analytics toolsIntroduction to basic data analytics tools
Introduction to basic data analytics tools
Nascenia IT659 views
Big Data Analytics von RohithND
Big Data AnalyticsBig Data Analytics
Big Data Analytics
RohithND12.6K views
Lecture2 big data life cycle von hktripathy
Lecture2 big data life cycleLecture2 big data life cycle
Lecture2 big data life cycle
hktripathy11.3K views
Hadoop Distributed File System von Rutvik Bapat
Hadoop Distributed File SystemHadoop Distributed File System
Hadoop Distributed File System
Rutvik Bapat5.5K views

Similar a Version Stamps in NOSQL Databases

Streaming is a Detail von
Streaming is a DetailStreaming is a Detail
Streaming is a DetailHostedbyConfluent
41 views12 Folien
Big Data Serving with Vespa - Jon Bratseth, Distinguished Architect, Oath von
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 Folien
Handling Data in Mega Scale Web Systems von
Handling Data in Mega Scale Web SystemsHandling Data in Mega Scale Web Systems
Handling Data in Mega Scale Web SystemsVineet Gupta
1.1K views54 Folien
UnConference for Georgia Southern Computer Science March 31, 2015 von
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 Folien
Robustness In HDFS von
Robustness In HDFSRobustness In HDFS
Robustness In HDFSErin Moore
3 views77 Folien
MongoDB Schema Design by Examples von
MongoDB Schema Design by ExamplesMongoDB Schema Design by Examples
MongoDB Schema Design by ExamplesHadi Ariawan
2.5K views15 Folien

Similar a Version Stamps in NOSQL Databases(20)

Big Data Serving with Vespa - Jon Bratseth, Distinguished Architect, Oath von 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 von 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 von 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
MongoDB Schema Design by Examples von 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 von James Serra
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
James Serra22.7K views
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010 von 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 von 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 von 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 von Mat Keep
MongoDB_SparkMongoDB_Spark
MongoDB_Spark
Mat Keep1K views
Enabling SQL Access to Data Lakes von Vasu S
Enabling SQL Access to Data LakesEnabling SQL Access to Data Lakes
Enabling SQL Access to Data Lakes
Vasu S21 views
Big Data von NGDATA
Big DataBig Data
Big Data
NGDATA67.4K views
Black Friday and Cyber Monday- Best Practices for Your E-Commerce Database von 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... von 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 von Bit Zesty
NoSQLEU: Different NoSQL tools in ProductionNoSQLEU: Different NoSQL tools in Production
NoSQLEU: Different NoSQL tools in Production
Bit Zesty1.5K views

Más de Dr-Dipali Meher

DataPreprocessing.pptx von
DataPreprocessing.pptxDataPreprocessing.pptx
DataPreprocessing.pptxDr-Dipali Meher
268 views33 Folien
Literature Review von
Literature ReviewLiterature Review
Literature ReviewDr-Dipali Meher
90 views21 Folien
Research Problem von
Research ProblemResearch Problem
Research ProblemDr-Dipali Meher
132 views15 Folien
Formulation of Research Design von
Formulation of Research DesignFormulation of Research Design
Formulation of Research DesignDr-Dipali Meher
699 views23 Folien
Types of Research von
Types of ResearchTypes of Research
Types of ResearchDr-Dipali Meher
172 views23 Folien
Research Methodology-Intorduction von
Research Methodology-IntorductionResearch Methodology-Intorduction
Research Methodology-IntorductionDr-Dipali Meher
240 views24 Folien

Último

NodeJS and ExpressJS.pdf von
NodeJS and ExpressJS.pdfNodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdfArthyR3
53 views17 Folien
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab... von
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...RAHUL PAL
45 views26 Folien
ppt_dunarea.pptx von
ppt_dunarea.pptxppt_dunarea.pptx
ppt_dunarea.pptxvvvgeorgevvv
68 views5 Folien
Gross Anatomy of the Liver von
Gross Anatomy of the LiverGross Anatomy of the Liver
Gross Anatomy of the Liverobaje godwin sunday
100 views12 Folien
GSoC 2024 .pdf von
GSoC 2024 .pdfGSoC 2024 .pdf
GSoC 2024 .pdfShabNaz2
45 views15 Folien
Interaction of microorganisms with Insects.pptx von
Interaction of microorganisms with Insects.pptxInteraction of microorganisms with Insects.pptx
Interaction of microorganisms with Insects.pptxMicrobiologyMicro
48 views14 Folien

Último(20)

NodeJS and ExpressJS.pdf von ArthyR3
NodeJS and ExpressJS.pdfNodeJS and ExpressJS.pdf
NodeJS and ExpressJS.pdf
ArthyR353 views
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab... von RAHUL PAL
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...
Research Methodology (M. Pharm, IIIrd Sem.)_UNIT_IV_CPCSEA Guidelines for Lab...
RAHUL PAL45 views
GSoC 2024 .pdf von ShabNaz2
GSoC 2024 .pdfGSoC 2024 .pdf
GSoC 2024 .pdf
ShabNaz245 views
Interaction of microorganisms with Insects.pptx von MicrobiologyMicro
Interaction of microorganisms with Insects.pptxInteraction of microorganisms with Insects.pptx
Interaction of microorganisms with Insects.pptx
Career Building in AI - Technologies, Trends and Opportunities von WebStackAcademy
Career Building in AI - Technologies, Trends and OpportunitiesCareer Building in AI - Technologies, Trends and Opportunities
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy51 views
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37 von MysoreMuleSoftMeetup
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Introduction to Physiotherapy and Electrotherapy von Sreeraj S R
Introduction to Physiotherapy and ElectrotherapyIntroduction to Physiotherapy and Electrotherapy
Introduction to Physiotherapy and Electrotherapy
Sreeraj S R67 views
JRN 362 - Lecture Twenty-Three (Epilogue) von Rich Hanley
JRN 362 - Lecture Twenty-Three (Epilogue)JRN 362 - Lecture Twenty-Three (Epilogue)
JRN 362 - Lecture Twenty-Three (Epilogue)
Rich Hanley44 views
Interaction of microorganisms with vascular plants.pptx von MicrobiologyMicro
Interaction of microorganisms with vascular plants.pptxInteraction of microorganisms with vascular plants.pptx
Interaction of microorganisms with vascular plants.pptx
From social media to generative media (3).pptx von Mark Carrigan
From social media to generative media (3).pptxFrom social media to generative media (3).pptx
From social media to generative media (3).pptx
Mark Carrigan65 views
The Future of Micro-credentials: Is Small Really Beautiful? von Mark Brown
The Future of Micro-credentials:  Is Small Really Beautiful?The Future of Micro-credentials:  Is Small Really Beautiful?
The Future of Micro-credentials: Is Small Really Beautiful?
Mark Brown121 views
OOPs - JAVA Quick Reference.pdf von ArthyR3
OOPs - JAVA Quick Reference.pdfOOPs - JAVA Quick Reference.pdf
OOPs - JAVA Quick Reference.pdf
ArthyR376 views
Pharmaceutical Analysis PPT (BP 102T) von yakshpharmacy009
Pharmaceutical Analysis PPT (BP 102T) Pharmaceutical Analysis PPT (BP 102T)
Pharmaceutical Analysis PPT (BP 102T)
yakshpharmacy009118 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