Keyang's Blog
  • HOME
  • CSVTOJSON
  • PSDETCH
  • UML Editor
  • ARCHIVES
Word of Forks
HOME CSVTOJSON PSDETCH UML Editor ARCHIVES

Mongodb two phase lock example (with mongoose)

Mar 17, 2016

Mongodb needs extra collection for two phase lock.

1
2
3
4
5
6
7
8
9
var transactionSchema=new Schema({
lastModified:Date,
status:{
type:String,
default:"new",
index:true
},
data:{}
})

The transaction life cycle is new->pending->applied->done

Read More
mongodb
Keyang Xiang
web, mobile, container, cloud
Categories
  • Node.JS
    2
  • Openshift
    3
Tags
angularjs cli css docker express.js html js linux macosx trick minishift misc mongodb mongoose.js nginx node.js nodejs npm openshift openssl raspberrypi test web web, javascript wordpress
©2018 Keyang Xiang