Mailing List Archive

VCDK
Dear Varnish community,

This is rather for developers, so if you are only using Varnish it
will probably not be very interesting...

So, developers then: today I'm sharing a very recent project to get
Varnish projects started differently than how projects usually start.
Instead of forking libvmod-example, you can now run a script to
generate a working project.

With Varnish 5.2.0 the VUT (Varnish UTility) API became public, it
allows you to create a log processor similar to varnishlog or
varnishncsa but removes most of the boilerplate. Even if you aren't
making a log processor, this API can still be useful: it is used in
varnishstat too.

Now instead of introducing a new vutexample repo you could fork to
start your project, I wrote VCDK. Based on my experience that such a
utility can often be used in conjunction with a VMOD, VCDK makes it
easy to start a project with both VMODs and VUTs (yes, plural):

vcdk autotools --vmod=foo,bar --vut=baz myproject

It is available on Github, currently super alpha. See the quick
tutorial to get a feel of how easy it is to get a project started:

https://github.com/dridi/vcdk#varnish-cache-development-kit

VCDK is modular, although currently only one plug-in exists. It only
supports Varnish 5.2 because a) I don't know when 4.1 will go EOL
and b) I started it less than a week ago and went straight from idea
to working code.

I hope this will convince people to look at the VUT framework and
consider writing more log processors instead of doing blocking
operations in VCL, and help the ecosystem grow like I believe
libvmod-example helped people get started with VMODs. This is
how I started myself.

About log processors or VUTs, some idiot [1] tried to create a project
ready-to-fork similar to libvmod-example, but for all ways to extend
Varnish. I can report at least one successful VUT is running in
production thanks to that, but can't give any details. That idiot is
me, and I was pleased to see this project help others solve a problem
using a log processor, but I very much prefer the change of direction
I made in VCDK (probably because it brings some shell scripting fun
too).

If you don't like autotools (or autocrap as PHK calls them;) why not
help build a cmake plugin? Not just C projects, there are bindings in
other languages like Go or Pythton. If you read this far, please
consider running it and see whether it really is portable or only works
on my machine.

Cheers,
Dridi

[1] https://github.com/dridi/varnish-template/
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: VCDK [ In reply to ]
On Tue, Oct 10, 2017, at 23:26, Dridi Boukelmoune wrote:
> Dear Varnish community,
>
> [...]
> Instead of forking libvmod-example, you can now run a script to
> generate a working project.
>
> VCDK makes it
> easy to start a project with both VMODs and VUTs (yes, plural):
>
> vcdk autotools --vmod=foo,bar --vut=baz myproject
>
> It is available on Github, currently super alpha.

This is a great step forward for vmod (and vut) development. Well done,
Dridi!

Admittedly, I always found the whole forking and modifying vmod-example
too messy, so much that I tried to build a "vmod-bootstrap" years ago.

Lack of time/energy and other priorities made me abandon that particular
effort.

--
Cosimo Streppone
cosimo@streppone.it
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: VCDK [ In reply to ]
On Wed, Oct 11, 2017 at 11:59 PM, Cosimo Streppone <cosimo@streppone.it> wrote:
[...]
> This is a great step forward for vmod (and vut) development. Well done,
> Dridi!

Thanks!

> Admittedly, I always found the whole forking and modifying vmod-example
> too messy, so much that I tried to build a "vmod-bootstrap" years ago.

Yes, and having a mix of libvmod-example and libvmod-whatever history
in my git repo makes me uneasy too.

> Lack of time/energy and other priorities made me abandon that particular
> effort.

I hope you will find some time and energy to give it a try ;)

Cheers
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: VCDK [ In reply to ]
Hi,

I've based my latest vmod project (soon to be released) on
https://github.com/dridi/vcdk and must say that from my first impression I am
super happy with it.

VCDK makes the initial steps to creating a vmod so much easier - and not just
that, it also supports varnish tools (which I did not use yet).

For those interested, my comments are https://github.com/Dridi/vcdk/issues/1

I can really recommend VCDK! Thank you, Dridi!
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc