Tiempo de lectura: 6 minutos
Co-authoring files is a phenomenal way to boost organizational productivity, but it can also introduce some roadblocks. The biggest one? Conflicting edits as multiple users work in the same file at once, accidentally overwriting each other's changes and not even being aware another user was in the file.
One set of edits — whichever is saved last — wins and the other set loses.
At best, team members lose time and get frustrated, while IT teams get pulled in to try to restore file versions. At worst, important data gets lost and incorrect files get shipped to printers, clients or partners.
So, the question becomes: how can organizations enable collaboration on datasets without sacrificing data quality and consistency?
Most desktop apps have supported locking for years — it’s a file collision avoidance system that is as well-established as network-attached storage (NAS) itself. File locking prevents data corruption and preserves file integrity by stopping users and team members from editing the same file, or the same part of a file, at the same time so they cannot interfere with each other’s work. Most modern cloud-native applications have more granular range locking built in. For example Google Docs, Sheets, and Slides all support co-authoring with multiple users able to edit these cloud files simultaneously without colliding edits. Microsoft Office applications similarly allow range locking, with significantly better results using desktop applications.
Explicación del bloqueo global de archivos
Global file locking ensures only one copy of a file is edited at a time, even when the file is on a network drive accessible to multiple users. It prevents file corruption by enabling users to collaborate on the same set of data without the risk of while preventing them from damaging or overwriting each other’s work.
Alternatives to global file locking include versioning - which allows users to open a second copy of a file that another user is currently editing. This copy is tracked as a unique file which allows both users to work simultaneously but gets messy and time-consuming when these individual copies must be manually integrated to ensure all changes are incorporated into the final version of the file. Global file locking prevents this.
But here’s the downside: real time global file locking runs into problems when you introduce distance, including a move to cloud storage. Effective collision avoidance relies on real time recognition of file opens as well as user location within files in order to prevent overwrites. Distance, latency and lack of functionality often render the file locking built into software applications unusable.
File Locking Glossary
Not all file locking is created equal and the geeks among us love to understand the different possible approaches in order to know what’s going on behind the scenes. After all, the resolution for file corruption issues often land in IT, which isn’t usually the team generating or working with the data. Here’s what you need to know.
Advisory Locking
El bloqueo preventivo no proporciona una protección total contra modificaciones conflictivas porque depende de la cooperación entre usuarios. Los usuarios pueden ignorar un bloqueo asesorado, pero esa opción está totalmente desaconsejada porque puede provocar la corrupción de los datos y la incoherencia.
Cuando un usuario solicita acceso a un archivo, el bloqueo de aviso notificará a ese usuario que existe un bloqueo. De nuevo, el bloqueo preventivo no impide el acceso; sólo informa al usuario de que debe evitar trabajar en el fichero. Cuando un usuario solicita un bloqueo preventivo para un fichero, el sistema comprueba si existe algún bloqueo. Si hay bloqueos existentes, devolverá un mensaje de error.
Los bloqueos consultivos son más eficaces si varios usuarios necesitan acceder a un archivo simultáneamente. Sin embargo, esos usuarios también deben comunicarse entre sí para que sólo un usuario esté escribiendo a la vez. Incluso cuando se aplica un bloqueo preventivo, los demás usuarios pueden seguir leyendo el archivo sin causar problemas.
Mandatory Locking
Mandatory locks are enforced by an operating system that prevents users from accessing or modifying a file that another user has already locked. Unlike advisory locks, users can’t choose to ignore mandatory locks. If a user requests a mandatory lock but another mandatory lock already exists, the user will be denied access to the file until the other lock is released.
El bloqueo obligatorio es útil cuando una empresa necesita evitar que varios usuarios modifiquen simultáneamente el mismo archivo. En ese caso, este tipo de bloqueo garantiza la coherencia de los datos y evita la corrupción de archivos.
On the downside, mandatory locking can create performance overhead and result in synchronization issues if not used properly. The feature is also not available on all file types or operating systems.
Shared Locking
With shared locks, multiple users can access a file simultaneously for reading purposes only. All editing is prevented with a shared lock, which ensures consistency and integrity. Shared locks are granted to users if they don’t conflict with existing locks on a file. An exclusive lock can’t be granted until all shared locks are released.
Los bloqueos compartidos son excelentes para las empresas que buscan mejorar el rendimiento y la eficiencia del sistema. Sin embargo, si un archivo debe modificarse con frecuencia, el bloqueo compartido puede no ser ideal, ya que la edición está prohibida hasta que se liberan todos los bloqueos compartidos.
Exclusive Locking
Exclusive locking grants a single user exclusive access to a file and will hold that lock until released. This prevents other users from reading or writing to the file, ensuring data integrity and preventing conflicts.
Exclusive locking is ideal for sensitive or critical files that require strict control over access. It can also be useful in scenarios where a single user needs to work on a file without interruptions. However, it brings with it the all-too-common scenario in which a user accidentally leaves a file locked by leaving it open on their device. This generally requires IT intervention to break the lock by forcing a user log off.
Range Locking
Range locking allows users to lock specific portions of a file. This prevents conflicting modifications and enables multiple users to collaborate on the same file simultaneously without risking data corruption.
As users move through the file, the application recognizes their location and specifies the start and end points of a byte range, locking it for that user alone. This means users can effectively work on designated sections of a file while preventing others from editing those areas. This is particularly useful for teams collaborating on large documents, codebases, or other complex files where different team members need to work independently on specific parts.
Compared to global write locking, which locks the entire file, range locking provides a more granular level of control, allowing for efficient collaboration on various sections of a file. This more modern approach improves productivity and reduces the likelihood of conflicts, especially in scenarios where multiple users need to work on different parts of a file simultaneously. However, it’s challenging to achieve over distance, as latency means a lag in recognizing where the user has moved to in the file.
Distributed File System Replication (DFSR) and File Locking
DFSR is a Windows feature that enables efficient file sharing and collaboration by replicating files between multiple servers. DFSR tracks changes at the block level, allowing for efficient replication of specific file modifications. It can operate in synchronous or asynchronous modes, ensuring consistency or allowing for delayed replication.
While DFSR is a powerful tool, it may not be fully compatible with certain file locking mechanisms. DFSR's conflict resolution strategies are not always be sufficient for preventing data corruption or ensuring consistency in scenarios where multiple users are actively editing the same file.
When considering DFSR, organizations should carefully evaluate its limitations and potential drawbacks. Factors to consider include performance overhead, network requirements, and the integration with existing file locking systems. In some cases, alternative replication technologies or custom solutions might be more suitable for achieving desired levels of file sharing and data integrity.
The developers of software applications engineer file and range locking so that it performs maximally for users of the application. And, every aspect of bat365’s hybrid cloud file platform CloudFS is engineered for maximum productivity and efficiency. That’s why CloudFS explicitly enables application-specific locking to work in the cloud and across vast distances.
That means that file locking and granular range locking work at the speed of business for applications that support it, regardless of the number of locations and users or the distance between them.
The core of bat365’s hybrid cloud file platform CloudFS is a global file system that enables an organization to use centralized cloud storage as if the data is still stored near to the user. CloudFS separates metadata from file data and moves the least amount of this lightweight informational data across the shortest possible distance, so every location that accesses cloud-stored files knows exactly what’s happening, in real time.
Locks are passed between locations as they’re requested and either granted or denied. The result from a technology perspective is the seemingly impossible — real time exchange of data around the globe, even when working on very large files and complex file models.
For the organization, the result is global file co-authoring that allows an entire organization to work as collaboratively as if everyone is under the same roof. The competitive advantage that comes with a high-performance file environment like this is exceptionally difficult for others to make up.
Moreover, it’s largely invisible to the outside world, which leaves this advantage to savvy IT leaders who understand the business impact of enabling high performers with a file environment that supports their best work.
Only a very few solutions come close to enabling performant file and range locking over any distance at all. bat365 CloudFS stands alone in its ability to achieve real time locking globally, irrespective of the number of locations, users at each location, or the distance between them.
From LA to New York, Sydney, Australia to London, England and everywhere in between, bat365 empowers organizations with immediate data delivery that transcends the barriers of distance, network connections and time zones to allow co-authoring and collaboration that fuels business innovation and success.