nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.97k stars 781 forks source link

Badge to see if a file is opened by another user #83

Open biva opened 6 years ago

biva commented 6 years ago

I totally agree with @karlitschek that "Nextcloud is about collaboration". I'd like to suggest a new feature for file editing on desktop (I'm working on Office 2016 under Windows 10).

If UserA is editing the shared file "File.doc" at the same time as UserB, it can lead to synchronization conflicts or loss of modification. In order to avoid this situation, it would be interesting to have an indication (for example a badge like in Dropbox) that the file is currently used.

The way Dropbox does it is almost perfect for me: https://www.dropbox.com/help/business/badge-overview

A first step could be to implement this feature for MS Office files, detecting the presence of "~$File.doc":

  1. UserA opens File.doc (which is shared with UserB)
  2. ~$File.doc is created by MS Word in the same folder
  3. NC Client detects ~$File.doc (nota: it doesn't sync it, as it's in the exclude list)
  4. NC Client sends the information to NC server that UserA is modifying File.doc
  5. UserB opens File.doc
  6. NC Client of UserB detects ~$File.doc on UserB local folder
  7. NC Client of UserB checks on the server and sees that UserA is modifying File.doc
  8. NC Client of UserB displays a button (similar to the Dropbox badge) in front of MS Word, informing UserB that File.doc is currently being modified by another user

As additional features, I can suggest the following:

biva commented 6 years ago

For information, this feature was suggested on Onwcloud Client in a different way: https://github.com/owncloud/client/issues/5112

And it also may be related to: https://github.com/owncloud/client/issues/4557

michaelstingl commented 6 years ago

How is the "Dropbox badge" implemented? I'd guess this requires a plugin/extension for M$ Office?

biva commented 6 years ago

I don't exactly know. But in my opinion, it's not necessary to make a plugin: the button just has to be in forefront. Making a plugin would limit the button to Office documents: in the future, it would be great if the button is compatible with other softwares (LibreOffice, pictures, ...).

If a button in the forefront is too complicated, another solution could be to add a new icon in the taskbar (next to the date/time in Windows), that would appear only if the file is used by another user.

Or a last solution would be to modify the Nextcloud icon in the taskbar when it's needed (when another user is using the same file). But I don't like this last solution, as I hide this icon: 99% of the time (when nobody is using the same file) the icon would not be useful.

biva commented 6 years ago

An example can be seen here: https://dropboxmainblog.files.wordpress.com/2015/10/badge-final.gif?w=650&h=480

biva commented 6 years ago

@michaelstingl should I open this issue in https://github.com/owncloud/client/ ? I don't understand exactly if Nextcloud and owncloud are using the same client, or if they are separated now. Thank you!

michaelstingl commented 6 years ago

should I open this issue in https://github.com/owncloud/client/ ?

@biva That's up to you. I don't expect this implementation with overlays for 3rd party applications on the ownCloud client roadmap in the near future.

biva commented 6 years ago

I don't expect this implementation with overlays for 3rd party applications on the ownCloud client roadmap in the near future

OK, so I let this issue here, and will wait for an opinion from the Nextcloud team.

biva commented 6 years ago

I read this interesting article (The Story of Auto-Completion in Nextcloud Comments) making me think that a comment possibility would be great in the desktop client. Is somebody from Nextcloud thinking that it would be possible? @rullzer maybe? Thank you!

biva commented 6 years ago

Now that we have Nextcloud Talk (congrats to the team!), and reading the last article of @karlitschek (http://karlitschek.de/2018/01/nextcloud-talk-is-here/), I really think a feature like the badge is in line with current improvements towards collaboration.

Office Online and Google Docs both have similar features (see who is working on the same document). OneDrive tells you when someone edits shared content (even if it's slightly different).

In a second step, we could also integrate simultaneous co-authoring (https://support.office.com/en-us/article/collaborate-on-word-documents-with-real-time-co-authoring-7dd3040c-3f30-4fdd-bab0-8586492a1f1d).

Is anyone interested? Or do you see workarounds to see if somebody is working on the same document?

ad1rie1 commented 6 years ago

Any new on this fonctionality ?

biva commented 6 years ago

Unfortunately not :(

I don't know if this issue should be posted here, as:

ad1rie1 commented 6 years ago

Yes, the next cloud client see no real activity :/ it's strange because the client it's the first thing a user see and use.

jospoortvliet commented 6 years ago

@ad1rie1 not sure what you mean with 'no real activity' considering the 2 people working on it... Besides the E2EE work, check github for some recent enhancements: https://github.com/nextcloud/client/pulls?q=is%3Aclosed+is%3Apr+label%3Aenhancement and I know about more good stuff coming, like a redesign of the sharing dialog and much improved main UI ;-)

Anyway, this is a rather big thing, and we've discussed this feature a few times. It has some serious downsides, so it isn't an obvious feature. The two main issues I remember:

This problem has something in common with other much requested features like end-to-end encryption and delta-sync in that it is FAR more complicated than people tend to think, and benefits are more vague than it seems at first sight. The question now is if it has more in common with end-to-end encryption in that it is complicated but has real benefits even with all the downsides, so some day we have figured out the perfect way and we do it; or is it more like deltasync that simply doesn't have the benefits most people seem to think and thus we will probably end up not doing it unless a customer explicitly wants to pay us for it.

Rest assured this is on the radar and we think about it. If some day there is real customer demand we will prioritize this more - right now, it is very low priority as none of our customers or prospects has voiced interest, that I know off. And we don't think it is interesting for home users, otherwise many of our engineers would consider doing it in their free* time. Also note that joining one of our hackweek events or the conference, to help code it - that's a great idea. Or contact sales and see if you can pay for it, if your company needs it.

And of course, if somebody wants to do this in their free time, go ahead - we're always happy with contributions and support that 100%!

If you use the web UI you can use https://apps.nextcloud.com/apps/w2g2 to get this. That was done by a very awesome community member, resurrecting an app earlier done by, I believe, a student from India. Again, if there's commercial interest, we'll look into supporting it, of course.

wrt * our team gets a significant chunk of their time to decide what to work on by themselves - stuff that helps Nextcloud, especially for home users - we still want to give everybody a way to protect their privacy after all, it is why we started this company in the first place. This is a big part of our contribution, as company, to that goal. But of course, we don't expect them to work on enterprise features - like with any company, such development is guided by customer demand and our strategic goals.

Also, ref https://github.com/nextcloud/client/issues/217 and https://github.com/nextcloud/server/issues/1308

biva commented 6 years ago

Thank you @jospoortvliet for your long reply, much appreciated. And I understand your position if we speak about locking.

In my mind, this feature is not about locking a file, but just informing the user that somebody else is editing it. I use NC at home, not in my company: we use Dropbox and we do use the badge in this way. In my family, we do edit the same files sometimes. Last usecase: our wedding Excel file (you know, the one with all guests and planning, and "happy" organization :-D ): it was frequently edited by my wife, my brother and my sister.

To be clear, I would have been (very) happy to see that my brother is editing it, before editing it myself and then look for the differences between the file and the "conflict file". I don't need to lock it: if I see that somebody else is using it, I can call him to ask him to close it. Or I can decide to edit it also, and accept the creation of a conflict version.

In this option, do you still think that it is far more complicated than what I think? Don't you think that we could start implementing this feature for MS Office files, detecting the presence of "~$File.doc" (file which is created as soon as it is edited, and deleted as soon as the Office file is closed)? I would see these steps (Client = Desktop Mirall Client):

  1. Wedding.xls is shared by UserA and UserB
  2. UserA opens Wedding.xls
  3. ~$Wedding.xls is created by Excel in the same UserA local folder
  4. ClientA detects ~$Wedding.xls (nota: it doesn't sync it, as it's in the exclude list)
  5. ClientA sends the information to the server that UserA is modifying Wedding.xls
  6. UserB opens Wedding.xls
  7. ~$Wedding.xls is created by Excel in the same folder
  8. ClientB detects the creation of ~$Wedding.xls in UserB local folder
  9. ClientB sends the information to the server that UserB is modifying Wedding.xls
  10. The server knows that UserA is already using it: it sends this information to ClientB
  11. ClientB displays a button* (similar to the Dropbox badge) in front of MS Word, informing UserB that Wedding.xls is currently being modified by another user
  12. UserB decides what to do: he can call UserA (using NC Talk!) to ask him to close it, or continue editing the document (that can lead to the creation of a conflict version)

'* the button could be a changing icon in the task bar for the Client icon

I would love starting working on this project, but I have no skill in programming :(

fixiteric commented 6 years ago

I tried to remove the ~$* from the exclude list, the files sync correctly between my stations but for some reasons excel doesn't recognize that the file is in use. This method works fine with openoffice lock files.

biva commented 6 years ago

@fixiteric Yes, that could be a workaround. But I'm not surprised Excel does not consider it as a lock :(

biva commented 6 years ago

@fixiteric Your idea could be a first step for implementing the badge for Office. We just miss a program "NC-Badge" that is triggered when an Office file is opened:

  1. Open Wedding.xlsx
  2. NC-Badge is triggered and knows which file has been open
  3. NC-Badge looks into the corresponding folder for a file ~$Wedding.xls
  4. If this file is present, a MessageBox appears "Be careful, this file may be edited by somebody else"

That's it. But I'm not a programmer and I have no idea to do step 2 and 3. Anyone?

jocarren commented 6 years ago

I've seen something like this in Syncplicity: https://syncplicity.zendesk.com/hc/en-us/articles/211359346

clecap commented 6 years ago

Relying on office programs to produce a $ file is dangerous for several reasons.

1) What do we do with other kinds of programs which do not use such features?

2) Opening a file and creating a $ or similar lock file is not an atomic transaction, so it will lead to race conditions.

It is probably better to detect the opening of a file using a kind of inotify feature and then not lock but track revision numbers (as CouchDB for example), producing a conflict file if necessary.

biva commented 6 years ago

@clecap

  1. You're right, but starting with something which is widely used (Office and LibreOffice) is better than nothing, and probably easier than a universal solution
  2. I don't understand, sorry :-/
clecap commented 6 years ago

@biva

  1. Agreed. But it produces a situation where a features works for some file types and does not work for other file types, which is quite confusing for the end user and remains unreliable after all.

  2. This is unfortunately quite more complicated than can be explained in a github commentary. We have to assume various additional failure modes such as detached communication, various communication delays and more. The simple scheme with the $ file is not producing the best we can do and is buggy in several situations, to say the least. In distributed data base systems these problems have been solved (multi version concurrency control, Redis or CouchDB or PouchDB) and thus this part of the system should definitely be designed and solved by an expert from that area. See https://news.ycombinator.com/item?id=11803431 for a debate of just a small number of possible issues.

biva commented 6 years ago
  1. Unreliable → I don't know but I trust you if you say so. I still think that unreliable is better than nothing in this particular situation (depending on the degree of unreliability though, I agree) Confusion → I don't agree on this point. People are not as foolish as that: if this feature is clearly labelled "Office and LibreOffice document only", (almost) everybody can understand that. Do you think there's a confusion with the viewer on the web UI? (you can view PDF files, and not Office files)
  2. Thanks for the explanation: it goes beyond my skills ;)
clecap commented 6 years ago

I see the following problem: For non-specialists, NC is a tool which should work. For a tool you form a mental model how it is working. I think it is fine if a tool supports PDF and does not support PNG. But to state that certain concurrent edit operations on one type of files work DIFFERENTLY than on another type of files is confusing and the frustration likely will be projected on NC in its entirety.

biva commented 6 years ago

Sorry, but I don't agree. For the majority of users, it does not apply:

freechelmi commented 5 years ago

Hi is this issue the right place to discuss this feature ? We have several client that request this feature and are willing to help.

biva commented 5 years ago

@freechelmi : that's a good news! The other place to discuss this feature was https://github.com/nextcloud/server/issues/1308 but it has been restricted by Nextcloud admin. What I understood is that they are interested in the feature, but they don't have enough request from their own clients and don't have ressources to work on it now (which I regret, but understandable).

If you want to work on it: more than welcome! But it means that you should code it (I'm not skilled for that). I think Nextcloud would also welcome your initiative and could bring you some support (to be confirmed by @jospoortvliet though ;) )

biva commented 5 years ago

@freechelmi Do you still want to help? It would be great. And totally in phase with the direction of nextcloud towards collaboration: https://nextcloud.com/blog/nextcloud-14-collaboration-features-help-you-get-work-done/

freechelmi commented 5 years ago

Hi I definitely want to help , sorry for the lag.

For now we push collabora online to our client , but I'm sure the "activate notifications when a document is opened by 2 people " could be a good start

biva commented 5 years ago

@freechelmi you can also read the discussion in https://github.com/nextcloud/server/issues/1308 As NC teams have other priorities for now, are you able to propose a draft of this "notification" feature?

freechelmi commented 5 years ago

Yes I read the lock feature as well but this may be worse ( remember sharepoint) Dropbox badges are the way to go.

I'm really far right now from being able to propose such a big PR myself but I will contact other hosters to see how we could collaborate on this.

biva commented 5 years ago

Excellent :)) I hope you'll find other contributors. I'm sorry for not being very helpful as I don't code at all :( But I can test !

Thank you again, totally agree with you: I also prefer the badge over locking.

zippytiff commented 5 years ago

hi,

has anybody worked out how to fix the excluded files feature in these new releases ? we can remove ~$ (as its now not greyed out) but it still wont sync them !

fingers crossed

ZT

biva commented 5 years ago

Hello @zippytiff Which new releases are you refering to? Some thoughts:

zippytiff commented 5 years ago

Ok, so i dug into this a little,

2.5.x uses this location C:\Users\Tim Middleton\AppData\Roaming\Nextcloud

2.3.x used this location C:\Users\Tim Middleton\AppData\local\Nextcloud

then there is the location mentioned in your post

What i found is that its the one referenced next to 2.5.x

Thankfully manually editing the file solves my original issue, so looks like the gui manipulating this file is broken

Next i need to be able to deal with the conflict files as in decide what to do with them

Thanks again

ZT

stanelie commented 5 years ago

+1, All my users would like to have this "dropbox badge" feature, it would solve a lot of headaches with "conflict" files.

stanelie commented 5 years ago

Even better : G Suite's implementation, with a floating badge informing users of who has it opened, when it is safe to edit, a download button to re-download an updated copy and a preview button when a conflict file exist that allows you to see the differences side-by-side : https://gsuiteupdates.googleblog.com/2018/07/avoid-microsoft-version-conflicts-with-google-drive.html

biva commented 5 years ago

Thank you @stanelie , I didn't know that Gsuite had a similar feature.

@jospoortvliet : this Google's feature also shows that starting with only one format (MS Office) is possible and understood by most of the users (one of the fear was that providing this 'badge' feature to a specific format only would confuse users). So why not doing the same at Nextcloud, maybe adding the feature for LibreOffice document also?

kw1knode commented 5 years ago

Any update on this?

sebmza commented 5 years ago

I'd like at least a pop-up in the client that warns the user the file is open by @someuser Thanks!

jocarren commented 5 years ago

Well, we finally moved to Seafile only because of Nextcloud lack of conflict prevention (locking, badges, notifications) and the total disinterest of implementing something of that sort. Sorry, I really like Nextcloud, but this is a dealbreaker for us.

deajan commented 4 years ago

Nobody ? This would be THE feature I'm waiting for in Nextcloud (and owncloud before) for years. I really cannot understand that the NC team doesn't see any value in this option, since this is the reason Nextcloud can't compete with onedrive and co. Anybody care to explain ? Maybe all our usecases for nextcloud are bad ? Maybe there's another solution we're not seeing here ?

jospoortvliet commented 4 years ago

https://github.com/nextcloud/files_lock -> it is under development. As I said - we are interested in this feature, but there are a LOT of other features we want to do, so before this comes in the client we are certainly speaking mid 2020 at the earliest. If you need this in your business, well - contact our sales team. Perhaps we can speed it up by hiring more people. But for that we need to earn money ;-)

Of course, help in implementing it is also very welcome. In the end it is all about priorities and it is customers who have a big input on our priorities, as they pay our bills. We care about home users as well, of course - but they generally have no big need for this feature, so it ends up on the bottom of our priority list.

CedricGoby commented 4 years ago

Hi,

In the end it is all about priorities and it is customers who have a big input on our priorities, as they pay our bills.

As a customer (My organization pay the bill, and we are happy with Nextcloud Team) we would like to see this feature coming soon. We experience some loss of data using OnlyOffice because files can't be lock for edition. This wouldn't solve every cases but this would be a great step ahead.

eg : As I have understood, if two guys open a file in their web browser the last guy who close the browser will have his modifications saved, and this will destroy the work of the first guy who closed the file earlier. Additionally, if the sync client is installed the first guy will sync with the version of the second guy and lost is work locally too...

We have 2 cases already of loss of data because of this and that's not good.

Even the local incremental backup couldn't help to recover an older versions of the file because the user didn't know the wrong version of the file was backuped. When we realized this it was too late to get back an older version of the file due to the incremental setup (30 days).

rsmpoland commented 4 years ago

Hi,

I would also like to ask about this feature. In our case, we have experienced multiple unnoticed file overrides and data loss. We have been using NextCloud for over a half of the year and we love it, but after we had switched from DropBox, this is the only feature we really miss.

RSM Poland

biva commented 3 years ago

@freechelmi Were you able to investigate further? This feature would still be great!

freechelmi commented 3 years ago

Thanks @biva for raising back the ticket , We have not work on it as LibreOfficeOnline is now 99% replacing libreoffice desktop and works beautifully , but for other type of document it would still be a feature useful

ImaCrea commented 3 years ago

@freechelmi Were you able to investigate further? This feature would still be great!

Yep I agree very much. Even though we're offering Nextcloud with OnlyOffice integreation here, we often see users who want to be able to edit their documents freely within the comfort of their finder and not to have to open a browser every time.

stanelie commented 3 years ago

LibreOfficeOnline is not an option for our users either, some of them don't even know there exists a web interface to Nextcloud, they use the sync client exclusively and work with MS Office.

The data/work loss as explained by @CedricGoby caused by this missing feature is unacceptable to us.

ImaCrea commented 3 years ago

Quick candid question @jospoortvliet : let's say we could set somehow a kind of crowdfunding here between all the people interested in such feature. Is there a way you could tell us approximately how much would cost such implementation on your end accompanied by a timeframe estimation please? Or maybe redirect to who should we talk to about this?

pierreozoux commented 3 years ago

As far as I know, Nc doesn't do this kind of things.

You can read https://help.nextcloud.com/t/how-to-support-development-of-nextcloud-and-its-environment-financially-alternative-to-bountysource/90403/8 and all links to get a better understanding of the challenges of "crowdfunding" bugs and feature requests.