[Devel] New module: Perl Virtual Database

Bastian Friedrich bastian.friedrich at collax.com
Thu Apr 12 17:33:39 CEST 2007


Hi,

I'm about to commit a new module, the Perl Virtual Database. It can be used to 
relay the database requests of client modules (auth_db, alias_db, ...) to 
arbitrary Perl functions.

While the module may reasonably used in conjunction with a number of modules, 
it is not advisable to relay e.g. usrloc's functionality to Perl functions.

The module provides regular documentation. I hope that it will be sufficient 
for you to test and evaluate its functionality; documentation will have to be 
extended in the future, nonetheless.


Sample scenario
===============

LDAP directories commonly contain information about users of a network. This 
information was yet unavailable for OpenSER. With the virtual database, LDAP 
authentication becomes possible; multiple e-mail addresses can be used for 
aliasing through the alias_db module.

Steps:
* Configure alias_db and auth_db to use "perlvdb:OpenSER::VDB::Adapter::Alias"
  and "perlvdb:OpenSER::VDB::Adapter::Auth" as their databases
* Implement "virtual tables" (VTabs) that provide "query" functions in your
  perl module script, or in arbitrary other (reachable) packages. See module
  documentation for details.
* In the configuration script, use alias_db_lookup("vtabname") (vtabname being
  the name of your function, your package, or your class) to use your virtual
  database.


You may as well request different data sources (XML files, text files, ...) 
from within Perl to provide the necessary information. Please have a look at 
the provided sample scripts inside the doc directory.

Feel free to ask your questions privately to my e-mail address, or at the 
developer mailing list.

   Bastian

PS: An LDAP authentication sample is not yet included in the script. I 
probably will provide in the future in the repository.
PPS: I will be out of office 04/19 through 04/26 and cannot answer e-mails 
during this period


-- 
Collax GmbH . Burkheimer Straße 3 . 79111 Freiburg . Germany
p: +49 (0) 761-45684-24
f: +49 (0) 761-45684-10        www.collax.com

Geschäftsführer: William K. Hite / Boris Nalbach
AG München HRB 158898 . Ust.-IdNr: DE 814464942
\ "God is dead."--Nietzsche. "Nietzsche is dead." --God.



More information about the Devel mailing list