Quantcast

Feature #2237 (Watching for mindmap files updates)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Feature #2237 (Watching for mindmap files updates)

Felix Natter
Administrator
hello Dimitry,
hello Volker,
hello other Devs,

I am starting to implement
http://sourceforge.net/p/freeplane/featurerequests/2237/:

I think the main use case is:
- user X opens mindmap M on share S
- user Y opens mindmap M on share S
- user Y changes mindmap M on share S, and user X
  should be notified about this change very soon in order
  to avoid (but not prevent) conflicts.

See also:
http://korap.ids-mannheim.de/2012/06/collaborative-mind-map-editing/
(I have no clue about dropbox, so I don't know whether that will work)

UPDATE: I just noticed "Experimental file locking".
Do we want to use/improve this feature, or create a simple solution:

- using a background thread that checks (every five seconds or so)
  whether any of the open mindmaps has a modification date [1] newer
  than the latest save date for the mindmap of the current freeplane
  instance. If so, a popup should appear asking whether to open the
  updated mindmap.
 
[1] this will be a challenge to get to work cross-platform.

- I think this should be restricted to times when the freeplane instance
  has the focus (like notepad++ does it)?

- optional (prefs setting)

Questions:

- "Experimental file locking" + check lock files or simple solution with
  checking modification times?

- Where to start the background thread? This should be a class that has
  access to the list of open mindmaps.
  org.freeplane.view.swing.map.MapViewController?

- What to do when the local freeplane instance also has changes?

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Feature #2237 (Watching for mindmap files updates)

Dimitry Polivaev
Administrator
> I think the main use case is:
> - user X opens mindmap M on share S
> - user Y opens mindmap M on share S
> - user Y changes mindmap M on share S, and user X
>    should be notified about this change very soon in order
>    to avoid (but not prevent) conflicts.

Also in order to be able to reload the map when it changes

> UPDATE: I just noticed "Experimental file locking".
> Do we want to use/improve this feature, or create a simple solution:
>
> - using a background thread that checks (every five seconds or so)
>    whether any of the open mindmaps has a modification date [1] newer
>    than the latest save date for the mindmap of the current freeplane
>    instance. If so, a popup should appear asking whether to open the
>    updated mindmap.

I think the file locking has slightly another purpose: it prevents second user from modifying map
already opened by someone else to reduce risk of conflicting changes.

Actually I see probably a third approach: may be it makes sense to create a separate lock file when
map is marked as changed and to check for such file too to notice that map is being changed. I only
want to mention this idea. Currently there is a problem that fold / unfold also marks map changed.
And also sometimes maps are marked changed just after they are loaded. It had to be fixed before
this approach could work.

> [1] this will be a challenge to get to work cross-platform.

Why?

> - I think this should be restricted to times when the freeplane instance
>    has the focus (like notepad++ does it)?

+1

> - Where to start the background thread? This should be a class that has
>    access to the list of open mindmaps.
>    org.freeplane.view.swing.map.MapViewController?

I would create a dedicated class to do the work, adding no complexity to existing classes.

> - What to do when the local freeplane instance also has changes?

May be display a warning when map is saved? I do not think we can easily merge changes from the outside.

Regards,
Dimitry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Feature #2237 (Watching for mindmap files updates)

Felix Natter
Administrator
hi Devs,

Dimitry and I agreed that there is some need for discussion,
I created a topic here:
https://sourceforge.net/p/freeplane/discussion/758437/thread/5dd322d3/

If you have an opinion, please join the conversation.

Best Regards,
Felix
Loading...