BIND 10 #1206: Create datasource factory
BIND 10 Development
do-not-reply at isc.org
Wed Sep 21 01:12:49 UTC 2011
#1206: Create datasource factory
-------------------------------------+-------------------------------------
Reporter: | Owner:
stephen | Status: new
Type: task | Milestone:
Priority: major | Sprint-20110927
Component: data | Resolution:
source | Sensitive: 0
Keywords: | Sub-Project: DNS
Defect Severity: N/A | Estimated Difficulty: 4
Feature Depending on Ticket: | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:2 jelte]:
> Do we want the datasource backends to be dynamically loadable (with
dlopen()) or can we hardcode them and provide a name->type link?
(optionally; 'for now')
I'm not 100% sure if I understand the 'hardcode' correctly, so let me
check: For a given type (name) of data source, like "sqlite3", we need
to detect that which derived class of DataSourceClient
(e.g. DatabaseClient) should be instantiated, and if it's
DatabaseClient, which derived class of DatabaseAccessor (e.g.
SQLite3Accessor) should be instantiated.
Does "hardcode" mean hardcoding the mapping of
"sqlite3"->DataSourceClient (and then SQLite3Accessor) in the code?
If so, I guess this is orthogonal to whether we want to make the
datasource backends (especially database-based ones) dynamically
loadable (although they may have related points to be considered).
Regarding the mapping, we could either hardcode it for now or
introduce some kind of dynamic registration from the beginning. I
personally incline to do the latter, but if it turns out to require a
lot of work I also think it's okay to begin with hardcoding.
As for whether we want to make the actual data source implementation
dynamically loadable, I believe we do, especially because both BIND 9
and PowerDNS provide this capability. But I suspect it will be a
subject of (near) future extension, and we'll begin with the
implementation as part of libdatasrc (although I suspect
the additional implementation cost for dynamic loading is not so
high).
--
Ticket URL: <http://bind10.isc.org/ticket/1206#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list