Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#195341 - 29/12/2003 22:05 rebuilding the db on the pc
mschrag
pooh-bah

Registered: 09/09/2000
Posts: 2303
Loc: Richmond, VA
So I started playing around w/ rebuilding the db in jemplode ... But I've sort of hit a brick wall. To properly rebuild the DB, I believe I have to download each *1 file. To do this, I'm using Hijack's FTP server (I need to be able to list all the available files and then grab the contents of each one). The problem is that it's taking me 219ms per *1 file, which adds up pretty damn fast to the point that I think this will actually be /slower/ than letting the Empeg do it itself ... If anyone has any ideas/suggestions/rants, I'm game.

In the case where I have a PlayerDatabase loaded in memory, I can bypass that downloads and rebuild in memory ... Maybe I just have to support both impls to do it right. In the case like alpha5, I can't load the database to rebuild from memory so I have to fallback to the slow way, but after a sync, maybe I can just depend on my in-memory version. The in-memory rebuild might cause some weird race conditions, I imagine, but 99% of the time it would be correct .

ms

Top
#195342 - 30/12/2003 01:16 Re: rebuilding the db on the pc [Re: mschrag]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
I think you'd want to only support a partial rebuild e.g. one where you update to reflect changes you made in jEmplode, and otherwise (full rebuild) let the player do it, as that will cover probably 90+% of rebuilds anyway?

Top
#195343 - 30/12/2003 01:27 Re: rebuilding the db on the pc [Re: mschrag]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
Does it help to do an 'mget *1' to retrieve all playlist fids at once instead of individually retrieving fids? Seems like that may be a bit faster.

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#195344 - 30/12/2003 03:03 Re: rebuilding the db on the pc [Re: mschrag]
image
old hand

Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
probably the best way is to get mark to implement a SITE command that actually initiates a download of all the *1 fids in tar format.

Top
#195345 - 30/12/2003 08:34 Re: rebuilding the db on the pc [Re: image]
pgrzelak
carpal tunnel

Registered: 15/08/2000
Posts: 4859
Loc: New Jersey, USA
Just a word of warning. This will get really ugly on very large players with lots of FIDs... Is this something that can be done once, during an initial setup? Then you can keep a mirror copy of the database locally, saving the download time.
_________________________
Paul Grzelak
200GB with 48MB RAM, Illuminated Buttons and Digital Outputs

Top
#195346 - 30/12/2003 08:52 Re: rebuilding the db on the pc [Re: mschrag]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
yeah, fetching all of the *1 and playlist files will be much slower than having the player do it locally. I wouldn't bother implementing that method if I were you. The reason the player takes so long, is that it also is trying to read all of the *1 files, and this just takes a ton of (very slow) random seeks across the disk(s).

Cheers

Top
#195347 - 30/12/2003 11:52 Re: rebuilding the db on the pc [Re: Daria]
rmitz
member

Registered: 09/06/1999
Posts: 106
Loc: Pittsburgh, PA, USA
This is what I would have suggested.
_________________________
Fly me to the moon...

Top
#195348 - 30/12/2003 12:48 Re: rebuilding the db on the pc [Re: pgrzelak]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Wouldn't it be easier to just use the existing player DB? It's in there already. If think something has gone wrong then you can force it to rebuild the DB from the *1 files.

We know what has changed and what wasn't so updating the DB should be fairly easy.

It would be compatible with Emplode as well. Emplode will just regenerate the DB from scratch.

Top
#195349 - 30/12/2003 13:43 Re: rebuilding the db on the pc [Re: tman]
image
old hand

Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
the problem lies with cases like v3a5, where it can't create a database by itself. we're all just looking for a way to bypass dependence on the player software to rebuild in all scenarios.

Top
#195350 - 30/12/2003 16:03 Re: rebuilding the db on the pc [Re: pgrzelak]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Paul, I think this is a good idea, also because it could be coupled with some sort of backup system.

Basically, one may create a copy of all the 1* fileslocally and simply compare them with those on the player (size, date, last access, or whatever), and download only the new ones. If this is fast enough and gets implemented, then the same method could be used to create a backup locally of all the actual mp3 files and operate on them in the same way. It would be the user to chose whether to simply create the dbase locally or have a backup session.

Just my 5 cents


Edited by taym (30/12/2003 16:05)
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top