I'm currently using both mysql and firebase on my nodejs web server. In one of my functions, I am : inserting into my mysql database
db.any('INSERT INTO requests(id, firuid) values ($1, $2)', [userid, uid])
then I am updating firebase
.then(function () {
ref.child(uid).update({
"connecting": false
})
In order for the app to work both of these need to happen.
If firebase goes Down!! then a lot of data is going to be inconsistent since mysql inserts happen first. How would someone handle a situation like that?
via slimboy
No comments:
Post a Comment