]> err.no Git - varnish/commit
Fix an architectural mistake:
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 10 Aug 2007 09:51:16 +0000 (09:51 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 10 Aug 2007 09:51:16 +0000 (09:51 +0000)
commit6519e7ab9973a476cda333d9b03d544c8a28ad51
treebbfd4902d4d81cf8792c3692edfa345d66606bfc
parentc078e42b89af389d1ace26fe075a2cfec3df79f5
Fix an architectural mistake:

What the compiled VCL code contains is not "a backend" but more
like a specification of or a template of a backend.

This matters because it controls the ownership of the backend
structure, and to a lesser degree because it complicates the VRT
api with a lot of pointless functions.

When vcl.use switches to a different VCL program, the backends of
the old VCL program may still be in use, and, provided the backend
declarations of the two VCL programs are identical, should continue
be carried over to the new VCL code.

This requires the memory and state to be owned by the central backend
code, and the VCL programs to just hold references and becomes even
more important when we keep complex state for load balancing on
individual backends.

This commit changes the ownership of the backends to the central code,
and moves the specification used in the compiled VCL program to a
communication structure for just that.

This also paves the way for introducing directors/policies for backend
selection and for good measure, I have named the default (ie: current)
backend policy "simple" for now.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1829 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishd/cache_vrt.c
varnish-cache/include/vrt.h
varnish-cache/lib/libvcl/vcc_backend.c
varnish-cache/lib/libvcl/vcc_compile.c
varnish-cache/lib/libvcl/vcc_fixed_token.c