If you want to know how do we manage data between BookingSync and us, this is your article!
First of all, you should know that there is two type of data: data that is from BookingSync and we keep it sync with our server and data from features that are only in Rental Ninja. An example of the first type are bookings. We need this information to do almost everything and we need to have it in our data base to avoid too much interaction with the BookingSync server and to provide an easy and fast access to all of our functionalities. Examples of the second type of data are accounting statements, pictures, alerts,...
What happens when I save something via Rental Ninja?
We immediately save it to BookingSync and once correctly saved, we save it to our database. In case of Rental Ninja exclusive data, we just do the second.
There is a special case though where we store information in our server without saving it to BookingSync until we are allowed to do so. This case is with damage deposit introduced the arrival day before 14h UTC. To know more about this, please visit the section "Damage deposit on the arrival day" of the Adding a payment & Payment status article.
What happens when I save something via BookingSync?
In case of saving something directly to BookingSync, we receive something like a notification for our server. Then, it requests for this new information and updates it in Rental Ninja. This kind of "notifications" are not available to every single field of the BookingSync database. We receive them for almost everything, but there is a few things that we don't. To solve this issue, we make a team sync (see next section) every hour only with the fields that are not included in those notifications.
Apart from updating our database each time there is a change, we make regular updates to make sure we are completely synchronized with BookingSync:
Team normal sync
As explained in previous section, every hour each team is synchronized with BookingSync database. But only the fields that we don't receive a notification when they are changed in BS database. Almost everything is directly updated in our database when you change it in BookingSync. Only a few things doesn't. But with this sync, we make sure every hour you have your information as in BS.
Full team sync
This synchronization job is executed for each team once per day. This synchronizes all the information from a team with BookingSync. But this is an incremental copy: it looks for what has been changed in the last 24h and makes sure it's correctly updated.
Full forced team sync
This last sync job is the most extensive one. It forces the full synchronization of a team from the beginning of the timeline. It puts a team exactly as in BookingSync, looking for all the information. We can't do this very often because is very expensive in server terms and it takes quite a lot. We do this when a new team registers to Rental Ninja and it can take a while if the team has many bookings. This is why the first time you join Rental Ninja as a team, you don't see all the information from the beginning until this is finished.
We also do this type of synchronization once per hour to one different team each time. By this way, we reduce at the minimum the chances of having not coincident data with BookingSync.