title: How to handle Transaction Rollback for multiple database calls (Calling firebase and mongoDB Atlas)?
body: <p>So here is my scenario:</p>
  <ol>
  <li>I have a Firebase database</li>
  <li>I also have a MongoDB Atlas database</li>
  <li>There is a scenario where I have to write to a collection in a MongoDB Atlas database, then another write to a collection in a Firebase database and finally a completion write back to the MongoDB Atlas database.</li>
  </ol>
  <p>This is how I handle this:</p>
  <ol>
  <li>I start a MongoDB transaction</li>
  <li>I perform a write to MongoDB (in case this fails, I can just rollback no issues)</li>
  <li>I perform a write to Firebase (in case this fails, I can still cancel MongoDB commit and rollback)</li>
  <li>I perform another final write to MongoDB (ISSUE HERE)</li>
  <li>I then commit the MongoDB transaction (ISSUE HERE)</li>
  </ol>
  <p>As you can see that in points 4 and 5, if the operation fails, the writes to MongoDB can be rolled back but not the writes to Firebase. Obviously because both these databases are not linked and are not under the same systems. How does one approach this? I'm sure there are lots of systems out there with multiple databases.</p>
  <p>I am using NodeJS and Express to handle this.</p>