How we got out of Review Rocket
Background
When we first built MindFlayer we had the question
Do we put our data in our own database? Or do we put it in Review Rocket
Ultimately we chose to put it into Review Rocket because it helped us to join to the Organization table to verify that the widget is never not connected to an Org and so we could join to Locations which lets us be more normalized.
Normalized means that any piece of data is only stored in one place so when that place updates, all the other places are consistent. For example if you change the name of a Location, that change will reflect everywhere immediately. This is a really nice property to have, however it comes at a cost...
CAP choices ๐งข
Normalized is great, and consistency is great, but it comes at the cost of Availability. So the CAP theorem says that out of these 3 options:
- C: Consistency, all data is in sync at all times. Meaning if you read the same piece of data from two places it will match up (Location's name)
- A: Availability, you can get that data at any point in time, even during a network partition.
- P: Partition Tolerance, if the network fails and your databases can't talk to each other, things can still be written and read (maybe not all the data)
You can only choose 2. We have chose C and P. However it wasn't the right choice for our needs.
Being more "Abnormal"
Turns out Webchat really needs availibility