On wikipedia I read the articles about:
Description of the cddb file format.
Java example to calculate the id.
Calculation of the MusicBrainz DiscID.
Don't use the old RDF based libs for new projects. There is a new RSET WebService and the used XML meta format.
On cpan exists a perl module, but it is in a very early development state.
With the libdisci (see the example usage) I'm able to convert the cd-discid into the MusicBrainz DiscID.