[PATCH] add documentation about backend naming for VMOD authors
geoff at uplex.de
Mon Nov 2 10:44:24 CET 2015
-----BEGIN PGP SIGNED MESSAGE-----
On 11/02/2015 09:03 AM, Poul-Henning Kamp wrote:
>> So unless we add a requirement like "you have to call
>> VCL_Something() to 'register' the director/backend", so that
>> VCL_Something() can change the name, I don't think we can use
>> suffixes or anything else to enforce unique names. (And as of
>> now, I don't see why a VMOD backend wouldn't work even if it
>> doesn't call VCL_Something().)
> I think there is merit to this, in the sense that I can see why a
> VMOD creating dynamic backends wouldn't want them to "pollute" the
> CLI and VSM.
> But in the case where the VMOD wants the backend to appear in the
> CLI/VSM, I think it is perfectly fair to disambiguate the name
> there, and I think it would be silly to fail the registration,
> because some other VMOD happened to use the same name already.
Hmm, I brought up that idea to be dismissive of it, but now I'm
beginning to see the merits as well.
So we could have something like: VCL_Register(vcl, director)
... which would do things for you like change the name for uniqueness
if necessary, create the VBE stats ... (and whatever else we'd offer
to do the right way on behalf of director/backend VMODs).
And then the docs can say, "Dear VMOD author, you can call that and
then we'll take care of these things for you. Or don't, but then
you're on your own, just be aware of the consequences." I'm starting
to like it.
** * * UPLEX - Nils Goroll Systemoptimierung
Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----END PGP SIGNATURE-----
More information about the varnish-dev