Better Integration of Domain Module and Core

Contact: Jan Janak, Daniel-Constantin Mierla

just wondering if worth to extend core a bit so that modules can
register callbacks for is_myself check. Therefore, if (uri==myself)
can match entries in the domain module.

Architecturally, the core function goes like now and if no match, then
executes the eventual callbacks. This way does not matter if domain
is db only/cache mode or other modules do checks against other
storages (radius, web app, etc).


Yes, I think this would be a good thing to do, I also thought about something
like this. I was thinking about extending the data structures in the core so
that the domain module can add entries from the database there.

In other words, there would be no callbacks, but the domain module would
update the list of local domains in the core, instead of keeping them in its
own memory. In the script we would then just call is_myself.

Your callback approach is probably more flexible because it leaves the
decision whether to cache or not up to the module.

Either way, I think that integrating the core domain list with the list of
domains kept in the domain module would be a good thing to do. Maybe we should
document it as "to be done" somewhere in the wiki?

yes, it is needed. I thought also about a list to be kept in core, but then there has to be a way of synchronization when doing reload – adding/removing entries as domain or other module updates its records – callback is easier. I think also is more flexible, e.g., if one needs to match all subdomains, can easily implement a module and register just a callback instead all subdomains.

just wondering if worth to extend core a bit so that modules can register callbacks for is_myself check. Therefore, if (uri==myself) can match entries in the domain module.

Architecturally, the core function goes like now and if no match, then executes the eventual callbacks. This way does not matter if domain is db only/cache mode or other modules do checks against other storages (radius, web app, etc).


Navigation

Wiki

Other

QR Code
QR Code tbd:domain_integration (generated for current page)