Comments (10)
It might be sufficient to provide a force-unlock feature from the updater itself (command line and UI)?
from imagej2.
Hmm. Would this not
- be rarely used (hopefully)?
- a huge effort to bring into the UI?
- another huge effort to make sure that the latest lock token is remembered?
I think that the changes I proposed would take me about two hours. The UI-based solution would take me two days. And it would clutter the UI even more, and users would click it by mistake.
from imagej2.
I have a hard time believing that adding this to the UI would take more than a few minutes, but I don't know the code, so I will defer to you on it.
Personally I just hate it when the solution to a blocker like this is "wait 30 minutes" as opposed to "click a button to tell the computer I know better."
from imagej2.
Remember how I told you (in person) how lousy a designer I am and that I always take too many iterations to get it right?
This would be a prime example: you need the lock token to unlock. Where would the button know this token from? Especially if somebody else borked the upload? Next problem: unlock only applies to WebDAV. WebDAV is a plugin to the updater. The button would need to live in the UI. To connect them, the Uploader interface needs to be enhanced, breaking backwards-compatibility (or using duck-typing, of course). And then, pilot errors are much more likely if such a button exists. Pretty unwieldy problem all of a sudden, right?
from imagej2.
The button would do the following:
- Get the directory listing from the update site; e.g.: http://sites.imagej.net/LOCI/
- For each
db.xml.gz.lock
file (or whatever the pattern is, I forget), issue a DELETE command via WebDAV/SSH/whatever mechanism (uploader interface would need a delete method if it doesn't have one already). - Voila, you can upload again. And if you stomped someone else, that's your fault. If this possibility worries you too much, only allow this for "personal update sites" named the same as the username, since those are unlikely to be shared.
I'm not pushing for this, just explaining my thinking...
from imagej2.
For each
db.xml.gz.lock
file...
Unfortunately, it is not that easy. Remember, WebDAV was designed by Microsoft. You do not have .lock
files. Locks are stored in a BerkeleyDB whose path is specified by the DavLockDB
statement in the Apache configuration. This DB stores a binary blob consisting of an ad-hoc-serialized object that contains the timestamp, the timeout, the user, probably the token, and the path.
This database cannot be accessed via the browser. It is not even possible to just list all current locks, not even from the command-line. It is not possible to delete a lock from the database via the command-line because it is only persisted state living inside Apache. The only way you can remove the lock is by issuing an UNLOCK
request with the proper credentials and the correct lock token (which I might be able to extract from the lock database once I understand its format and single-stepped through a sample upload).
I am glad that you made me write this up because that way, I can gladly forget about it and look it up in the future when needed.
from imagej2.
Thanks for the explanation. That is indeed horrible. Maybe the timeout could be 10 minutes instead of 30, then?
from imagej2.
I thought about that, but rejected the idea for being too fragile.
But since you also had this idea, it's probably good! See efb9e80
from imagej2.
since you also had this idea, it's probably good
Hey, you've got something on your nose there... 😉
rejected the idea for being too fragile.
Sure, any given timeout has the potential to be too short, if your internet connection is crappy enough (and/or your updates being uploaded are huge enough). But at least 99% of the time I think it'll be fine. And the other 1%, the chances of a second person trying to upload changes to the same update site at the same time are next to nil.
from imagej2.
I'll close this for now, even if no new webdav uploader has been released with the fix yet; this will be done in the context of the big "beta 8" upload that I have been preparing for all week long (or so it seems).
from imagej2.
Related Issues (20)
- Add generation of application zip to CI build
- Rename artifact from net.imagej:imagej to sc.fiji:fiji-core HOT 1
- ImageJ 1.53f51 - click and hold behaves like control click HOT 1
- how to solve such captcha?
- Problem with Watershed HOT 2
- Information printing into console when opening images with Bio-Formats HOT 2
- Exception in thread "main" java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService HOT 3
- java.awt.HeadlessException when running command HOT 4
- Latest update - script editor now hangs when opening scripts HOT 1
- Script Editor windows are not fully integrated into the Window menu
- Clean up native platform naming across ImageJ2 components HOT 2
- Press L to focus to search bar on Channels window HOT 6
- Oversaturated colors on P3 monitors HOT 5
- Please bump `commons-text` to 1.10.0 or newer HOT 2
- Spurious "Ignoring unsupported script" debug messages on startup
- Original ImageJ logic gets invoked in pure ImageJ2 GUI mode
- ROI selection
- Thank you!
- Scale to DPI seems to be broken HOT 4
- Abandon JAVA?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagej2.