This article is part of our "Tiger Bridge - Under the hood" series, where we uncover technical details about our product, dive deep into the solutions it offers, and explain which decisions we had to make while designing it.
Dilemma
We had to implement a solution which avoids conflicts when accessing data, even in the case where users have no established connection method.
Background
While dealing with collaborative workflows, an object can be accessed by multiple users in different locations, which introduces a risk of conflicts.
There are three established approaches for overcoming these conflicts:
- Duplication
- Collaboration
- Sharing
Pros/Cons Analysis
The most traditional way to ensure no conflicts is to multiply a file by creating a copy of it every time you change it, which is the equivalent to sending it via email. The good thing about this method is that it eliminates complexity. The huge drawback comes when you need to combine the separate files after.
Collaboration is popular with tech giants like Google and Microsoft. They make a service in the cloud, which ensures that two users can simultaneously work in two different cells of the same Excel document. This makes it perfect for collaboration, but it only works for the Microsoft Office suite. It is not universal and this makes it inapplicable for the variety of workflows our customers face.
Before the cloud arrived, sharing used to be the go-to method for solving the conflicts problem. We put a file on a shared location and different users accessed it. Respectively, while one user worked on the file, others couldn’t.
The cloud does not have such a locking feature – any time you try to access a file, you ask the cloud to open it for you. However, that introduces a problem with speed and latency. Tiger Bridge is a hybrid on-prem-first solution, so we are trying to stay as close as possible to the regular workflow of users who access file servers from their computers. Since the cloud does not natively support file locking, we wanted to implement an opportunistic locking mechanism – not bullet-proof, but still working quite well.
When you open a file locally from one computer, Tiger Bridge does not ask the cloud if that file is locked. It simply opens it for you and then tells the cloud so it can lock it for everyone else.
While information about the file’s opening and need for locking is travelling, another user might open the file and work with it. Although this timeframe is measured in milliseconds, we still have a risk.
The plus of implementing an opportunistic locking mechanism is that you get rapid speed and do not need to ask the cloud for permission every time you open a file. The risk of conflicting access is present, but usually not problematic, especially in combination with versioning, which allows you to choose between the different options.
Decision
We decided to implement the opportunistic locking mechanism so we can keep our customers’ performance intact. The risk of concurrent access is there, but it is manageable – we can manually fix the problem if it appears.
This is an effective solution for collaborative workflows which do not require strictly live collaboration. If there are six users who need to access the same file simultaneously, the collaborative option discussed earlier would be better. However, in a workflow similar to the one with a file server, our solution works better as it is universal.