Deploying Plack apps
Dear all,
I've been somewhat involved in Perl module packaging, now I'm mostly doing
coding work on Semantic Web Perl modules. Jonas and Florian has packaged most
of our core modules, and I've been following it closely. This is really great
work, and I can assure you all that upstream appreciates your efforts!
Now, I figured I should give you a heads up on a future issue: Deploying Plack
apps. I have seen that you have already put a lot of effort into packaging
Plack, which is great, I think it has a lot of potential. I have discussed
very superficially with Jonas, and it doesn't seem there is a straightforward
way for end users to get their apps running.
My module, RDF::LinkedData, which is in Debian, and a module RDF::Endpoint,
which has an ITP, are basically Plack apps (they can do more, but most users
will just do that). My ambition is that when Debian freezes for Wheezy, we'll
have a suite of modules that can set up a state-of-the-art Linked Data server
based on Perl modules in Debian.
Now, there are many ways that Plack apps could be deployed. That's actually
the key strength of Plack, it creates a separation of concern between
developers, who worry about the app and sysadmins who worry about deployment
and tuning. But this means that there isn't a single way to just throw up a
Plack app, even though in many cases it is very straightforward, it usually
requires some manual intervention.
What would obviously be very nice is if debconf could check the servers that
are installed (Apache mod_perl, fastcgi, lighthttpd, nginx, starman, etc) and
just ask you how you want to deploy things, and off you go. :-) I really have
no idea how to proceed, but I'd like to get you started discussing it. :-)
Basically, how I'd like to do it is that I want to have a very small .psgi
that only serves to load some Plack::App::*s and some Plack::Middleware::*.
So, the .psgi is pretty much a config thing, it just contains what should be
loaded and possibly some config loading, that's it. But it should be possible
to create one binary package that has a simple no-deps .psgi. This would
typically be used for only deploying RDF::LinkedData. In addition, it would be
great to have another binary package that depends on more modules, like
certain middleware and both RDF::LinkedData, RDF::Endpoint, etc, and a more
advanced .psgi that would set up all these modules to form the ultimate
server.
I don't have much time to contribute to discussing this before June or
something like that, but I hope this gives you guys some ideas. :-)
BTW; please CC any replies, I'm not on this list.
Best,
Kjetil
Reply to: