My group uses MS Teams for various purposes, but I’m puzzled about one feature: We post files for the group to update. How can we all update the same file at the same time? I did not think that was possible. (Or, maybe it can’t, and it’s just dumb luck I never get a message the file is in use?)
Not sure if this actually posted.
Are you asking how Microsoft makes it work?
They’ve moved a bunch of their office 365 collaboration tools into teams over the last few years. It’s also subsumed SharePoint in a lot of ways. When you upload a file it’s automatically made available for collaboration.
Teams is built on top of SharePoint, so anything under the files tab in a channel has an underlying. SharePoint document library.
Anyone can co-author in the Teams desktop client, or in Teams and SharePoint using the web client. Anyone using a modern version of Word or Excel can coauthor in the desktop client just by opening from Teams. Do not download the document to local storage first.
You need to be using modern file type (.xlsx or .docx) to coauthor.
In Excel documents on Sharepoint/teams, you can see the cell highlights for other people editing the document - so the locking and conflict management takes place at cell level, not the whole file.
Not sure what it looks like in Word. I think it uses something that looks like the old ‘track changes’ engine
The functionality for multiple people to edit Word, Excel or PowerPoint files at the same time has been in place for a few years in Office 365 (or Microsoft 365, or OneDrive, or SharePoint, or Teams – different faces on the same platform).
In Teams, locate the file you want to work on, and select one of the Open commands. You can open it in place (on a web page within the Teams window – so very similar to Google Docs) or you can “Open In App” (which opens the real desktop Word or Excel working directly on the common online file, with continuous saves).
“Open In App” has fuller functionality and more precise formatting. In desktop Word or Excel or PowerPoint, you can see the avatars of everyone who has this document open at this moment, in the upper right corner. You can see your coworkers’ cursor move around the document (as colour-coded markers with their initials) and you can see their changes in real time. In my experience it all works correctly as long as everyone has a reliable Internet connection. Of course if you’re doing a major restructuring of the document, moving whole chapters around or changing wide-reaching formulas in Excel, it’s probably best if only one person has it open; but again I’ve never experienced a problem.
With every TEAM channel there is a files section, upload what you want into there, Right click on it and get the link for it, go to the chat for that channel and post the link there saying something like “please everyone update this by next wednesday”.
Everyone in that channel (as long as they open that file directly from the link) will have the necessary permissions and be able to add their updates to that version of the file.
No, I am not asking how the enduser does this, or how to share a file. I am asking what physically makes this possible when it was always impossible for two people to edit the same document simultaneously. And, what if two people edit the exact same sentence at the exact same time?
If you have an ordinary document on an ordinary file share, the whole file gets locked when you open it - either by the filesystem/server OS, or by the application you’re using to open the file (some applications do this by creating a separate ‘lock file’ adjacent to the file that is opened, so subsequent processes trying to open it will see that and refuse to open the file.
In Sharepoint, you’re not actually editing the file - you’re communicating with a server back-end that is doing the editing; the back-end process owns the lock, but multiple front end processes may be able to communicate with it to request changes, if such is the design.
It’s true that, 10 years ago, Word and Excel had very aggressive file locking to prevent 2 people from editing the same document. Excel had a limited collaboration mode in the early Aughts, but it only worked on some special documents and with limited functionality.
I think I read somewhere that the key to making Google Docs and Microsoft 365 work is to encode all operations on a timeline. The whole system must be able to say : user Q added the word “giraffe” at precisely this time, then user R changed the second sentence to Bold. If they did their changes at the same time, the system will decide that one came 1 microsecond before the other. This is not easy technically, as the cloud servers and the desktops all need to reconcile their clocks; but Google did it (or bought a company that did it, IIRC) and others replicated it. Once you have this consistent sequencing, the “real” version of the document is an objective thing, and everything is just a giant list of small and large operations on this document, also allowing infinite undo and redo.
As Heracles says, the answer is versioning, something that has been a staple of certain professions (software and law, for example) for decades and has now migrated to other fields and areas of life.
Editing a file does not change the file bytes anymore; rather, the initial bytes are stored in a database and then every change gets written as a new row. A file can then be reconstructed to any given point in time by starting with the original content and then applying all changes up to that timestamp.
In the unlikely event that two users attempt to change the exact same row at the exact same millisecond, the database will sort out a first come, first served situation but will ultimately write both changes.
I believe sharepoint has a variety of scenarios where it will tell you a conflict happened (like, say you change the colour of a piece of text to red at almost the same time as someone else deletes the text) and present you with choices about how to resolve it.
There’s not really any such thing as two things happening at the same time - even if the time between them is too small for the computer to measure, two changes arriving ‘at the same time’ will be processed in some way that puts them into a list of things to do, one after the other - the order may be arbitrary based on the way the computer processes multiple inputs in turn or something, but there can still be collisions because of latency (user B doesn’t immediately see a change already made by user A, so is theoretically able to make a change that conflicts with it) - these are called race conditions and handling them is the bread and butter of multi-user systems.
The nuts and bolts has been a staple of distributed systems research for quite a while. As noted above, the actual master of the document lives in a central server. Operations on the document are applied from the various clients. A key idea is there is a serial history of operations. This is an ordering of operations that is determined from the parallel streams of operations. How this serial history is determined is part of the magic sauce.
Perhaps one of the important ideas is that this serial history need not be, and possibility can not be the same as any individual view of the order of applications as might be seen from a client. The nature of distributed clients is that there is no one true view of the order of operations.
What matters is that there are rules for conflict resolution that pick a consistent serial history from the possible options. Mostly, in reality, you don’t get into too much trouble. People are unlikely to be continually fighting over the same sentence.