Multiusers on Jbrout and photos shared on a network drive

57 views
Skip to first unread message

laur...@seor.fr

unread,
Oct 15, 2013, 4:15:19 AM10/15/13
to jbr...@googlegroups.com
Hi,

We would like to use Jbrout in our small NGO (10 employees). Its indexing features into IPCT data are exactly what we are looking for.

All our pictures are stored on a NAS (a hard disk plugged to the network). All of us must be able to add pictures onto the network drive, index pictures (assign tags to pictures), and perform searches according to this list of tags.
So we need to share the same list/tree of tags in realtime.

We are ready to install Jbrout software on each of our PCs. However, the problem is that the information concerning de tags tree, and for the picture preview are stored in XML files located on each PC. If someone adds a tag, it will not be available for the others.

Is there a way to share these XML files ?  Typically, can they be copied to a network drive (but how can jbrout find them) ?
Is there another solution to synchronize automatically the tags list and the preview lists between all Jbrout users ?

Thanks in advance

Gmail PK

unread,
Oct 15, 2013, 12:28:39 PM10/15/13
to jbr...@googlegroups.com
Le 15/10/2013 10:15, laur...@seor.fr a �crit :
> Hi,
>
> We would like to use Jbrout in our small NGO (10 employees). Its
> indexing features into IPCT data are exactly what we are looking for.
>
> All our pictures are stored on a NAS (a hard disk plugged to the
> network). All of us must be able to add pictures onto the network drive,
> index pictures (assign tags to pictures), and perform searches according
> to this list of tags.
> So we need to share the same list/tree of tags in realtime.
>
> We are ready to install Jbrout software on each of our PCs. However, the
> problem is that the information concerning de tags tree, and for the
> picture preview are stored in XML files located on each PC. If someone
> adds a tag, it will not be available for the others.

It will. It will appear when refreshing the folders containing the
images. But it will appear in a category named "Imported tag"

> Is there a way to share these XML files ? Typically, can they be copied
> to a network drive (but how can jbrout find them) ?

Don't now if you can use unisson to sync the xml files (and it will
definitely be heavy).
A custom script ?
fetch the shared xml files, launch jBrout, submit the files when closing
jBrout ?

> Is there another solution to synchronize automatically the tags list and
> the preview lists between all Jbrout users ?
>
> Thanks in advance

Pas de probl�me ! La liste parle m�me parfois fran�ais !

--
,,,
( �> enno...@gmail.com
( / ) Linux Registered User 328488
>||<

Frederic Da Vitoria

unread,
Oct 15, 2013, 5:57:24 PM10/15/13
to jbr...@googlegroups.com
2013/10/15 Gmail PK <enno...@gmail.com>
Le 15/10/2013 10:15, laur...@seor.fr a écrit :
> Hi,
>
> We would like to use Jbrout in our small NGO (10 employees). Its
> indexing features into IPCT data are exactly what we are looking for.
>
> All our pictures are stored on a NAS (a hard disk plugged to the
> network). All of us must be able to add pictures onto the network drive,
> index pictures (assign tags to pictures), and perform searches according
> to this list of tags.
> So we need to share the same list/tree of tags in realtime.
>
> We are ready to install Jbrout software on each of our PCs. However, the
> problem is that the information concerning de tags tree, and for the
> picture preview are stored in XML files located on each PC. If someone
> adds a tag, it will not be available for the others.

It will. It will appear when refreshing the folders containing the
images. But it will appear in a category named "Imported tag"

> Is there a way to share these XML files ?  Typically, can they be copied
> to a network drive (but how can jbrout find them) ?

Don't now if you can use unisson to sync the xml files (and it will
definitely be heavy).
A custom script ?
fetch the shared xml files, launch jBrout, submit the files when closing
jBrout ?

Hm, dangerous, what would happen in this situation:
1: user A loads the xml
2: user B loads the xml
3: user A edits and saves the xml
4: user B edits and saves the xml

The end result will be that A's edits will be lost.

Either you manage to lock the database file (so that only one user can edit at the same time), or you need a tool able to sync the contents of the file (like the sync tool able sync your contacts from all your connected devices). But to do this, I guess the jBrout database structure would have to be enhanced to allow fine-grained syncing. Or you wait for someone to get jBrout to use a real database engine. Someone started a project to store the jBrout database into a database file (not a simple xml file), but I haven't heard about this project any more. I don't remember what database he wanted to use, probably sqlite which AFAIK does not allow multi-user access either. But if jBrout ever migrates to a sql database such as sqlite, then porting it to a database allowing multiple users should be easier.

By the way, you have the same issue with the pictures: what if user A adds tag X to a picture and at the same time user B adds tag Y to the same picture?

--
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org

Gmail PK

unread,
Oct 16, 2013, 5:10:26 AM10/16/13
to jbr...@googlegroups.com
Le 15/10/2013 23:57, Frederic Da Vitoria a �crit :
> 2013/10/15 Gmail PK <enno...@gmail.com <mailto:enno...@gmail.com>>
>
> Le 15/10/2013 10:15, laur...@seor.fr <mailto:laur...@seor.fr> a
> �crit :
Right.
Some improvement with a lock file ?
But this will only allow one user at a time to use jBrout.

> Either you manage to lock the database file (so that only one user can
> edit at the same time), or you need a tool able to sync the contents of
> the file (like the sync tool able sync your contacts from all your
> connected devices). But to do this, I guess the jBrout database
> structure would have to be enhanced to allow fine-grained syncing. Or
> you wait for someone to get jBrout to use a real database engine.
> Someone started a project to store the jBrout database into a database
> file (not a simple xml file), but I haven't heard about this project any
> more. I don't remember what database he wanted to use, probably sqlite
> which AFAIK does not allow multi-user access either. But if jBrout ever
> migrates to a sql database such as sqlite, then porting it to a database
> allowing multiple users should be easier.
>
> By the way, you have the same issue with the pictures: what if user A
> adds tag X to a picture and at the same time user B adds tag Y to the
> same picture?

I don't think so, unless A and B save them SIMULTANEOUSLY (unlikely).
The change of A will be save , then B's. They won't be aware of each
other changes until they'll refresh the folder but both tags will be in
the pictures.

The issue is definitively the tree (of tags) not the tags themselves.

--
,,,
( �> enn...@laposte.net

Frederic Da Vitoria

unread,
Oct 16, 2013, 5:52:26 AM10/16/13
to jbr...@googlegroups.com
2013/10/16 Gmail PK <enno...@gmail.com>

Le 15/10/2013 23:57, Frederic Da Vitoria a écrit :
> Hm, dangerous, what would happen in this situation:
> 1: user A loads the xml
> 2: user B loads the xml
> 3: user A edits and saves the xml
> 4: user B edits and saves the xml
>
> The end result will be that A's edits will be lost.

Right.
Some improvement with a lock file ?
But this will only allow one user at a time to use jBrout.

Actually I believe it is slightly better: this will allow one user at a time to use jBrout for editing. No danger in browsing, at least not that I can foresee.


> Either you manage to lock the database file (so that only one user can
> edit at the same time), or you need a tool able to sync the contents of
> the file (like the sync tool able sync your contacts from all your
> connected devices). But to do this, I guess the jBrout database
> structure would have to be enhanced to allow fine-grained syncing. Or
> you wait for someone to get jBrout to use a real database engine.
> Someone started a project to store the jBrout database into a database
> file (not a simple xml file), but I haven't heard about this project any
> more. I don't remember what database he wanted to use, probably sqlite
> which AFAIK does not allow multi-user access either. But if jBrout ever
> migrates to a sql database such as sqlite, then porting it to a database
> allowing multiple users should be easier.
>
> By the way, you have the same issue with the pictures: what if user A
> adds tag X to a picture and at the same time user B adds tag Y to the
> same picture?

I don't think so, unless A and B save them SIMULTANEOUSLY (unlikely).
The change of A will be save , then B's. They won't be aware of each
other changes until they'll refresh the folder but both tags will be in
the pictures.

You mean that when I add a tag to a picture, jBrout re-reads that picture adds the tag and writes the picture, so that there isn't much chance that two users would overlap?

Gmail PK

unread,
Oct 16, 2013, 9:30:56 AM10/16/13
to jbr...@googlegroups.com
Le 16/10/2013 11:52, Frederic Da Vitoria a �crit :
> 2013/10/16 Gmail PK <enno...@gmail.com <mailto:enno...@gmail.com>>
>
> Le 15/10/2013 23:57, Frederic Da Vitoria a �crit :
I'd have a doubt so i did a test.
I've got my pictures on a nfs share and 2 computers running jBrout.
- A and B open the same folder
- A add a tag X , B wasn't aware of tag X
- B add a tag Y and saw tags X and Y
- A wasn't aware of tag Y until he refresh the folder
BTW, if A remove the picture, B saw instantly an emblem saying "picture
in the database, not more in the disk" (white rectangle with a black
cross) and thumbnail disappear when refreshing.


Frederic Da Vitoria

unread,
Oct 16, 2013, 10:06:16 AM10/16/13
to jbr...@googlegroups.com
2013/10/16 Gmail PK <enno...@gmail.com>
Le 16/10/2013 11:52, Frederic Da Vitoria a écrit :
> 2013/10/16 Gmail PK <enno...@gmail.com <mailto:enno...@gmail.com>>

OK. So only the problem of the database remains for Laurent. I found 2 apps which seem to do something like he expects:
    http://tdm.berlios.de/3dm/doc/index.html
    http://code.google.com/p/fc-xmldiff/wiki/HomePage
There is also the commercial software DeltaXML Sync http://www.deltaxml.com/

I never tried anything like this so I can't tell how reliable are any of those software.

Note that both xml files db.xml and tags.xml must be synchronized.

HTH and please tell us if you managed to make it work. This is an interesting problem :-)

Matěj Cepl

unread,
Oct 16, 2013, 11:03:27 AM10/16/13
to jbr...@googlegroups.com
On 16/10/13 11:52, Frederic Da Vitoria wrote:
> You mean that when I add a tag to a picture, jBrout re-reads that
> picture adds the tag and writes the picture, so that there isn't much
> chance that two users would overlap?

In Linux it should be probably possible do something about it with
inotify, but a) I have no idea how, b) I have even less an idea how to
do it in the cross-platform manner.

Matěj

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

My life has been full of terrible misfortunes most of which never
happened.
-- Michel de Montaigne

signature.asc

laur...@seor.fr

unread,
Oct 17, 2013, 2:39:30 AM10/17/13
to jbr...@googlegroups.com
Thanks to all for these interesting discussions.
Another question by the way : what is the default location of the db.xml and tags.xml files ?

----------------------

Frederic Da Vitoria

unread,
Oct 17, 2013, 4:06:58 AM10/17/13
to jbr...@googlegroups.com
2013/10/17 <laur...@seor.fr>

Thanks to all for these interesting discussions.

Thank you for raising the question :-)

 
Another question by the way : what is the default location of the db.xml and tags.xml files ?

Are you on Linux or Windows?

In my Windows 7 machine, they are in Users\[my_windows_user_id]\AppData\Roaming\jbrout
 

--
You received this message because you are subscribed to the Google Groups "jBrout" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbrout+un...@googlegroups.com.
To post to this group, send email to jbr...@googlegroups.com.
Visit this group at http://groups.google.com/group/jbrout.
For more options, visit https://groups.google.com/groups/opt_out.

Gmail PK

unread,
Oct 17, 2013, 5:59:58 AM10/17/13
to jbr...@googlegroups.com
Le 17/10/2013 10:06, Frederic Da Vitoria a �crit :
> 2013/10/17 <laur...@seor.fr <mailto:laur...@seor.fr>>
>
> Thanks to all for these interesting discussions.
>
>
> Thank you for raising the question :-)
>
>
>
> Another question by the way : what is the default location of the
> db.xml and tags.xml files ?
>
>
> Are you on Linux or Windows?
>
> In my Windows 7 machine, they are in
> Users\[my_windows_user_id]\AppData\Roaming\jbrout

And on my ArchLinux it's under /home/<user>/.local/share/jbrout/

Matěj Cepl

unread,
Oct 17, 2013, 6:33:51 AM10/17/13
to jbr...@googlegroups.com
On 2013-10-17, 06:39 GMT, laurentn-f...@public.gmane.org
wrote:
> Thanks to all for these interesting discussions.
> Another question by the way : what is the default location of the db.xml
> and tags.xml files ?

Look at
https://code.google.com/p/jbrout/source/diff?spec=svn334&r=334&format=side&path=/trunk/jbrout/jbrout/conf.py
All files are in $XDG_CONFIG_HOME (per
http://www.freedesktop.org/wiki/Software/xdg-user-dirs/)

Matěj

laur...@seor.fr

unread,
Oct 17, 2013, 6:51:54 AM10/17/13
to jbr...@googlegroups.com
I use Windows 8.
The directory seems to be the same as the one you mention for Windows 7, that is :

Users\[my_windows_user_id]\AppData\Roaming\jbrout

----------------------------------------------------------

Frederic Da Vitoria

unread,
Oct 17, 2013, 6:57:00 AM10/17/13
to jbr...@googlegroups.com
2013/10/17 <laur...@seor.fr>
I use Windows 8.
The directory seems to be the same as the one you mention for Windows 7

Yes, I would have been surprised if this had not been true. I don't know if you have XP machines in your network, but it can't be exactly the same for Windows XP.

Francois Chartier

unread,
Oct 22, 2013, 3:38:21 PM10/22/13
to jbr...@googlegroups.com
Hello,

I just want to add an element about the possible sharing/merging of db.xml: in jbrout, the xml file is only loaded at startup and saved when you exit, so you really have to wait untiil anyone else has finished working with jbrout. I'm afraid even with a versionning tool a merge utility, you'd have some manual merge to perform.. could be tried, though.

As for the "imported tags", I guess you could more easily share/sync/merge the tags.xml file as it moves less and is muche smaller/.

Francois


2013/10/17 Frederic Da Vitoria <davi...@gmail.com>

--

Matěj Cepl

unread,
Oct 23, 2013, 2:36:46 AM10/23/13
to jbr...@googlegroups.com
On 15/10/13 10:15, laur...@seor.fr wrote:
> However, the problem is that the information concerning de tags tree, and for the
> picture preview are stored in XML files located on each PC. If someone
> adds a tag, it will not be available for the others.

And this is where your problem begins. The only canonical store of any
information is in the pictures themselves. All those XML files are just
a cache for the particular computer and SHOULD NOT (if not even MUST
NOT) be shared.

Current workflow:

0) All photos (photos ONLY, not XML data) are stored on shared folder
(via Windows Network, WebDAV, NFS, whatever)
1) Somebody adds a new picture or adds a new tag to the picture,
2) Makes everybody aware of it (via email, IRC, phone, shouting loud,
pigeons, whatever)
3) Everybody refresh their photo collection

Everybody is happy.

Possible improvement could be to make jbrout working with inotify (or
its Windows equivalent, if there is any), so that refresh happens
automatically whenever the file has been changed.

What's the problem?

Matěj

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

Ask yourself whether you’ve really obtained fullness of the Holy
Spirit, followed by gifts needed for your service.
-- Francis MacNutt

signature.asc
Reply all
Reply to author
Forward
0 new messages