Multiuser/nfs

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

Multiuser/nfs

Frank
I know this was discussed/mentioned/requested before, but I didn't found
newer post to that.
Here is my network setup: debian server (nfs/IMAP/homes), 4 users (me,
wife, 2 children), several clients, usable by all users.
I have some groups set up (e.g "users" for me and my wife). All relevant
data is stored on a nfs share at the server (to make backups easy).

I understand, that it is now possible to use MySQL instead of SQLite as
database, which overcomes the nfs-share issues.
But I didn't understand, if that means I have multiuser support in
digikam also.
I don't really need full multiuser support on the database side. It
would be sufficient to prevent digikam to start, when another user is
accessing the database (e.g. via a starting script, which tells which
user is accessing the database intead of starting digikam).

But I need some help to sort this out, because of rather low level
skills on the database site.

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Multiuser/nfs

Martin (KDE)
Am 23.02.2013 20:17, schrieb Frank:
> I know this was discussed/mentioned/requested before, but I didn't found
> newer post to that.
> Here is my network setup: debian server (nfs/IMAP/homes), 4 users (me,
> wife, 2 children), several clients, usable by all users.
> I have some groups set up (e.g "users" for me and my wife). All relevant
> data is stored on a nfs share at the server (to make backups easy).

I have this too.

>
> I understand, that it is now possible to use MySQL instead of SQLite as
> database, which overcomes the nfs-share issues.
> But I didn't understand, if that means I have multiuser support in
> digikam also.

Most liekly not. MySQL is able to handle many users simultaneously, but
I don't know if digikam rereads the DB data every now and then (at least
before write). I doubt that.

> I don't really need full multiuser support on the database side. It
> would be sufficient to prevent digikam to start, when another user is
> accessing the database (e.g. via a starting script, which tells which
> user is accessing the database intead of starting digikam).

You have to write a script that checks a special data flag in the
database, sets it if unset, start digikam and resets it after digikam is
finished. It at start the flag is set a message that digikam is locked
will appear.

But nobody will prevent your user from starting digikam without the script.

Most secure way (at least I do it this way) is to store the data in exiv
section of the photos. As I am the only one who uses raw format for now
this is no real limitation (I don't let digikam write exiv to my raw
photo). And at least my digikam recognises changes on the photos
automatically.

As I want to be able to use digikam without a net (with my local
collections) I still use sqlite database.

regards
Martin

>
> But I need some help to sort this out, because of rather low level
> skills on the database site.
>
> _______________________________________________
> Digikam-users mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-users

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Multiuser/nfs

Simon Cropper-3
In reply to this post by Frank
On 24/02/13 06:17, Frank wrote:

> I know this was discussed/mentioned/requested before, but I didn't found
> newer post to that.
> Here is my network setup: debian server (nfs/IMAP/homes), 4 users (me,
> wife, 2 children), several clients, usable by all users.
> I have some groups set up (e.g "users" for me and my wife). All relevant
> data is stored on a nfs share at the server (to make backups easy).
>
> I understand, that it is now possible to use MySQL instead of SQLite as
> database, which overcomes the nfs-share issues.
> But I didn't understand, if that means I have multiuser support in
> digikam also.
> I don't really need full multiuser support on the database side. It
> would be sufficient to prevent digikam to start, when another user is
> accessing the database (e.g. via a starting script, which tells which
> user is accessing the database intead of starting digikam).
>
> But I need some help to sort this out, because of rather low level
> skills on the database site.
>
> _______________________________________________
> Digikam-users mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-users
>

Frank,

My understanding is that *digiKam is not multiuser*. Only one person can
use you package at a time.

If say you were all in one room and could see that no one was running
digiKam you could access the database and images on each of the machines.

The prerequisite is that the underlying directory structure remains the
same. For example, ensure all machines have a IMAGES directory with the
albums underneath in your mnt or media directory. Then the image
locations will not differ between the machines.

The problem then is how to prevent others from accessing the package and
potentially causing corruption of a file or database by reading/writing
at the same time you attempt to read/write. The scenario when you are
not all in the same room!

Personally I would write a simple bash script to replace my launchers.
Remove or hide all launchers on each machine and replace them with the
bash script.

In simple pseudo-code the script would read...

- Check for lock file (simple text file in IMAGE directory)

- IF PRESENT,
   - throw a message to user (if you want to say who has it
     open save the user name in the text file and display that in
     message)

- IF ABSENT
   - create a lock file in the IMAGES directory (optionally containing
     the user name)
   - open digiKam
   - delete the lock file

If you need so help getting started with a bash script, email me off
list and I can give you a skeleton program to get you started.

--
Cheers Simon

    Simon Cropper - Open Content Creator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages           http://www.fossworkflowguides.com/gis
    bash / Python    http://www.fossworkflowguides.com/scripting
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users