Unoffical empeg BBS

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

Topic Options
#18259 - 20/09/2000 17:17 LDAP-interface to empeg-player
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
Hi folks...
I have just completed an ldap-interface to the empeg player.
Currently it only reads the files in /drive0/fids ( I only have one drive ) and let's you make queries on the different attributen.
You can do queries from your linux PC over the network like :
ldapsearch -h hostname -b o=empegcar query

example queries :
find all tracks of artist whose name starts with pr in the year 1990
ldapsearch -h empeg -b o=empegcar '(&(artist=pr*)(year=1990)(type=tune))'

find all playlists which contain the string hello
ldapsearch -h empeg -b o=empegcar '(&(cn=*hello*)(type=playlist))'

the software is a modified version of the passwd backend of slapd.
slapd is the main software component of the openldap distribution.
You can choose to download the software from this location
I will supply a pre-built binary, a sample slapd.conf and the modified source file search.c from the passwd backend
for execution on a standard empeg the library libresolv is required, so you can also download it...



Frank van Gestel
_________________________
Frank van Gestel

Top
#18260 - 21/09/2000 16:22 Re: LDAP-interface to empeg-player [Re: fvgestel]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
This is an interesting project, and works pretty well, but I'm struggling to figure out what it does that a user can't already do with some grep-ing of the fids files. If it was faster, I think it'd be a worthwhile thing to use for searching a collection for duplicates and such. But it seems to be too slow at this point. It'd be really great if it could actually update the files (though I know LDAP is optimized for reading.) In that respect, it would compensate for some of the things Emplode doesn't do well. These projects are proving that you can really put anything on an Empeg... But the meg or so of memory it takes caused some problems unless you kill it before going back to the player. A neat thing to have, though.

---
MkII 080000554
_________________________
- Tony C
my empeg stuff

Top
#18261 - 22/09/2000 00:49 Re: LDAP-interface to empeg-player [Re: tonyc]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
You are quite right if you say the searches take too long...
It takes more than a minute for a complex query to finish.

But don't let that push the pleasure...

I rewrote the code to the following scenario.
the ldap server runs on a random linux machine in your network.
A small server program is run on the empeg (+- 10kb), which cats the fid files over a socket connection to the ldap-backend.
This makes it possible the run the empeg-server simultaneously with the player executable.
Performance is much improved. Queries complete in a few seconds...

I will start testing this evening and post the new source and binaries in the weekend...

Is it really possible to update the fid-files without destroying the database that the player is using?

While I'm writing this, another idea is rising; I will take a look at the emptool source to directly connect to the player executable from the ldap-backend.

You are right when you state that writes are much slower on standard LDAP-servers, but this id due to the fact that after every write all indexes must be recreated. With the empeg this wouldn't be much of a problem...
Updating the database will be my next target...

Frank van Gestel
_________________________
Frank van Gestel

Top
#18262 - 22/09/2000 02:47 Re: LDAP-interface to empeg-player [Re: fvgestel]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
Is it really possible to update the fid-files without destroying the database that the player is using?

Yes and no. You can update the fid files themselves, but during play the player uses a separate database which is only reconstructed from the fid files during a synchronise operation. There's no way on the player itself to cause a database rebuild.

Read-only LDAP plus streaming sounds like a neat hack, but LDAP is not the way to go for read-write access to the song tags.

        Peter



Top
#18263 - 22/09/2000 05:18 Re: LDAP-interface to empeg-player [Re: fvgestel]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
That sounds like an awesome idea. Keep us posted on your progress!

---
MkII 080000554
_________________________
- Tony C
my empeg stuff

Top
#18264 - 23/09/2000 13:48 Re: LDAP-interface to empeg-player [Re: tonyc]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
OK the new software is ready for download...
http://fvgestel.dyndns.org/empeg

It works even better than I had hoped. I've got a database with 2000 songs and complex queries complete in less than a second. The first query will still take about a minute,
but after that the data is cached; this means that after your first query the empeg can be removed from the network and you will still be able to do queries. At this time the only way to let the LDAP-server read the fid-files again is to restart the slapd.
Maybe I'll add a feature as when you do an ldapmodify the data is fetched from the empeg again...

I'm installing netscape directory server gateway right now; I will provide a link when it's installed...



Frank van Gestel
_________________________
Frank van Gestel

Top
#18265 - 23/09/2000 15:35 Re: LDAP-interface to empeg-player [Re: fvgestel]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
I installed netscape dsgw...

Take a look at http://fvgestel.dyndns.org:8629/dsgw/bin/csearch?context=dsgw

Frank van Gestel
_________________________
Frank van Gestel

Top